diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/DatabaseVulnerabilityAssessmentRuleBaselinesOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/DatabaseVulnerabilityAssessmentRuleBaselinesOperations.cs new file mode 100644 index 000000000000..24c1350e069b --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/DatabaseVulnerabilityAssessmentRuleBaselinesOperations.cs @@ -0,0 +1,711 @@ +// +// 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; + + /// + /// DatabaseVulnerabilityAssessmentRuleBaselinesOperations operations. + /// + internal partial class DatabaseVulnerabilityAssessmentRuleBaselinesOperations : IServiceOperations, IDatabaseVulnerabilityAssessmentRuleBaselinesOperations + { + /// + /// Initializes a new instance of the DatabaseVulnerabilityAssessmentRuleBaselinesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal DatabaseVulnerabilityAssessmentRuleBaselinesOperations(SqlManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SqlManagementClient + /// + public SqlManagementClient Client { get; private set; } + + /// + /// Gets a database's vulnerability assessment rule baseline. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which the vulnerability assessment rule + /// baseline is defined. + /// + /// + /// The vulnerability assessment rule ID. + /// + /// + /// 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 ruleId, 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 (ruleId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ruleId"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string vulnerabilityAssessmentName = "default"; + string baselineName = "default"; + 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("vulnerabilityAssessmentName", vulnerabilityAssessmentName); + tracingParameters.Add("ruleId", ruleId); + tracingParameters.Add("baselineName", baselineName); + 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}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}").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("{vulnerabilityAssessmentName}", System.Uri.EscapeDataString(vulnerabilityAssessmentName)); + _url = _url.Replace("{ruleId}", System.Uri.EscapeDataString(ruleId)); + _url = _url.Replace("{baselineName}", System.Uri.EscapeDataString(baselineName)); + _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 or updates a database's vulnerability assessment rule baseline. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which the vulnerability assessment rule + /// baseline is defined. + /// + /// + /// The vulnerability assessment rule ID. + /// + /// + /// The requested rule baseline resource. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string ruleId, DatabaseVulnerabilityAssessmentRuleBaseline 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 (ruleId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ruleId"); + } + 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 vulnerabilityAssessmentName = "default"; + string baselineName = "default"; + 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("vulnerabilityAssessmentName", vulnerabilityAssessmentName); + tracingParameters.Add("ruleId", ruleId); + tracingParameters.Add("baselineName", baselineName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}").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("{vulnerabilityAssessmentName}", System.Uri.EscapeDataString(vulnerabilityAssessmentName)); + _url = _url.Replace("{ruleId}", System.Uri.EscapeDataString(ruleId)); + _url = _url.Replace("{baselineName}", System.Uri.EscapeDataString(baselineName)); + _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("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + 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; + } + + /// + /// Removes the database's vulnerability assessment rule baseline. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which the vulnerability assessment rule + /// baseline is defined. + /// + /// + /// The vulnerability assessment rule ID. + /// + /// + /// 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 ruleId, 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 (ruleId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ruleId"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string vulnerabilityAssessmentName = "default"; + string baselineName = "default"; + 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("vulnerabilityAssessmentName", vulnerabilityAssessmentName); + tracingParameters.Add("ruleId", ruleId); + tracingParameters.Add("baselineName", baselineName); + 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}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}").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("{vulnerabilityAssessmentName}", System.Uri.EscapeDataString(vulnerabilityAssessmentName)); + _url = _url.Replace("{ruleId}", System.Uri.EscapeDataString(ruleId)); + _url = _url.Replace("{baselineName}", System.Uri.EscapeDataString(baselineName)); + _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; + } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/DatabaseVulnerabilityAssessmentRuleBaselinesOperationsExtensions.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/DatabaseVulnerabilityAssessmentRuleBaselinesOperationsExtensions.cs new file mode 100644 index 000000000000..2056fb20b960 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/DatabaseVulnerabilityAssessmentRuleBaselinesOperationsExtensions.cs @@ -0,0 +1,196 @@ +// +// 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 DatabaseVulnerabilityAssessmentRuleBaselinesOperations. + /// + public static partial class DatabaseVulnerabilityAssessmentRuleBaselinesOperationsExtensions + { + /// + /// Gets a database's vulnerability assessment rule baseline. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which the vulnerability assessment rule + /// baseline is defined. + /// + /// + /// The vulnerability assessment rule ID. + /// + public static DatabaseVulnerabilityAssessmentRuleBaseline Get(this IDatabaseVulnerabilityAssessmentRuleBaselinesOperations operations, string resourceGroupName, string serverName, string databaseName, string ruleId) + { + return operations.GetAsync(resourceGroupName, serverName, databaseName, ruleId).GetAwaiter().GetResult(); + } + + /// + /// Gets a database's vulnerability assessment rule baseline. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which the vulnerability assessment rule + /// baseline is defined. + /// + /// + /// The vulnerability assessment rule ID. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IDatabaseVulnerabilityAssessmentRuleBaselinesOperations operations, string resourceGroupName, string serverName, string databaseName, string ruleId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, ruleId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a database's vulnerability assessment rule baseline. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which the vulnerability assessment rule + /// baseline is defined. + /// + /// + /// The vulnerability assessment rule ID. + /// + /// + /// The requested rule baseline resource. + /// + public static DatabaseVulnerabilityAssessmentRuleBaseline CreateOrUpdate(this IDatabaseVulnerabilityAssessmentRuleBaselinesOperations operations, string resourceGroupName, string serverName, string databaseName, string ruleId, DatabaseVulnerabilityAssessmentRuleBaseline parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serverName, databaseName, ruleId, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a database's vulnerability assessment rule baseline. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which the vulnerability assessment rule + /// baseline is defined. + /// + /// + /// The vulnerability assessment rule ID. + /// + /// + /// The requested rule baseline resource. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IDatabaseVulnerabilityAssessmentRuleBaselinesOperations operations, string resourceGroupName, string serverName, string databaseName, string ruleId, DatabaseVulnerabilityAssessmentRuleBaseline parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, ruleId, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Removes the database's vulnerability assessment rule baseline. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which the vulnerability assessment rule + /// baseline is defined. + /// + /// + /// The vulnerability assessment rule ID. + /// + public static void Delete(this IDatabaseVulnerabilityAssessmentRuleBaselinesOperations operations, string resourceGroupName, string serverName, string databaseName, string ruleId) + { + operations.DeleteAsync(resourceGroupName, serverName, databaseName, ruleId).GetAwaiter().GetResult(); + } + + /// + /// Removes the database's vulnerability assessment rule baseline. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which the vulnerability assessment rule + /// baseline is defined. + /// + /// + /// The vulnerability assessment rule ID. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IDatabaseVulnerabilityAssessmentRuleBaselinesOperations operations, string resourceGroupName, string serverName, string databaseName, string ruleId, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, ruleId, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/DatabaseVulnerabilityAssessmentScansOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/DatabaseVulnerabilityAssessmentScansOperations.cs new file mode 100644 index 000000000000..9661d7a0c398 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/DatabaseVulnerabilityAssessmentScansOperations.cs @@ -0,0 +1,1109 @@ +// +// 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; + + /// + /// DatabaseVulnerabilityAssessmentScansOperations operations. + /// + internal partial class DatabaseVulnerabilityAssessmentScansOperations : IServiceOperations, IDatabaseVulnerabilityAssessmentScansOperations + { + /// + /// Initializes a new instance of the DatabaseVulnerabilityAssessmentScansOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal DatabaseVulnerabilityAssessmentScansOperations(SqlManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SqlManagementClient + /// + public SqlManagementClient Client { get; private set; } + + /// + /// Gets a vulnerability assessment scan record of 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. + /// + /// + /// The name of the database. + /// + /// + /// The vulnerability assessment scan Id of the scan to retrieve. + /// + /// + /// 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 scanId, 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 (scanId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "scanId"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string vulnerabilityAssessmentName = "default"; + 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("databaseName", databaseName); + tracingParameters.Add("vulnerabilityAssessmentName", vulnerabilityAssessmentName); + tracingParameters.Add("scanId", scanId); + 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}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}").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("{vulnerabilityAssessmentName}", System.Uri.EscapeDataString(vulnerabilityAssessmentName)); + _url = _url.Replace("{scanId}", System.Uri.EscapeDataString(scanId)); + _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; + } + + /// + /// Executes a Vulnerability Assessment database scan. + /// + /// + /// 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 vulnerability assessment scan Id of the scan to retrieve. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task ExecuteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string scanId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginExecuteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, scanId, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Lists the vulnerability assessment scans of 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. + /// + /// + /// The name of the 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>> ListByDatabaseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, 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 (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string vulnerabilityAssessmentName = "default"; + 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("databaseName", databaseName); + tracingParameters.Add("vulnerabilityAssessmentName", vulnerabilityAssessmentName); + 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}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans").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("{vulnerabilityAssessmentName}", System.Uri.EscapeDataString(vulnerabilityAssessmentName)); + _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; + } + + /// + /// Convert an existing scan result to a human readable format. If already + /// exists nothing happens + /// + /// + /// 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 scanned database. + /// + /// + /// The vulnerability assessment scan Id. + /// + /// + /// 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> ExportWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string scanId, 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 (scanId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "scanId"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string vulnerabilityAssessmentName = "default"; + 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("databaseName", databaseName); + tracingParameters.Add("vulnerabilityAssessmentName", vulnerabilityAssessmentName); + tracingParameters.Add("scanId", scanId); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Export", 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}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/export").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("{vulnerabilityAssessmentName}", System.Uri.EscapeDataString(vulnerabilityAssessmentName)); + _url = _url.Replace("{scanId}", System.Uri.EscapeDataString(scanId)); + _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 && (int)_statusCode != 201) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Executes a Vulnerability Assessment database scan. + /// + /// + /// 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 vulnerability assessment scan Id of the scan to retrieve. + /// + /// + /// 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 BeginExecuteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string scanId, 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 (scanId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "scanId"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string vulnerabilityAssessmentName = "default"; + 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("databaseName", databaseName); + tracingParameters.Add("vulnerabilityAssessmentName", vulnerabilityAssessmentName); + tracingParameters.Add("scanId", scanId); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginExecute", 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}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan").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("{vulnerabilityAssessmentName}", System.Uri.EscapeDataString(vulnerabilityAssessmentName)); + _url = _url.Replace("{scanId}", System.Uri.EscapeDataString(scanId)); + _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 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists the vulnerability assessment scans of a database. + /// + /// + /// 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>> ListByDatabaseNextWithHttpMessagesAsync(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, "ListByDatabaseNext", 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/DatabaseVulnerabilityAssessmentScansOperationsExtensions.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/DatabaseVulnerabilityAssessmentScansOperationsExtensions.cs new file mode 100644 index 000000000000..fc09dc8ec838 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/DatabaseVulnerabilityAssessmentScansOperationsExtensions.cs @@ -0,0 +1,319 @@ +// +// 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 DatabaseVulnerabilityAssessmentScansOperations. + /// + public static partial class DatabaseVulnerabilityAssessmentScansOperationsExtensions + { + /// + /// Gets a vulnerability assessment scan record of a database. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database. + /// + /// + /// The vulnerability assessment scan Id of the scan to retrieve. + /// + public static VulnerabilityAssessmentScanRecord Get(this IDatabaseVulnerabilityAssessmentScansOperations operations, string resourceGroupName, string serverName, string databaseName, string scanId) + { + return operations.GetAsync(resourceGroupName, serverName, databaseName, scanId).GetAwaiter().GetResult(); + } + + /// + /// Gets a vulnerability assessment scan record of a database. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database. + /// + /// + /// The vulnerability assessment scan Id of the scan to retrieve. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IDatabaseVulnerabilityAssessmentScansOperations operations, string resourceGroupName, string serverName, string databaseName, string scanId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, scanId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Executes a Vulnerability Assessment database scan. + /// + /// + /// 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 vulnerability assessment scan Id of the scan to retrieve. + /// + public static void Execute(this IDatabaseVulnerabilityAssessmentScansOperations operations, string resourceGroupName, string serverName, string databaseName, string scanId) + { + operations.ExecuteAsync(resourceGroupName, serverName, databaseName, scanId).GetAwaiter().GetResult(); + } + + /// + /// Executes a Vulnerability Assessment database scan. + /// + /// + /// 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 vulnerability assessment scan Id of the scan to retrieve. + /// + /// + /// The cancellation token. + /// + public static async Task ExecuteAsync(this IDatabaseVulnerabilityAssessmentScansOperations operations, string resourceGroupName, string serverName, string databaseName, string scanId, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.ExecuteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, scanId, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Lists the vulnerability assessment scans of a database. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database. + /// + public static IPage ListByDatabase(this IDatabaseVulnerabilityAssessmentScansOperations operations, string resourceGroupName, string serverName, string databaseName) + { + return operations.ListByDatabaseAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult(); + } + + /// + /// Lists the vulnerability assessment scans of a database. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByDatabaseAsync(this IDatabaseVulnerabilityAssessmentScansOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByDatabaseWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Convert an existing scan result to a human readable format. If already + /// exists nothing happens + /// + /// + /// 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 scanned database. + /// + /// + /// The vulnerability assessment scan Id. + /// + public static DatabaseVulnerabilityAssessmentScansExport Export(this IDatabaseVulnerabilityAssessmentScansOperations operations, string resourceGroupName, string serverName, string databaseName, string scanId) + { + return operations.ExportAsync(resourceGroupName, serverName, databaseName, scanId).GetAwaiter().GetResult(); + } + + /// + /// Convert an existing scan result to a human readable format. If already + /// exists nothing happens + /// + /// + /// 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 scanned database. + /// + /// + /// The vulnerability assessment scan Id. + /// + /// + /// The cancellation token. + /// + public static async Task ExportAsync(this IDatabaseVulnerabilityAssessmentScansOperations operations, string resourceGroupName, string serverName, string databaseName, string scanId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ExportWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, scanId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Executes a Vulnerability Assessment database scan. + /// + /// + /// 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 vulnerability assessment scan Id of the scan to retrieve. + /// + public static void BeginExecute(this IDatabaseVulnerabilityAssessmentScansOperations operations, string resourceGroupName, string serverName, string databaseName, string scanId) + { + operations.BeginExecuteAsync(resourceGroupName, serverName, databaseName, scanId).GetAwaiter().GetResult(); + } + + /// + /// Executes a Vulnerability Assessment database scan. + /// + /// + /// 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 vulnerability assessment scan Id of the scan to retrieve. + /// + /// + /// The cancellation token. + /// + public static async Task BeginExecuteAsync(this IDatabaseVulnerabilityAssessmentScansOperations operations, string resourceGroupName, string serverName, string databaseName, string scanId, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginExecuteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, scanId, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Lists the vulnerability assessment scans of a database. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByDatabaseNext(this IDatabaseVulnerabilityAssessmentScansOperations operations, string nextPageLink) + { + return operations.ListByDatabaseNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists the vulnerability assessment scans of a database. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByDatabaseNextAsync(this IDatabaseVulnerabilityAssessmentScansOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByDatabaseNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/DatabaseVulnerabilityAssessmentsOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/DatabaseVulnerabilityAssessmentsOperations.cs new file mode 100644 index 000000000000..ac7738e45303 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/DatabaseVulnerabilityAssessmentsOperations.cs @@ -0,0 +1,686 @@ +// +// 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; + + /// + /// DatabaseVulnerabilityAssessmentsOperations operations. + /// + internal partial class DatabaseVulnerabilityAssessmentsOperations : IServiceOperations, IDatabaseVulnerabilityAssessmentsOperations + { + /// + /// Initializes a new instance of the DatabaseVulnerabilityAssessmentsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal DatabaseVulnerabilityAssessmentsOperations(SqlManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SqlManagementClient + /// + public SqlManagementClient Client { get; private set; } + + /// + /// Gets the database's vulnerability assessment. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which the vulnerability assessment is defined. + /// + /// + /// 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, 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 (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string vulnerabilityAssessmentName = "default"; + 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("vulnerabilityAssessmentName", vulnerabilityAssessmentName); + 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}/vulnerabilityAssessments/{vulnerabilityAssessmentName}").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("{vulnerabilityAssessmentName}", System.Uri.EscapeDataString(vulnerabilityAssessmentName)); + _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 or updates the database's vulnerability assessment. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which the vulnerability assessment is defined. + /// + /// + /// The requested resource. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, DatabaseVulnerabilityAssessment 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 (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string vulnerabilityAssessmentName = "default"; + 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("vulnerabilityAssessmentName", vulnerabilityAssessmentName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}").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("{vulnerabilityAssessmentName}", System.Uri.EscapeDataString(vulnerabilityAssessmentName)); + _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("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Removes the database's vulnerability assessment. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which the vulnerability assessment is defined. + /// + /// + /// 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, 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 (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string vulnerabilityAssessmentName = "default"; + 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("vulnerabilityAssessmentName", vulnerabilityAssessmentName); + 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}/vulnerabilityAssessments/{vulnerabilityAssessmentName}").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("{vulnerabilityAssessmentName}", System.Uri.EscapeDataString(vulnerabilityAssessmentName)); + _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; + } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/DatabaseVulnerabilityAssessmentsOperationsExtensions.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/DatabaseVulnerabilityAssessmentsOperationsExtensions.cs new file mode 100644 index 000000000000..264fd66ee33c --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/DatabaseVulnerabilityAssessmentsOperationsExtensions.cs @@ -0,0 +1,172 @@ +// +// 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 DatabaseVulnerabilityAssessmentsOperations. + /// + public static partial class DatabaseVulnerabilityAssessmentsOperationsExtensions + { + /// + /// Gets the database's vulnerability assessment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which the vulnerability assessment is defined. + /// + public static DatabaseVulnerabilityAssessment Get(this IDatabaseVulnerabilityAssessmentsOperations operations, string resourceGroupName, string serverName, string databaseName) + { + return operations.GetAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult(); + } + + /// + /// Gets the database's vulnerability assessment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which the vulnerability assessment is defined. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IDatabaseVulnerabilityAssessmentsOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates the database's vulnerability assessment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which the vulnerability assessment is defined. + /// + /// + /// The requested resource. + /// + public static DatabaseVulnerabilityAssessment CreateOrUpdate(this IDatabaseVulnerabilityAssessmentsOperations operations, string resourceGroupName, string serverName, string databaseName, DatabaseVulnerabilityAssessment parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates the database's vulnerability assessment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which the vulnerability assessment is defined. + /// + /// + /// The requested resource. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IDatabaseVulnerabilityAssessmentsOperations operations, string resourceGroupName, string serverName, string databaseName, DatabaseVulnerabilityAssessment parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Removes the database's vulnerability assessment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which the vulnerability assessment is defined. + /// + public static void Delete(this IDatabaseVulnerabilityAssessmentsOperations operations, string resourceGroupName, string serverName, string databaseName) + { + operations.DeleteAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult(); + } + + /// + /// Removes the database's vulnerability assessment. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which the vulnerability assessment is defined. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IDatabaseVulnerabilityAssessmentsOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/IDatabaseVulnerabilityAssessmentRuleBaselinesOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/IDatabaseVulnerabilityAssessmentRuleBaselinesOperations.cs new file mode 100644 index 000000000000..a91d62d5fb85 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/IDatabaseVulnerabilityAssessmentRuleBaselinesOperations.cs @@ -0,0 +1,130 @@ +// +// 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; + + /// + /// DatabaseVulnerabilityAssessmentRuleBaselinesOperations operations. + /// + public partial interface IDatabaseVulnerabilityAssessmentRuleBaselinesOperations + { + /// + /// Gets a database's vulnerability assessment rule baseline. + /// + /// + /// The name of the resource group that contains the resource. You can + /// obtain this value from the Azure Resource Manager API or the + /// portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which the vulnerability assessment + /// rule baseline is defined. + /// + /// + /// The vulnerability assessment rule ID. + /// + /// + /// 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 ruleId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a database's vulnerability assessment rule + /// baseline. + /// + /// + /// The name of the resource group that contains the resource. You can + /// obtain this value from the Azure Resource Manager API or the + /// portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which the vulnerability assessment + /// rule baseline is defined. + /// + /// + /// The vulnerability assessment rule ID. + /// + /// + /// The requested rule baseline resource. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string ruleId, DatabaseVulnerabilityAssessmentRuleBaseline parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Removes the database's vulnerability assessment rule baseline. + /// + /// + /// The name of the resource group that contains the resource. You can + /// obtain this value from the Azure Resource Manager API or the + /// portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which the vulnerability assessment + /// rule baseline is defined. + /// + /// + /// The vulnerability assessment rule ID. + /// + /// + /// 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 ruleId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/IDatabaseVulnerabilityAssessmentScansOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/IDatabaseVulnerabilityAssessmentScansOperations.cs new file mode 100644 index 000000000000..1556a97386f9 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/IDatabaseVulnerabilityAssessmentScansOperations.cs @@ -0,0 +1,206 @@ +// +// 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; + + /// + /// DatabaseVulnerabilityAssessmentScansOperations operations. + /// + public partial interface IDatabaseVulnerabilityAssessmentScansOperations + { + /// + /// Gets a vulnerability assessment scan record of 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. + /// + /// + /// The name of the database. + /// + /// + /// The vulnerability assessment scan Id of the scan to retrieve. + /// + /// + /// 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 scanId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Executes a Vulnerability Assessment database scan. + /// + /// + /// 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 vulnerability assessment scan Id of the scan to retrieve. + /// + /// + /// 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 ExecuteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string scanId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists the vulnerability assessment scans of 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. + /// + /// + /// The name of the 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>> ListByDatabaseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Convert an existing scan result to a human readable format. If + /// already exists nothing happens + /// + /// + /// 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 scanned database. + /// + /// + /// The vulnerability assessment scan Id. + /// + /// + /// 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> ExportWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string scanId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Executes a Vulnerability Assessment database scan. + /// + /// + /// 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 vulnerability assessment scan Id of the scan to retrieve. + /// + /// + /// 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 BeginExecuteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string scanId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists the vulnerability assessment scans of a database. + /// + /// + /// 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>> ListByDatabaseNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/IDatabaseVulnerabilityAssessmentsOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/IDatabaseVulnerabilityAssessmentsOperations.cs new file mode 100644 index 000000000000..1e4aa09b2be5 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/IDatabaseVulnerabilityAssessmentsOperations.cs @@ -0,0 +1,120 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Sql +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// DatabaseVulnerabilityAssessmentsOperations operations. + /// + public partial interface IDatabaseVulnerabilityAssessmentsOperations + { + /// + /// Gets the database's vulnerability assessment. + /// + /// + /// The name of the resource group that contains the resource. You can + /// obtain this value from the Azure Resource Manager API or the + /// portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which the vulnerability assessment is + /// defined. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates the database's vulnerability assessment. + /// + /// + /// The name of the resource group that contains the resource. You can + /// obtain this value from the Azure Resource Manager API or the + /// portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which the vulnerability assessment is + /// defined. + /// + /// + /// The requested resource. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, DatabaseVulnerabilityAssessment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Removes the database's vulnerability assessment. + /// + /// + /// The name of the resource group that contains the resource. You can + /// obtain this value from the Azure Resource Manager API or the + /// portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database for which the vulnerability assessment is + /// defined. + /// + /// + /// 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, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/IJobAgentsOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/IJobAgentsOperations.cs new file mode 100644 index 000000000000..dc06028b4471 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/IJobAgentsOperations.cs @@ -0,0 +1,292 @@ +// +// 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; + + /// + /// JobAgentsOperations operations. + /// + public partial interface IJobAgentsOperations + { + /// + /// Gets a list of job agents in a server. + /// + /// + /// 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>> ListByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a job agent. + /// + /// + /// 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 job agent to be retrieved. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a job agent. + /// + /// + /// 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 job agent to be created or updated. + /// + /// + /// The requested job agent resource state. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, JobAgent parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a job agent. + /// + /// + /// 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 job agent to be deleted. + /// + /// + /// 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 jobAgentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates a job agent. + /// + /// + /// 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 job agent to be updated. + /// + /// + /// The update to the job agent. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, JobAgentUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a job agent. + /// + /// + /// 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 job agent to be created or updated. + /// + /// + /// The requested job agent resource state. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, JobAgent parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a job agent. + /// + /// + /// 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 job agent to be deleted. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates a job agent. + /// + /// + /// 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 job agent to be updated. + /// + /// + /// The update to the job agent. + /// + /// + /// 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> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, JobAgentUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a list of job agents in a server. + /// + /// + /// 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>> ListByServerNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/IJobCredentialsOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/IJobCredentialsOperations.cs new file mode 100644 index 000000000000..2c411e4e4ba6 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/IJobCredentialsOperations.cs @@ -0,0 +1,178 @@ +// +// 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; + + /// + /// JobCredentialsOperations operations. + /// + public partial interface IJobCredentialsOperations + { + /// + /// Gets a list of jobs credentials. + /// + /// + /// 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 job agent. + /// + /// + /// 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>> ListByAgentWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a jobs credential. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the credential. + /// + /// + /// 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 jobAgentName, string credentialName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a job credential. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the credential. + /// + /// + /// The requested job credential state. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, string credentialName, JobCredential parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a job credential. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the credential. + /// + /// + /// 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 jobAgentName, string credentialName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a list of jobs credentials. + /// + /// + /// 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>> ListByAgentNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/IJobExecutionsOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/IJobExecutionsOperations.cs new file mode 100644 index 000000000000..caeaf4fdba60 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/IJobExecutionsOperations.cs @@ -0,0 +1,393 @@ +// +// 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; + + /// + /// JobExecutionsOperations operations. + /// + public partial interface IJobExecutionsOperations + { + /// + /// Lists all executions in a job agent. + /// + /// + /// 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 job agent. + /// + /// + /// If specified, only job executions created at or after the specified + /// time are included. + /// + /// + /// If specified, only job executions created before the specified time + /// are included. + /// + /// + /// If specified, only job executions completed at or after the + /// specified time are included. + /// + /// + /// If specified, only job executions completed before the specified + /// time are included. + /// + /// + /// If specified, only active or only completed job executions are + /// included. + /// + /// + /// The number of elements in the collection to skip. + /// + /// + /// The number of elements to return from the collection. + /// + /// + /// 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>> ListByAgentWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, System.DateTime? createTimeMin = default(System.DateTime?), System.DateTime? createTimeMax = default(System.DateTime?), System.DateTime? endTimeMin = default(System.DateTime?), System.DateTime? endTimeMax = default(System.DateTime?), bool? isActive = default(bool?), int? skip = default(int?), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Requests cancellation of a job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job. + /// + /// + /// The id of the job execution to cancel. + /// + /// + /// 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 jobAgentName, string jobName, System.Guid jobExecutionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Starts an elastic job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// 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 jobAgentName, string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists a job's executions. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// If specified, only job executions created at or after the specified + /// time are included. + /// + /// + /// If specified, only job executions created before the specified time + /// are included. + /// + /// + /// If specified, only job executions completed at or after the + /// specified time are included. + /// + /// + /// If specified, only job executions completed before the specified + /// time are included. + /// + /// + /// If specified, only active or only completed job executions are + /// included. + /// + /// + /// The number of elements in the collection to skip. + /// + /// + /// The number of elements to return from the collection. + /// + /// + /// 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>> ListByJobWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, string jobName, System.DateTime? createTimeMin = default(System.DateTime?), System.DateTime? createTimeMax = default(System.DateTime?), System.DateTime? endTimeMin = default(System.DateTime?), System.DateTime? endTimeMax = default(System.DateTime?), bool? isActive = default(bool?), int? skip = default(int?), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job. + /// + /// + /// The id of the job execution + /// + /// + /// 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 jobAgentName, string jobName, System.Guid jobExecutionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updatess a job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The job execution id to create the job execution under. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, string jobName, System.Guid jobExecutionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Starts an elastic job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// 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 jobAgentName, string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updatess a job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The job execution id to create the job execution under. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, string jobName, System.Guid jobExecutionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists all executions in a job agent. + /// + /// + /// 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>> ListByAgentNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists a job's executions. + /// + /// + /// 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>> ListByJobNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/IJobStepExecutionsOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/IJobStepExecutionsOperations.cs new file mode 100644 index 000000000000..ba6472843910 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/IJobStepExecutionsOperations.cs @@ -0,0 +1,150 @@ +// +// 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; + + /// + /// JobStepExecutionsOperations operations. + /// + public partial interface IJobStepExecutionsOperations + { + /// + /// Lists the step executions of a job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The id of the job execution + /// + /// + /// If specified, only job executions created at or after the specified + /// time are included. + /// + /// + /// If specified, only job executions created before the specified time + /// are included. + /// + /// + /// If specified, only job executions completed at or after the + /// specified time are included. + /// + /// + /// If specified, only job executions completed before the specified + /// time are included. + /// + /// + /// If specified, only active or only completed job executions are + /// included. + /// + /// + /// The number of elements in the collection to skip. + /// + /// + /// The number of elements to return from the collection. + /// + /// + /// 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>> ListByJobExecutionWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, string jobName, System.Guid jobExecutionId, System.DateTime? createTimeMin = default(System.DateTime?), System.DateTime? createTimeMax = default(System.DateTime?), System.DateTime? endTimeMin = default(System.DateTime?), System.DateTime? endTimeMax = default(System.DateTime?), bool? isActive = default(bool?), int? skip = default(int?), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a step execution of a job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The unique id of the job execution + /// + /// + /// The name of the step. + /// + /// + /// 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 jobAgentName, string jobName, System.Guid jobExecutionId, string stepName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists the step executions of a job execution. + /// + /// + /// 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>> ListByJobExecutionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/IJobStepsOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/IJobStepsOperations.cs new file mode 100644 index 000000000000..e2f428fa8e21 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/IJobStepsOperations.cs @@ -0,0 +1,288 @@ +// +// 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; + + /// + /// JobStepsOperations operations. + /// + public partial interface IJobStepsOperations + { + /// + /// Gets all job steps in the specified job version. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The version of the job to get. + /// + /// + /// 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>> ListByVersionWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, string jobName, int jobVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the specified version of a job step. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job. + /// + /// + /// The version of the job to get. + /// + /// + /// The name of the job step. + /// + /// + /// 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> GetByVersionWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, string jobName, int jobVersion, string stepName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets all job steps for a job's current version. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// 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>> ListByJobWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a job step in a job's current version. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job. + /// + /// + /// The name of the job step. + /// + /// + /// 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 jobAgentName, string jobName, string stepName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a job step. This will implicitly create a new + /// job version. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job. + /// + /// + /// The name of the job step. + /// + /// + /// The requested state of the job step. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, string jobName, string stepName, JobStep parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a job step. This will implicitly create a new job version. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job. + /// + /// + /// The name of the job step to delete. + /// + /// + /// 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 jobAgentName, string jobName, string stepName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets all job steps in the specified job version. + /// + /// + /// 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>> ListByVersionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets all job steps for a job's current version. + /// + /// + /// 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>> ListByJobNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/IJobTargetExecutionsOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/IJobTargetExecutionsOperations.cs new file mode 100644 index 000000000000..fcc85a2daf87 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/IJobTargetExecutionsOperations.cs @@ -0,0 +1,240 @@ +// +// 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; + + /// + /// JobTargetExecutionsOperations operations. + /// + public partial interface IJobTargetExecutionsOperations + { + /// + /// Lists target executions for all steps of a job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The id of the job execution + /// + /// + /// If specified, only job executions created at or after the specified + /// time are included. + /// + /// + /// If specified, only job executions created before the specified time + /// are included. + /// + /// + /// If specified, only job executions completed at or after the + /// specified time are included. + /// + /// + /// If specified, only job executions completed before the specified + /// time are included. + /// + /// + /// If specified, only active or only completed job executions are + /// included. + /// + /// + /// The number of elements in the collection to skip. + /// + /// + /// The number of elements to return from the collection. + /// + /// + /// 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>> ListByJobExecutionWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, string jobName, System.Guid jobExecutionId, System.DateTime? createTimeMin = default(System.DateTime?), System.DateTime? createTimeMax = default(System.DateTime?), System.DateTime? endTimeMin = default(System.DateTime?), System.DateTime? endTimeMax = default(System.DateTime?), bool? isActive = default(bool?), int? skip = default(int?), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists the target executions of a job step execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The id of the job execution + /// + /// + /// The name of the step. + /// + /// + /// If specified, only job executions created at or after the specified + /// time are included. + /// + /// + /// If specified, only job executions created before the specified time + /// are included. + /// + /// + /// If specified, only job executions completed at or after the + /// specified time are included. + /// + /// + /// If specified, only job executions completed before the specified + /// time are included. + /// + /// + /// If specified, only active or only completed job executions are + /// included. + /// + /// + /// The number of elements in the collection to skip. + /// + /// + /// The number of elements to return from the collection. + /// + /// + /// 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>> ListByStepWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, string jobName, System.Guid jobExecutionId, string stepName, System.DateTime? createTimeMin = default(System.DateTime?), System.DateTime? createTimeMax = default(System.DateTime?), System.DateTime? endTimeMin = default(System.DateTime?), System.DateTime? endTimeMax = default(System.DateTime?), bool? isActive = default(bool?), int? skip = default(int?), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a target execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The unique id of the job execution + /// + /// + /// The name of the step. + /// + /// + /// The target id. + /// + /// + /// 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 jobAgentName, string jobName, System.Guid jobExecutionId, string stepName, System.Guid targetId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists target executions for all steps of a job execution. + /// + /// + /// 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>> ListByJobExecutionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists the target executions of a job step execution. + /// + /// + /// 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>> ListByStepNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/IJobTargetGroupsOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/IJobTargetGroupsOperations.cs new file mode 100644 index 000000000000..8fab528c6e99 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/IJobTargetGroupsOperations.cs @@ -0,0 +1,178 @@ +// +// 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; + + /// + /// JobTargetGroupsOperations operations. + /// + public partial interface IJobTargetGroupsOperations + { + /// + /// Gets all target groups in an agent. + /// + /// + /// 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 job agent. + /// + /// + /// 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>> ListByAgentWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a target group. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the target group. + /// + /// + /// 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 jobAgentName, string targetGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a target group. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the target group. + /// + /// + /// The requested state of the target group. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, string targetGroupName, JobTargetGroup parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a target group. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the target group. + /// + /// + /// 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 jobAgentName, string targetGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets all target groups in an agent. + /// + /// + /// 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>> ListByAgentNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/IJobVersionsOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/IJobVersionsOperations.cs new file mode 100644 index 000000000000..4b64755044ae --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/IJobVersionsOperations.cs @@ -0,0 +1,118 @@ +// +// 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; + + /// + /// JobVersionsOperations operations. + /// + public partial interface IJobVersionsOperations + { + /// + /// Gets all versions of a job. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// 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>> ListByJobWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a job version. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job. + /// + /// + /// The version of the job to get. + /// + /// + /// 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 jobAgentName, string jobName, int jobVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets all versions of a job. + /// + /// + /// 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>> ListByJobNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/IJobsOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/IJobsOperations.cs new file mode 100644 index 000000000000..cd52372c7049 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/IJobsOperations.cs @@ -0,0 +1,178 @@ +// +// 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; + + /// + /// JobsOperations operations. + /// + public partial interface IJobsOperations + { + /// + /// Gets a list of jobs. + /// + /// + /// 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 job agent. + /// + /// + /// 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>> ListByAgentWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a job. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// 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 jobAgentName, string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a job. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The requested job state. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, string jobName, Job parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a job. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to delete. + /// + /// + /// 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 jobAgentName, string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a list of jobs. + /// + /// + /// 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>> ListByAgentNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/IShortTermRetentionPoliciesOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/IShortTermRetentionPoliciesOperations.cs new file mode 100644 index 000000000000..a3ec91ba4f89 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/IShortTermRetentionPoliciesOperations.cs @@ -0,0 +1,189 @@ +// +// 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; + + /// + /// ShortTermRetentionPoliciesOperations operations. + /// + public partial interface IShortTermRetentionPoliciesOperations + { + /// + /// Gets a database's short term retention policy. + /// + /// + /// The name of the resource group that contains the resource. You can + /// obtain this value from the Azure Resource Manager API or the + /// portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database. + /// + /// + /// 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, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates a database's short term retention policy. + /// + /// + /// The name of the resource group that contains the resource. You can + /// obtain this value from the Azure Resource Manager API or the + /// portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database. + /// + /// + /// The short term retention policy info. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ShortTermRetentionPolicy parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates a database's short term retention policy. + /// + /// + /// The name of the resource group that contains the resource. You can + /// obtain this value from the Azure Resource Manager API or the + /// portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database. + /// + /// + /// The short term retention policy info. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ShortTermRetentionPolicy parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates a database's short term retention policy. + /// + /// + /// The name of the resource group that contains the resource. You can + /// obtain this value from the Azure Resource Manager API or the + /// portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database. + /// + /// + /// The short term retention policy info. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ShortTermRetentionPolicy parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates a database's short term retention policy. + /// + /// + /// The name of the resource group that contains the resource. You can + /// obtain this value from the Azure Resource Manager API or the + /// portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database. + /// + /// + /// The short term retention policy info. + /// + /// + /// 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> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ShortTermRetentionPolicy 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 6d60f338a605..1dcc752ace6e 100644 --- a/src/SDKs/SqlManagement/Management.Sql/Generated/ISqlManagementClient.cs +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/ISqlManagementClient.cs @@ -241,6 +241,61 @@ public partial interface ISqlManagementClient : System.IDisposable /// IVirtualNetworkRulesOperations VirtualNetworkRules { get; } + /// + /// Gets the IDatabaseVulnerabilityAssessmentRuleBaselinesOperations. + /// + IDatabaseVulnerabilityAssessmentRuleBaselinesOperations DatabaseVulnerabilityAssessmentRuleBaselines { get; } + + /// + /// Gets the IDatabaseVulnerabilityAssessmentsOperations. + /// + IDatabaseVulnerabilityAssessmentsOperations DatabaseVulnerabilityAssessments { get; } + + /// + /// Gets the IJobAgentsOperations. + /// + IJobAgentsOperations JobAgents { get; } + + /// + /// Gets the IJobCredentialsOperations. + /// + IJobCredentialsOperations JobCredentials { get; } + + /// + /// Gets the IJobExecutionsOperations. + /// + IJobExecutionsOperations JobExecutions { get; } + + /// + /// Gets the IJobsOperations. + /// + IJobsOperations Jobs { get; } + + /// + /// Gets the IJobStepExecutionsOperations. + /// + IJobStepExecutionsOperations JobStepExecutions { get; } + + /// + /// Gets the IJobStepsOperations. + /// + IJobStepsOperations JobSteps { get; } + + /// + /// Gets the IJobTargetExecutionsOperations. + /// + IJobTargetExecutionsOperations JobTargetExecutions { get; } + + /// + /// Gets the IJobTargetGroupsOperations. + /// + IJobTargetGroupsOperations JobTargetGroups { get; } + + /// + /// Gets the IJobVersionsOperations. + /// + IJobVersionsOperations JobVersions { get; } + /// /// Gets the ILongTermRetentionBackupsOperations. /// @@ -286,10 +341,20 @@ public partial interface ISqlManagementClient : System.IDisposable /// ICapabilitiesOperations Capabilities { get; } + /// + /// Gets the IDatabaseVulnerabilityAssessmentScansOperations. + /// + IDatabaseVulnerabilityAssessmentScansOperations DatabaseVulnerabilityAssessmentScans { get; } + /// /// Gets the IInstanceFailoverGroupsOperations. /// IInstanceFailoverGroupsOperations InstanceFailoverGroups { get; } + /// + /// Gets the IShortTermRetentionPoliciesOperations. + /// + IShortTermRetentionPoliciesOperations ShortTermRetentionPolicies { get; } + } } diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/JobAgentsOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/JobAgentsOperations.cs new file mode 100644 index 000000000000..1dd2de8a0187 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/JobAgentsOperations.cs @@ -0,0 +1,1351 @@ +// +// 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; + + /// + /// JobAgentsOperations operations. + /// + internal partial class JobAgentsOperations : IServiceOperations, IJobAgentsOperations + { + /// + /// Initializes a new instance of the JobAgentsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal JobAgentsOperations(SqlManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SqlManagementClient + /// + public SqlManagementClient Client { get; private set; } + + /// + /// Gets a list of job agents in a server. + /// + /// + /// 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>> ListByServerWithHttpMessagesAsync(string resourceGroupName, string serverName, 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 (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("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + 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}/jobAgents").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _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 job agent. + /// + /// + /// 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 job agent to be retrieved. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + 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("jobAgentName", jobAgentName); + 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}/jobAgents/{jobAgentName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _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 or updates a job agent. + /// + /// + /// 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 job agent to be created or updated. + /// + /// + /// The requested job agent resource state. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, JobAgent parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Deletes a job agent. + /// + /// + /// 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 job agent to be deleted. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Updates a job agent. + /// + /// + /// 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 job agent to be updated. + /// + /// + /// The update to the job agent. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, JobAgentUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Creates or updates a job agent. + /// + /// + /// 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 job agent to be created or updated. + /// + /// + /// The requested job agent resource state. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, JobAgent 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _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("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 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; + } + + /// + /// Deletes a job agent. + /// + /// + /// 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 job agent to be deleted. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _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 && (int)_statusCode != 202 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Updates a job agent. + /// + /// + /// 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 job agent to be updated. + /// + /// + /// The update to the job agent. + /// + /// + /// 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> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, JobAgentUpdate 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + 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}/jobAgents/{jobAgentName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _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("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets a list of job agents in a server. + /// + /// + /// 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>> ListByServerNextWithHttpMessagesAsync(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, "ListByServerNext", 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/JobAgentsOperationsExtensions.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/JobAgentsOperationsExtensions.cs new file mode 100644 index 000000000000..df77f9f2c4c0 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/JobAgentsOperationsExtensions.cs @@ -0,0 +1,455 @@ +// +// 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 JobAgentsOperations. + /// + public static partial class JobAgentsOperationsExtensions + { + /// + /// Gets a list of job agents in a server. + /// + /// + /// 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 ListByServer(this IJobAgentsOperations operations, string resourceGroupName, string serverName) + { + return operations.ListByServerAsync(resourceGroupName, serverName).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of job agents in a server. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByServerAsync(this IJobAgentsOperations operations, string resourceGroupName, string serverName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServerWithHttpMessagesAsync(resourceGroupName, serverName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a job agent. + /// + /// + /// 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 job agent to be retrieved. + /// + public static JobAgent Get(this IJobAgentsOperations operations, string resourceGroupName, string serverName, string jobAgentName) + { + return operations.GetAsync(resourceGroupName, serverName, jobAgentName).GetAwaiter().GetResult(); + } + + /// + /// Gets a job agent. + /// + /// + /// 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 job agent to be retrieved. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IJobAgentsOperations operations, string resourceGroupName, string serverName, string jobAgentName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a job agent. + /// + /// + /// 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 job agent to be created or updated. + /// + /// + /// The requested job agent resource state. + /// + public static JobAgent CreateOrUpdate(this IJobAgentsOperations operations, string resourceGroupName, string serverName, string jobAgentName, JobAgent parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a job agent. + /// + /// + /// 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 job agent to be created or updated. + /// + /// + /// The requested job agent resource state. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IJobAgentsOperations operations, string resourceGroupName, string serverName, string jobAgentName, JobAgent parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a job agent. + /// + /// + /// 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 job agent to be deleted. + /// + public static void Delete(this IJobAgentsOperations operations, string resourceGroupName, string serverName, string jobAgentName) + { + operations.DeleteAsync(resourceGroupName, serverName, jobAgentName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a job agent. + /// + /// + /// 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 job agent to be deleted. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IJobAgentsOperations operations, string resourceGroupName, string serverName, string jobAgentName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Updates a job agent. + /// + /// + /// 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 job agent to be updated. + /// + /// + /// The update to the job agent. + /// + public static JobAgent Update(this IJobAgentsOperations operations, string resourceGroupName, string serverName, string jobAgentName, JobAgentUpdate parameters) + { + return operations.UpdateAsync(resourceGroupName, serverName, jobAgentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Updates a job agent. + /// + /// + /// 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 job agent to be updated. + /// + /// + /// The update to the job agent. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IJobAgentsOperations operations, string resourceGroupName, string serverName, string jobAgentName, JobAgentUpdate parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a job agent. + /// + /// + /// 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 job agent to be created or updated. + /// + /// + /// The requested job agent resource state. + /// + public static JobAgent BeginCreateOrUpdate(this IJobAgentsOperations operations, string resourceGroupName, string serverName, string jobAgentName, JobAgent parameters) + { + return operations.BeginCreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a job agent. + /// + /// + /// 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 job agent to be created or updated. + /// + /// + /// The requested job agent resource state. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateOrUpdateAsync(this IJobAgentsOperations operations, string resourceGroupName, string serverName, string jobAgentName, JobAgent parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a job agent. + /// + /// + /// 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 job agent to be deleted. + /// + public static void BeginDelete(this IJobAgentsOperations operations, string resourceGroupName, string serverName, string jobAgentName) + { + operations.BeginDeleteAsync(resourceGroupName, serverName, jobAgentName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a job agent. + /// + /// + /// 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 job agent to be deleted. + /// + /// + /// The cancellation token. + /// + public static async Task BeginDeleteAsync(this IJobAgentsOperations operations, string resourceGroupName, string serverName, string jobAgentName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Updates a job agent. + /// + /// + /// 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 job agent to be updated. + /// + /// + /// The update to the job agent. + /// + public static JobAgent BeginUpdate(this IJobAgentsOperations operations, string resourceGroupName, string serverName, string jobAgentName, JobAgentUpdate parameters) + { + return operations.BeginUpdateAsync(resourceGroupName, serverName, jobAgentName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Updates a job agent. + /// + /// + /// 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 job agent to be updated. + /// + /// + /// The update to the job agent. + /// + /// + /// The cancellation token. + /// + public static async Task BeginUpdateAsync(this IJobAgentsOperations operations, string resourceGroupName, string serverName, string jobAgentName, JobAgentUpdate parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a list of job agents in a server. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByServerNext(this IJobAgentsOperations operations, string nextPageLink) + { + return operations.ListByServerNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of job agents in a server. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByServerNextAsync(this IJobAgentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServerNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/JobCredentialsOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/JobCredentialsOperations.cs new file mode 100644 index 000000000000..e030fd0a0227 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/JobCredentialsOperations.cs @@ -0,0 +1,1085 @@ +// +// 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; + + /// + /// JobCredentialsOperations operations. + /// + internal partial class JobCredentialsOperations : IServiceOperations, IJobCredentialsOperations + { + /// + /// Initializes a new instance of the JobCredentialsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal JobCredentialsOperations(SqlManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SqlManagementClient + /// + public SqlManagementClient Client { get; private set; } + + /// + /// Gets a list of jobs credentials. + /// + /// + /// 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 job agent. + /// + /// + /// 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>> ListByAgentWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByAgent", 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}/jobAgents/{jobAgentName}/credentials").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _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 jobs credential. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the credential. + /// + /// + /// 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 jobAgentName, string credentialName, 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + if (credentialName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "credentialName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("credentialName", credentialName); + 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}/jobAgents/{jobAgentName}/credentials/{credentialName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _url = _url.Replace("{credentialName}", System.Uri.EscapeDataString(credentialName)); + _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 or updates a job credential. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the credential. + /// + /// + /// The requested job credential state. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, string credentialName, JobCredential 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + if (credentialName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "credentialName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("credentialName", credentialName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _url = _url.Replace("{credentialName}", System.Uri.EscapeDataString(credentialName)); + _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("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes a job credential. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the credential. + /// + /// + /// 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 jobAgentName, string credentialName, 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + if (credentialName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "credentialName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("credentialName", credentialName); + 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}/jobAgents/{jobAgentName}/credentials/{credentialName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _url = _url.Replace("{credentialName}", System.Uri.EscapeDataString(credentialName)); + _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 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets a list of jobs credentials. + /// + /// + /// 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>> ListByAgentNextWithHttpMessagesAsync(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, "ListByAgentNext", 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/JobCredentialsOperationsExtensions.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/JobCredentialsOperationsExtensions.cs new file mode 100644 index 000000000000..201d80b3efad --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/JobCredentialsOperationsExtensions.cs @@ -0,0 +1,272 @@ +// +// 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 JobCredentialsOperations. + /// + public static partial class JobCredentialsOperationsExtensions + { + /// + /// Gets a list of jobs credentials. + /// + /// + /// 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 job agent. + /// + public static IPage ListByAgent(this IJobCredentialsOperations operations, string resourceGroupName, string serverName, string jobAgentName) + { + return operations.ListByAgentAsync(resourceGroupName, serverName, jobAgentName).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of jobs credentials. + /// + /// + /// 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 job agent. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByAgentAsync(this IJobCredentialsOperations operations, string resourceGroupName, string serverName, string jobAgentName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByAgentWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a jobs credential. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the credential. + /// + public static JobCredential Get(this IJobCredentialsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string credentialName) + { + return operations.GetAsync(resourceGroupName, serverName, jobAgentName, credentialName).GetAwaiter().GetResult(); + } + + /// + /// Gets a jobs credential. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the credential. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IJobCredentialsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string credentialName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, credentialName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a job credential. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the credential. + /// + /// + /// The requested job credential state. + /// + public static JobCredential CreateOrUpdate(this IJobCredentialsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string credentialName, JobCredential parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, credentialName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a job credential. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the credential. + /// + /// + /// The requested job credential state. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IJobCredentialsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string credentialName, JobCredential parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, credentialName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a job credential. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the credential. + /// + public static void Delete(this IJobCredentialsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string credentialName) + { + operations.DeleteAsync(resourceGroupName, serverName, jobAgentName, credentialName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a job credential. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the credential. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IJobCredentialsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string credentialName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, credentialName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Gets a list of jobs credentials. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByAgentNext(this IJobCredentialsOperations operations, string nextPageLink) + { + return operations.ListByAgentNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of jobs credentials. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByAgentNextAsync(this IJobCredentialsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByAgentNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/JobExecutionsOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/JobExecutionsOperations.cs new file mode 100644 index 000000000000..f357a5b98afa --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/JobExecutionsOperations.cs @@ -0,0 +1,1862 @@ +// +// 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; + + /// + /// JobExecutionsOperations operations. + /// + internal partial class JobExecutionsOperations : IServiceOperations, IJobExecutionsOperations + { + /// + /// Initializes a new instance of the JobExecutionsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal JobExecutionsOperations(SqlManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SqlManagementClient + /// + public SqlManagementClient Client { get; private set; } + + /// + /// Lists all executions in a job agent. + /// + /// + /// 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 job agent. + /// + /// + /// If specified, only job executions created at or after the specified time + /// are included. + /// + /// + /// If specified, only job executions created before the specified time are + /// included. + /// + /// + /// If specified, only job executions completed at or after the specified time + /// are included. + /// + /// + /// If specified, only job executions completed before the specified time are + /// included. + /// + /// + /// If specified, only active or only completed job executions are included. + /// + /// + /// The number of elements in the collection to skip. + /// + /// + /// The number of elements to return from the collection. + /// + /// + /// 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>> ListByAgentWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, System.DateTime? createTimeMin = default(System.DateTime?), System.DateTime? createTimeMax = default(System.DateTime?), System.DateTime? endTimeMin = default(System.DateTime?), System.DateTime? endTimeMax = default(System.DateTime?), bool? isActive = default(bool?), int? skip = default(int?), int? top = default(int?), 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("createTimeMin", createTimeMin); + tracingParameters.Add("createTimeMax", createTimeMax); + tracingParameters.Add("endTimeMin", endTimeMin); + tracingParameters.Add("endTimeMax", endTimeMax); + tracingParameters.Add("isActive", isActive); + tracingParameters.Add("skip", skip); + tracingParameters.Add("top", top); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByAgent", 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}/jobAgents/{jobAgentName}/executions").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (createTimeMin != null) + { + _queryParameters.Add(string.Format("createTimeMin={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(createTimeMin, Client.SerializationSettings).Trim('"')))); + } + if (createTimeMax != null) + { + _queryParameters.Add(string.Format("createTimeMax={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(createTimeMax, Client.SerializationSettings).Trim('"')))); + } + if (endTimeMin != null) + { + _queryParameters.Add(string.Format("endTimeMin={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(endTimeMin, Client.SerializationSettings).Trim('"')))); + } + if (endTimeMax != null) + { + _queryParameters.Add(string.Format("endTimeMax={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(endTimeMax, Client.SerializationSettings).Trim('"')))); + } + if (isActive != null) + { + _queryParameters.Add(string.Format("isActive={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(isActive, Client.SerializationSettings).Trim('"')))); + } + if (skip != null) + { + _queryParameters.Add(string.Format("$skip={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(skip, Client.SerializationSettings).Trim('"')))); + } + if (top != null) + { + _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(top, Client.SerializationSettings).Trim('"')))); + } + 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; + } + + /// + /// Requests cancellation of a job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job. + /// + /// + /// The id of the job execution to cancel. + /// + /// + /// 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 jobAgentName, string jobName, System.Guid jobExecutionId, 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + if (jobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("jobName", jobName); + tracingParameters.Add("jobExecutionId", jobExecutionId); + 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}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/cancel").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); + _url = _url.Replace("{jobExecutionId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(jobExecutionId, 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; + } + + /// + /// Starts an elastic job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, jobName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Lists a job's executions. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// If specified, only job executions created at or after the specified time + /// are included. + /// + /// + /// If specified, only job executions created before the specified time are + /// included. + /// + /// + /// If specified, only job executions completed at or after the specified time + /// are included. + /// + /// + /// If specified, only job executions completed before the specified time are + /// included. + /// + /// + /// If specified, only active or only completed job executions are included. + /// + /// + /// The number of elements in the collection to skip. + /// + /// + /// The number of elements to return from the collection. + /// + /// + /// 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>> ListByJobWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, string jobName, System.DateTime? createTimeMin = default(System.DateTime?), System.DateTime? createTimeMax = default(System.DateTime?), System.DateTime? endTimeMin = default(System.DateTime?), System.DateTime? endTimeMax = default(System.DateTime?), bool? isActive = default(bool?), int? skip = default(int?), int? top = default(int?), 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + if (jobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("jobName", jobName); + tracingParameters.Add("createTimeMin", createTimeMin); + tracingParameters.Add("createTimeMax", createTimeMax); + tracingParameters.Add("endTimeMin", endTimeMin); + tracingParameters.Add("endTimeMax", endTimeMax); + tracingParameters.Add("isActive", isActive); + tracingParameters.Add("skip", skip); + tracingParameters.Add("top", top); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByJob", 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}/jobAgents/{jobAgentName}/jobs/{jobName}/executions").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (createTimeMin != null) + { + _queryParameters.Add(string.Format("createTimeMin={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(createTimeMin, Client.SerializationSettings).Trim('"')))); + } + if (createTimeMax != null) + { + _queryParameters.Add(string.Format("createTimeMax={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(createTimeMax, Client.SerializationSettings).Trim('"')))); + } + if (endTimeMin != null) + { + _queryParameters.Add(string.Format("endTimeMin={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(endTimeMin, Client.SerializationSettings).Trim('"')))); + } + if (endTimeMax != null) + { + _queryParameters.Add(string.Format("endTimeMax={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(endTimeMax, Client.SerializationSettings).Trim('"')))); + } + if (isActive != null) + { + _queryParameters.Add(string.Format("isActive={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(isActive, Client.SerializationSettings).Trim('"')))); + } + if (skip != null) + { + _queryParameters.Add(string.Format("$skip={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(skip, Client.SerializationSettings).Trim('"')))); + } + if (top != null) + { + _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(top, Client.SerializationSettings).Trim('"')))); + } + 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 job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job. + /// + /// + /// The id of the job execution + /// + /// + /// 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 jobAgentName, string jobName, System.Guid jobExecutionId, 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + if (jobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("jobName", jobName); + tracingParameters.Add("jobExecutionId", jobExecutionId); + 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}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); + _url = _url.Replace("{jobExecutionId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(jobExecutionId, 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("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 or updatess a job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The job execution id to create the job execution under. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, string jobName, System.Guid jobExecutionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Starts an elastic job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// 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 jobAgentName, string jobName, 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + if (jobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("jobName", jobName); + 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}/jobAgents/{jobAgentName}/jobs/{jobName}/start").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); + _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 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or updatess a job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The job execution id to create the job execution under. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, string jobName, System.Guid jobExecutionId, 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + if (jobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("jobName", jobName); + tracingParameters.Add("jobExecutionId", jobExecutionId); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); + _url = _url.Replace("{jobExecutionId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(jobExecutionId, 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("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // 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; + } + + /// + /// Lists all executions in a job agent. + /// + /// + /// 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>> ListByAgentNextWithHttpMessagesAsync(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, "ListByAgentNext", 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; + } + + /// + /// Lists a job's executions. + /// + /// + /// 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>> ListByJobNextWithHttpMessagesAsync(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, "ListByJobNext", 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/JobExecutionsOperationsExtensions.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/JobExecutionsOperationsExtensions.cs new file mode 100644 index 000000000000..11e6982fb153 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/JobExecutionsOperationsExtensions.cs @@ -0,0 +1,640 @@ +// +// 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 JobExecutionsOperations. + /// + public static partial class JobExecutionsOperationsExtensions + { + /// + /// Lists all executions in a job agent. + /// + /// + /// 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 job agent. + /// + /// + /// If specified, only job executions created at or after the specified time + /// are included. + /// + /// + /// If specified, only job executions created before the specified time are + /// included. + /// + /// + /// If specified, only job executions completed at or after the specified time + /// are included. + /// + /// + /// If specified, only job executions completed before the specified time are + /// included. + /// + /// + /// If specified, only active or only completed job executions are included. + /// + /// + /// The number of elements in the collection to skip. + /// + /// + /// The number of elements to return from the collection. + /// + public static IPage ListByAgent(this IJobExecutionsOperations operations, string resourceGroupName, string serverName, string jobAgentName, System.DateTime? createTimeMin = default(System.DateTime?), System.DateTime? createTimeMax = default(System.DateTime?), System.DateTime? endTimeMin = default(System.DateTime?), System.DateTime? endTimeMax = default(System.DateTime?), bool? isActive = default(bool?), int? skip = default(int?), int? top = default(int?)) + { + return operations.ListByAgentAsync(resourceGroupName, serverName, jobAgentName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top).GetAwaiter().GetResult(); + } + + /// + /// Lists all executions in a job agent. + /// + /// + /// 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 job agent. + /// + /// + /// If specified, only job executions created at or after the specified time + /// are included. + /// + /// + /// If specified, only job executions created before the specified time are + /// included. + /// + /// + /// If specified, only job executions completed at or after the specified time + /// are included. + /// + /// + /// If specified, only job executions completed before the specified time are + /// included. + /// + /// + /// If specified, only active or only completed job executions are included. + /// + /// + /// The number of elements in the collection to skip. + /// + /// + /// The number of elements to return from the collection. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByAgentAsync(this IJobExecutionsOperations operations, string resourceGroupName, string serverName, string jobAgentName, System.DateTime? createTimeMin = default(System.DateTime?), System.DateTime? createTimeMax = default(System.DateTime?), System.DateTime? endTimeMin = default(System.DateTime?), System.DateTime? endTimeMax = default(System.DateTime?), bool? isActive = default(bool?), int? skip = default(int?), int? top = default(int?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByAgentWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Requests cancellation of a job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job. + /// + /// + /// The id of the job execution to cancel. + /// + public static void Cancel(this IJobExecutionsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, System.Guid jobExecutionId) + { + operations.CancelAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId).GetAwaiter().GetResult(); + } + + /// + /// Requests cancellation of a job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job. + /// + /// + /// The id of the job execution to cancel. + /// + /// + /// The cancellation token. + /// + public static async Task CancelAsync(this IJobExecutionsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, System.Guid jobExecutionId, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.CancelWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Starts an elastic job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + public static JobExecution Create(this IJobExecutionsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName) + { + return operations.CreateAsync(resourceGroupName, serverName, jobAgentName, jobName).GetAwaiter().GetResult(); + } + + /// + /// Starts an elastic job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The cancellation token. + /// + public static async Task CreateAsync(this IJobExecutionsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, jobName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists a job's executions. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// If specified, only job executions created at or after the specified time + /// are included. + /// + /// + /// If specified, only job executions created before the specified time are + /// included. + /// + /// + /// If specified, only job executions completed at or after the specified time + /// are included. + /// + /// + /// If specified, only job executions completed before the specified time are + /// included. + /// + /// + /// If specified, only active or only completed job executions are included. + /// + /// + /// The number of elements in the collection to skip. + /// + /// + /// The number of elements to return from the collection. + /// + public static IPage ListByJob(this IJobExecutionsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, System.DateTime? createTimeMin = default(System.DateTime?), System.DateTime? createTimeMax = default(System.DateTime?), System.DateTime? endTimeMin = default(System.DateTime?), System.DateTime? endTimeMax = default(System.DateTime?), bool? isActive = default(bool?), int? skip = default(int?), int? top = default(int?)) + { + return operations.ListByJobAsync(resourceGroupName, serverName, jobAgentName, jobName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top).GetAwaiter().GetResult(); + } + + /// + /// Lists a job's executions. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// If specified, only job executions created at or after the specified time + /// are included. + /// + /// + /// If specified, only job executions created before the specified time are + /// included. + /// + /// + /// If specified, only job executions completed at or after the specified time + /// are included. + /// + /// + /// If specified, only job executions completed before the specified time are + /// included. + /// + /// + /// If specified, only active or only completed job executions are included. + /// + /// + /// The number of elements in the collection to skip. + /// + /// + /// The number of elements to return from the collection. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByJobAsync(this IJobExecutionsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, System.DateTime? createTimeMin = default(System.DateTime?), System.DateTime? createTimeMax = default(System.DateTime?), System.DateTime? endTimeMin = default(System.DateTime?), System.DateTime? endTimeMax = default(System.DateTime?), bool? isActive = default(bool?), int? skip = default(int?), int? top = default(int?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByJobWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, jobName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job. + /// + /// + /// The id of the job execution + /// + public static JobExecution Get(this IJobExecutionsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, System.Guid jobExecutionId) + { + return operations.GetAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId).GetAwaiter().GetResult(); + } + + /// + /// Gets a job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job. + /// + /// + /// The id of the job execution + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IJobExecutionsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, System.Guid jobExecutionId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updatess a job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The job execution id to create the job execution under. + /// + public static JobExecution CreateOrUpdate(this IJobExecutionsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, System.Guid jobExecutionId) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId).GetAwaiter().GetResult(); + } + + /// + /// Creates or updatess a job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The job execution id to create the job execution under. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IJobExecutionsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, System.Guid jobExecutionId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Starts an elastic job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + public static JobExecution BeginCreate(this IJobExecutionsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName) + { + return operations.BeginCreateAsync(resourceGroupName, serverName, jobAgentName, jobName).GetAwaiter().GetResult(); + } + + /// + /// Starts an elastic job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateAsync(this IJobExecutionsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, jobName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updatess a job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The job execution id to create the job execution under. + /// + public static JobExecution BeginCreateOrUpdate(this IJobExecutionsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, System.Guid jobExecutionId) + { + return operations.BeginCreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId).GetAwaiter().GetResult(); + } + + /// + /// Creates or updatess a job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The job execution id to create the job execution under. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateOrUpdateAsync(this IJobExecutionsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, System.Guid jobExecutionId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists all executions in a job agent. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByAgentNext(this IJobExecutionsOperations operations, string nextPageLink) + { + return operations.ListByAgentNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists all executions in a job agent. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByAgentNextAsync(this IJobExecutionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByAgentNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists a job's executions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByJobNext(this IJobExecutionsOperations operations, string nextPageLink) + { + return operations.ListByJobNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists a job's executions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByJobNextAsync(this IJobExecutionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByJobNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/JobStepExecutionsOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/JobStepExecutionsOperations.cs new file mode 100644 index 000000000000..9af657b8e146 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/JobStepExecutionsOperations.cs @@ -0,0 +1,732 @@ +// +// 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; + + /// + /// JobStepExecutionsOperations operations. + /// + internal partial class JobStepExecutionsOperations : IServiceOperations, IJobStepExecutionsOperations + { + /// + /// Initializes a new instance of the JobStepExecutionsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal JobStepExecutionsOperations(SqlManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SqlManagementClient + /// + public SqlManagementClient Client { get; private set; } + + /// + /// Lists the step executions of a job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The id of the job execution + /// + /// + /// If specified, only job executions created at or after the specified time + /// are included. + /// + /// + /// If specified, only job executions created before the specified time are + /// included. + /// + /// + /// If specified, only job executions completed at or after the specified time + /// are included. + /// + /// + /// If specified, only job executions completed before the specified time are + /// included. + /// + /// + /// If specified, only active or only completed job executions are included. + /// + /// + /// The number of elements in the collection to skip. + /// + /// + /// The number of elements to return from the collection. + /// + /// + /// 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>> ListByJobExecutionWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, string jobName, System.Guid jobExecutionId, System.DateTime? createTimeMin = default(System.DateTime?), System.DateTime? createTimeMax = default(System.DateTime?), System.DateTime? endTimeMin = default(System.DateTime?), System.DateTime? endTimeMax = default(System.DateTime?), bool? isActive = default(bool?), int? skip = default(int?), int? top = default(int?), 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + if (jobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("jobName", jobName); + tracingParameters.Add("jobExecutionId", jobExecutionId); + tracingParameters.Add("createTimeMin", createTimeMin); + tracingParameters.Add("createTimeMax", createTimeMax); + tracingParameters.Add("endTimeMin", endTimeMin); + tracingParameters.Add("endTimeMax", endTimeMax); + tracingParameters.Add("isActive", isActive); + tracingParameters.Add("skip", skip); + tracingParameters.Add("top", top); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByJobExecution", 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}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); + _url = _url.Replace("{jobExecutionId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(jobExecutionId, Client.SerializationSettings).Trim('"'))); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (createTimeMin != null) + { + _queryParameters.Add(string.Format("createTimeMin={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(createTimeMin, Client.SerializationSettings).Trim('"')))); + } + if (createTimeMax != null) + { + _queryParameters.Add(string.Format("createTimeMax={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(createTimeMax, Client.SerializationSettings).Trim('"')))); + } + if (endTimeMin != null) + { + _queryParameters.Add(string.Format("endTimeMin={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(endTimeMin, Client.SerializationSettings).Trim('"')))); + } + if (endTimeMax != null) + { + _queryParameters.Add(string.Format("endTimeMax={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(endTimeMax, Client.SerializationSettings).Trim('"')))); + } + if (isActive != null) + { + _queryParameters.Add(string.Format("isActive={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(isActive, Client.SerializationSettings).Trim('"')))); + } + if (skip != null) + { + _queryParameters.Add(string.Format("$skip={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(skip, Client.SerializationSettings).Trim('"')))); + } + if (top != null) + { + _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(top, Client.SerializationSettings).Trim('"')))); + } + 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 step execution of a job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The unique id of the job execution + /// + /// + /// The name of the step. + /// + /// + /// 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 jobAgentName, string jobName, System.Guid jobExecutionId, string stepName, 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + if (jobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + } + if (stepName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "stepName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("jobName", jobName); + tracingParameters.Add("jobExecutionId", jobExecutionId); + tracingParameters.Add("stepName", stepName); + 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}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); + _url = _url.Replace("{jobExecutionId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(jobExecutionId, Client.SerializationSettings).Trim('"'))); + _url = _url.Replace("{stepName}", System.Uri.EscapeDataString(stepName)); + _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; + } + + /// + /// Lists the step executions of a job execution. + /// + /// + /// 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>> ListByJobExecutionNextWithHttpMessagesAsync(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, "ListByJobExecutionNext", 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/JobStepExecutionsOperationsExtensions.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/JobStepExecutionsOperationsExtensions.cs new file mode 100644 index 000000000000..57c38c69f208 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/JobStepExecutionsOperationsExtensions.cs @@ -0,0 +1,235 @@ +// +// 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 JobStepExecutionsOperations. + /// + public static partial class JobStepExecutionsOperationsExtensions + { + /// + /// Lists the step executions of a job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The id of the job execution + /// + /// + /// If specified, only job executions created at or after the specified time + /// are included. + /// + /// + /// If specified, only job executions created before the specified time are + /// included. + /// + /// + /// If specified, only job executions completed at or after the specified time + /// are included. + /// + /// + /// If specified, only job executions completed before the specified time are + /// included. + /// + /// + /// If specified, only active or only completed job executions are included. + /// + /// + /// The number of elements in the collection to skip. + /// + /// + /// The number of elements to return from the collection. + /// + public static IPage ListByJobExecution(this IJobStepExecutionsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, System.Guid jobExecutionId, System.DateTime? createTimeMin = default(System.DateTime?), System.DateTime? createTimeMax = default(System.DateTime?), System.DateTime? endTimeMin = default(System.DateTime?), System.DateTime? endTimeMax = default(System.DateTime?), bool? isActive = default(bool?), int? skip = default(int?), int? top = default(int?)) + { + return operations.ListByJobExecutionAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top).GetAwaiter().GetResult(); + } + + /// + /// Lists the step executions of a job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The id of the job execution + /// + /// + /// If specified, only job executions created at or after the specified time + /// are included. + /// + /// + /// If specified, only job executions created before the specified time are + /// included. + /// + /// + /// If specified, only job executions completed at or after the specified time + /// are included. + /// + /// + /// If specified, only job executions completed before the specified time are + /// included. + /// + /// + /// If specified, only active or only completed job executions are included. + /// + /// + /// The number of elements in the collection to skip. + /// + /// + /// The number of elements to return from the collection. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByJobExecutionAsync(this IJobStepExecutionsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, System.Guid jobExecutionId, System.DateTime? createTimeMin = default(System.DateTime?), System.DateTime? createTimeMax = default(System.DateTime?), System.DateTime? endTimeMin = default(System.DateTime?), System.DateTime? endTimeMax = default(System.DateTime?), bool? isActive = default(bool?), int? skip = default(int?), int? top = default(int?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByJobExecutionWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a step execution of a job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The unique id of the job execution + /// + /// + /// The name of the step. + /// + public static JobExecution Get(this IJobStepExecutionsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, System.Guid jobExecutionId, string stepName) + { + return operations.GetAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName).GetAwaiter().GetResult(); + } + + /// + /// Gets a step execution of a job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The unique id of the job execution + /// + /// + /// The name of the step. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IJobStepExecutionsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, System.Guid jobExecutionId, string stepName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists the step executions of a job execution. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByJobExecutionNext(this IJobStepExecutionsOperations operations, string nextPageLink) + { + return operations.ListByJobExecutionNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists the step executions of a job execution. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByJobExecutionNextAsync(this IJobStepExecutionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByJobExecutionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/JobStepsOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/JobStepsOperations.cs new file mode 100644 index 000000000000..1bc81f5513c0 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/JobStepsOperations.cs @@ -0,0 +1,1740 @@ +// +// 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; + + /// + /// JobStepsOperations operations. + /// + internal partial class JobStepsOperations : IServiceOperations, IJobStepsOperations + { + /// + /// Initializes a new instance of the JobStepsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal JobStepsOperations(SqlManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SqlManagementClient + /// + public SqlManagementClient Client { get; private set; } + + /// + /// Gets all job steps in the specified job version. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The version of the job to get. + /// + /// + /// 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>> ListByVersionWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, string jobName, int jobVersion, 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + if (jobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("jobName", jobName); + tracingParameters.Add("jobVersion", jobVersion); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByVersion", 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}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); + _url = _url.Replace("{jobVersion}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(jobVersion, 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("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 the specified version of a job step. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job. + /// + /// + /// The version of the job to get. + /// + /// + /// The name of the job step. + /// + /// + /// 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> GetByVersionWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, string jobName, int jobVersion, string stepName, 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + if (jobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + } + if (stepName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "stepName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("jobName", jobName); + tracingParameters.Add("jobVersion", jobVersion); + tracingParameters.Add("stepName", stepName); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetByVersion", 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}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps/{stepName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); + _url = _url.Replace("{jobVersion}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(jobVersion, Client.SerializationSettings).Trim('"'))); + _url = _url.Replace("{stepName}", System.Uri.EscapeDataString(stepName)); + _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 all job steps for a job's current version. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// 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>> ListByJobWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, string jobName, 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + if (jobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("jobName", jobName); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByJob", 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}/jobAgents/{jobAgentName}/jobs/{jobName}/steps").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); + _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 job step in a job's current version. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job. + /// + /// + /// The name of the job step. + /// + /// + /// 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 jobAgentName, string jobName, string stepName, 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + if (jobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + } + if (stepName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "stepName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("jobName", jobName); + tracingParameters.Add("stepName", stepName); + 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}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); + _url = _url.Replace("{stepName}", System.Uri.EscapeDataString(stepName)); + _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 or updates a job step. This will implicitly create a new job + /// version. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job. + /// + /// + /// The name of the job step. + /// + /// + /// The requested state of the job step. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, string jobName, string stepName, JobStep 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + if (jobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + } + if (stepName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "stepName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("jobName", jobName); + tracingParameters.Add("stepName", stepName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); + _url = _url.Replace("{stepName}", System.Uri.EscapeDataString(stepName)); + _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("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes a job step. This will implicitly create a new job version. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job. + /// + /// + /// The name of the job step to delete. + /// + /// + /// 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 jobAgentName, string jobName, string stepName, 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + if (jobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + } + if (stepName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "stepName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("jobName", jobName); + tracingParameters.Add("stepName", stepName); + 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}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); + _url = _url.Replace("{stepName}", System.Uri.EscapeDataString(stepName)); + _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 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets all job steps in the specified job version. + /// + /// + /// 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>> ListByVersionNextWithHttpMessagesAsync(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, "ListByVersionNext", 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; + } + + /// + /// Gets all job steps for a job's current version. + /// + /// + /// 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>> ListByJobNextWithHttpMessagesAsync(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, "ListByJobNext", 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/JobStepsOperationsExtensions.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/JobStepsOperationsExtensions.cs new file mode 100644 index 000000000000..1da13d7365d4 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/JobStepsOperationsExtensions.cs @@ -0,0 +1,458 @@ +// +// 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 JobStepsOperations. + /// + public static partial class JobStepsOperationsExtensions + { + /// + /// Gets all job steps in the specified job version. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The version of the job to get. + /// + public static IPage ListByVersion(this IJobStepsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, int jobVersion) + { + return operations.ListByVersionAsync(resourceGroupName, serverName, jobAgentName, jobName, jobVersion).GetAwaiter().GetResult(); + } + + /// + /// Gets all job steps in the specified job version. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The version of the job to get. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByVersionAsync(this IJobStepsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, int jobVersion, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByVersionWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, jobName, jobVersion, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the specified version of a job step. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job. + /// + /// + /// The version of the job to get. + /// + /// + /// The name of the job step. + /// + public static JobStep GetByVersion(this IJobStepsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, int jobVersion, string stepName) + { + return operations.GetByVersionAsync(resourceGroupName, serverName, jobAgentName, jobName, jobVersion, stepName).GetAwaiter().GetResult(); + } + + /// + /// Gets the specified version of a job step. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job. + /// + /// + /// The version of the job to get. + /// + /// + /// The name of the job step. + /// + /// + /// The cancellation token. + /// + public static async Task GetByVersionAsync(this IJobStepsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, int jobVersion, string stepName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetByVersionWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, jobName, jobVersion, stepName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets all job steps for a job's current version. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + public static IPage ListByJob(this IJobStepsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName) + { + return operations.ListByJobAsync(resourceGroupName, serverName, jobAgentName, jobName).GetAwaiter().GetResult(); + } + + /// + /// Gets all job steps for a job's current version. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByJobAsync(this IJobStepsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByJobWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, jobName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a job step in a job's current version. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job. + /// + /// + /// The name of the job step. + /// + public static JobStep Get(this IJobStepsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, string stepName) + { + return operations.GetAsync(resourceGroupName, serverName, jobAgentName, jobName, stepName).GetAwaiter().GetResult(); + } + + /// + /// Gets a job step in a job's current version. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job. + /// + /// + /// The name of the job step. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IJobStepsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, string stepName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, jobName, stepName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a job step. This will implicitly create a new job + /// version. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job. + /// + /// + /// The name of the job step. + /// + /// + /// The requested state of the job step. + /// + public static JobStep CreateOrUpdate(this IJobStepsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, string stepName, JobStep parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, jobName, stepName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a job step. This will implicitly create a new job + /// version. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job. + /// + /// + /// The name of the job step. + /// + /// + /// The requested state of the job step. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IJobStepsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, string stepName, JobStep parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, jobName, stepName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a job step. This will implicitly create a new job version. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job. + /// + /// + /// The name of the job step to delete. + /// + public static void Delete(this IJobStepsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, string stepName) + { + operations.DeleteAsync(resourceGroupName, serverName, jobAgentName, jobName, stepName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a job step. This will implicitly create a new job version. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job. + /// + /// + /// The name of the job step to delete. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IJobStepsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, string stepName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, jobName, stepName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Gets all job steps in the specified job version. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByVersionNext(this IJobStepsOperations operations, string nextPageLink) + { + return operations.ListByVersionNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets all job steps in the specified job version. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByVersionNextAsync(this IJobStepsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByVersionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets all job steps for a job's current version. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByJobNext(this IJobStepsOperations operations, string nextPageLink) + { + return operations.ListByJobNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets all job steps for a job's current version. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByJobNextAsync(this IJobStepsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByJobNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/JobTargetExecutionsOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/JobTargetExecutionsOperations.cs new file mode 100644 index 000000000000..d4817fd08a08 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/JobTargetExecutionsOperations.cs @@ -0,0 +1,1197 @@ +// +// 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; + + /// + /// JobTargetExecutionsOperations operations. + /// + internal partial class JobTargetExecutionsOperations : IServiceOperations, IJobTargetExecutionsOperations + { + /// + /// Initializes a new instance of the JobTargetExecutionsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal JobTargetExecutionsOperations(SqlManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SqlManagementClient + /// + public SqlManagementClient Client { get; private set; } + + /// + /// Lists target executions for all steps of a job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The id of the job execution + /// + /// + /// If specified, only job executions created at or after the specified time + /// are included. + /// + /// + /// If specified, only job executions created before the specified time are + /// included. + /// + /// + /// If specified, only job executions completed at or after the specified time + /// are included. + /// + /// + /// If specified, only job executions completed before the specified time are + /// included. + /// + /// + /// If specified, only active or only completed job executions are included. + /// + /// + /// The number of elements in the collection to skip. + /// + /// + /// The number of elements to return from the collection. + /// + /// + /// 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>> ListByJobExecutionWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, string jobName, System.Guid jobExecutionId, System.DateTime? createTimeMin = default(System.DateTime?), System.DateTime? createTimeMax = default(System.DateTime?), System.DateTime? endTimeMin = default(System.DateTime?), System.DateTime? endTimeMax = default(System.DateTime?), bool? isActive = default(bool?), int? skip = default(int?), int? top = default(int?), 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + if (jobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("jobName", jobName); + tracingParameters.Add("jobExecutionId", jobExecutionId); + tracingParameters.Add("createTimeMin", createTimeMin); + tracingParameters.Add("createTimeMax", createTimeMax); + tracingParameters.Add("endTimeMin", endTimeMin); + tracingParameters.Add("endTimeMax", endTimeMax); + tracingParameters.Add("isActive", isActive); + tracingParameters.Add("skip", skip); + tracingParameters.Add("top", top); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByJobExecution", 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}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/targets").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); + _url = _url.Replace("{jobExecutionId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(jobExecutionId, Client.SerializationSettings).Trim('"'))); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (createTimeMin != null) + { + _queryParameters.Add(string.Format("createTimeMin={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(createTimeMin, Client.SerializationSettings).Trim('"')))); + } + if (createTimeMax != null) + { + _queryParameters.Add(string.Format("createTimeMax={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(createTimeMax, Client.SerializationSettings).Trim('"')))); + } + if (endTimeMin != null) + { + _queryParameters.Add(string.Format("endTimeMin={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(endTimeMin, Client.SerializationSettings).Trim('"')))); + } + if (endTimeMax != null) + { + _queryParameters.Add(string.Format("endTimeMax={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(endTimeMax, Client.SerializationSettings).Trim('"')))); + } + if (isActive != null) + { + _queryParameters.Add(string.Format("isActive={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(isActive, Client.SerializationSettings).Trim('"')))); + } + if (skip != null) + { + _queryParameters.Add(string.Format("$skip={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(skip, Client.SerializationSettings).Trim('"')))); + } + if (top != null) + { + _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(top, Client.SerializationSettings).Trim('"')))); + } + 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; + } + + /// + /// Lists the target executions of a job step execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The id of the job execution + /// + /// + /// The name of the step. + /// + /// + /// If specified, only job executions created at or after the specified time + /// are included. + /// + /// + /// If specified, only job executions created before the specified time are + /// included. + /// + /// + /// If specified, only job executions completed at or after the specified time + /// are included. + /// + /// + /// If specified, only job executions completed before the specified time are + /// included. + /// + /// + /// If specified, only active or only completed job executions are included. + /// + /// + /// The number of elements in the collection to skip. + /// + /// + /// The number of elements to return from the collection. + /// + /// + /// 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>> ListByStepWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, string jobName, System.Guid jobExecutionId, string stepName, System.DateTime? createTimeMin = default(System.DateTime?), System.DateTime? createTimeMax = default(System.DateTime?), System.DateTime? endTimeMin = default(System.DateTime?), System.DateTime? endTimeMax = default(System.DateTime?), bool? isActive = default(bool?), int? skip = default(int?), int? top = default(int?), 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + if (jobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + } + if (stepName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "stepName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("jobName", jobName); + tracingParameters.Add("jobExecutionId", jobExecutionId); + tracingParameters.Add("stepName", stepName); + tracingParameters.Add("createTimeMin", createTimeMin); + tracingParameters.Add("createTimeMax", createTimeMax); + tracingParameters.Add("endTimeMin", endTimeMin); + tracingParameters.Add("endTimeMax", endTimeMax); + tracingParameters.Add("isActive", isActive); + tracingParameters.Add("skip", skip); + tracingParameters.Add("top", top); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByStep", 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}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); + _url = _url.Replace("{jobExecutionId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(jobExecutionId, Client.SerializationSettings).Trim('"'))); + _url = _url.Replace("{stepName}", System.Uri.EscapeDataString(stepName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (createTimeMin != null) + { + _queryParameters.Add(string.Format("createTimeMin={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(createTimeMin, Client.SerializationSettings).Trim('"')))); + } + if (createTimeMax != null) + { + _queryParameters.Add(string.Format("createTimeMax={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(createTimeMax, Client.SerializationSettings).Trim('"')))); + } + if (endTimeMin != null) + { + _queryParameters.Add(string.Format("endTimeMin={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(endTimeMin, Client.SerializationSettings).Trim('"')))); + } + if (endTimeMax != null) + { + _queryParameters.Add(string.Format("endTimeMax={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(endTimeMax, Client.SerializationSettings).Trim('"')))); + } + if (isActive != null) + { + _queryParameters.Add(string.Format("isActive={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(isActive, Client.SerializationSettings).Trim('"')))); + } + if (skip != null) + { + _queryParameters.Add(string.Format("$skip={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(skip, Client.SerializationSettings).Trim('"')))); + } + if (top != null) + { + _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(top, Client.SerializationSettings).Trim('"')))); + } + 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 target execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The unique id of the job execution + /// + /// + /// The name of the step. + /// + /// + /// The target id. + /// + /// + /// 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 jobAgentName, string jobName, System.Guid jobExecutionId, string stepName, System.Guid targetId, 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + if (jobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + } + if (stepName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "stepName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("jobName", jobName); + tracingParameters.Add("jobExecutionId", jobExecutionId); + tracingParameters.Add("stepName", stepName); + tracingParameters.Add("targetId", targetId); + 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}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets/{targetId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); + _url = _url.Replace("{jobExecutionId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(jobExecutionId, Client.SerializationSettings).Trim('"'))); + _url = _url.Replace("{stepName}", System.Uri.EscapeDataString(stepName)); + _url = _url.Replace("{targetId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(targetId, 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("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; + } + + /// + /// Lists target executions for all steps of a job execution. + /// + /// + /// 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>> ListByJobExecutionNextWithHttpMessagesAsync(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, "ListByJobExecutionNext", 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; + } + + /// + /// Lists the target executions of a job step execution. + /// + /// + /// 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>> ListByStepNextWithHttpMessagesAsync(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, "ListByStepNext", 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/JobTargetExecutionsOperationsExtensions.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/JobTargetExecutionsOperationsExtensions.cs new file mode 100644 index 000000000000..98b6476e6199 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/JobTargetExecutionsOperationsExtensions.cs @@ -0,0 +1,391 @@ +// +// 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 JobTargetExecutionsOperations. + /// + public static partial class JobTargetExecutionsOperationsExtensions + { + /// + /// Lists target executions for all steps of a job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The id of the job execution + /// + /// + /// If specified, only job executions created at or after the specified time + /// are included. + /// + /// + /// If specified, only job executions created before the specified time are + /// included. + /// + /// + /// If specified, only job executions completed at or after the specified time + /// are included. + /// + /// + /// If specified, only job executions completed before the specified time are + /// included. + /// + /// + /// If specified, only active or only completed job executions are included. + /// + /// + /// The number of elements in the collection to skip. + /// + /// + /// The number of elements to return from the collection. + /// + public static IPage ListByJobExecution(this IJobTargetExecutionsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, System.Guid jobExecutionId, System.DateTime? createTimeMin = default(System.DateTime?), System.DateTime? createTimeMax = default(System.DateTime?), System.DateTime? endTimeMin = default(System.DateTime?), System.DateTime? endTimeMax = default(System.DateTime?), bool? isActive = default(bool?), int? skip = default(int?), int? top = default(int?)) + { + return operations.ListByJobExecutionAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top).GetAwaiter().GetResult(); + } + + /// + /// Lists target executions for all steps of a job execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The id of the job execution + /// + /// + /// If specified, only job executions created at or after the specified time + /// are included. + /// + /// + /// If specified, only job executions created before the specified time are + /// included. + /// + /// + /// If specified, only job executions completed at or after the specified time + /// are included. + /// + /// + /// If specified, only job executions completed before the specified time are + /// included. + /// + /// + /// If specified, only active or only completed job executions are included. + /// + /// + /// The number of elements in the collection to skip. + /// + /// + /// The number of elements to return from the collection. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByJobExecutionAsync(this IJobTargetExecutionsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, System.Guid jobExecutionId, System.DateTime? createTimeMin = default(System.DateTime?), System.DateTime? createTimeMax = default(System.DateTime?), System.DateTime? endTimeMin = default(System.DateTime?), System.DateTime? endTimeMax = default(System.DateTime?), bool? isActive = default(bool?), int? skip = default(int?), int? top = default(int?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByJobExecutionWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists the target executions of a job step execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The id of the job execution + /// + /// + /// The name of the step. + /// + /// + /// If specified, only job executions created at or after the specified time + /// are included. + /// + /// + /// If specified, only job executions created before the specified time are + /// included. + /// + /// + /// If specified, only job executions completed at or after the specified time + /// are included. + /// + /// + /// If specified, only job executions completed before the specified time are + /// included. + /// + /// + /// If specified, only active or only completed job executions are included. + /// + /// + /// The number of elements in the collection to skip. + /// + /// + /// The number of elements to return from the collection. + /// + public static IPage ListByStep(this IJobTargetExecutionsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, System.Guid jobExecutionId, string stepName, System.DateTime? createTimeMin = default(System.DateTime?), System.DateTime? createTimeMax = default(System.DateTime?), System.DateTime? endTimeMin = default(System.DateTime?), System.DateTime? endTimeMax = default(System.DateTime?), bool? isActive = default(bool?), int? skip = default(int?), int? top = default(int?)) + { + return operations.ListByStepAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top).GetAwaiter().GetResult(); + } + + /// + /// Lists the target executions of a job step execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The id of the job execution + /// + /// + /// The name of the step. + /// + /// + /// If specified, only job executions created at or after the specified time + /// are included. + /// + /// + /// If specified, only job executions created before the specified time are + /// included. + /// + /// + /// If specified, only job executions completed at or after the specified time + /// are included. + /// + /// + /// If specified, only job executions completed before the specified time are + /// included. + /// + /// + /// If specified, only active or only completed job executions are included. + /// + /// + /// The number of elements in the collection to skip. + /// + /// + /// The number of elements to return from the collection. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByStepAsync(this IJobTargetExecutionsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, System.Guid jobExecutionId, string stepName, System.DateTime? createTimeMin = default(System.DateTime?), System.DateTime? createTimeMax = default(System.DateTime?), System.DateTime? endTimeMin = default(System.DateTime?), System.DateTime? endTimeMax = default(System.DateTime?), bool? isActive = default(bool?), int? skip = default(int?), int? top = default(int?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByStepWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a target execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The unique id of the job execution + /// + /// + /// The name of the step. + /// + /// + /// The target id. + /// + public static JobExecution Get(this IJobTargetExecutionsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, System.Guid jobExecutionId, string stepName, System.Guid targetId) + { + return operations.GetAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName, targetId).GetAwaiter().GetResult(); + } + + /// + /// Gets a target execution. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The unique id of the job execution + /// + /// + /// The name of the step. + /// + /// + /// The target id. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IJobTargetExecutionsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, System.Guid jobExecutionId, string stepName, System.Guid targetId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName, targetId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists target executions for all steps of a job execution. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByJobExecutionNext(this IJobTargetExecutionsOperations operations, string nextPageLink) + { + return operations.ListByJobExecutionNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists target executions for all steps of a job execution. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByJobExecutionNextAsync(this IJobTargetExecutionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByJobExecutionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists the target executions of a job step execution. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByStepNext(this IJobTargetExecutionsOperations operations, string nextPageLink) + { + return operations.ListByStepNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists the target executions of a job step execution. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByStepNextAsync(this IJobTargetExecutionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByStepNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/JobTargetGroupsOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/JobTargetGroupsOperations.cs new file mode 100644 index 000000000000..38240af52680 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/JobTargetGroupsOperations.cs @@ -0,0 +1,1085 @@ +// +// 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; + + /// + /// JobTargetGroupsOperations operations. + /// + internal partial class JobTargetGroupsOperations : IServiceOperations, IJobTargetGroupsOperations + { + /// + /// Initializes a new instance of the JobTargetGroupsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal JobTargetGroupsOperations(SqlManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SqlManagementClient + /// + public SqlManagementClient Client { get; private set; } + + /// + /// Gets all target groups in an agent. + /// + /// + /// 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 job agent. + /// + /// + /// 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>> ListByAgentWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByAgent", 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}/jobAgents/{jobAgentName}/targetGroups").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _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 target group. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the target group. + /// + /// + /// 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 jobAgentName, string targetGroupName, 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + if (targetGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "targetGroupName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("targetGroupName", targetGroupName); + 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}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _url = _url.Replace("{targetGroupName}", System.Uri.EscapeDataString(targetGroupName)); + _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 or updates a target group. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the target group. + /// + /// + /// The requested state of the target group. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, string targetGroupName, JobTargetGroup 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + if (targetGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "targetGroupName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("targetGroupName", targetGroupName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _url = _url.Replace("{targetGroupName}", System.Uri.EscapeDataString(targetGroupName)); + _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("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes a target group. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the target group. + /// + /// + /// 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 jobAgentName, string targetGroupName, 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + if (targetGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "targetGroupName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("targetGroupName", targetGroupName); + 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}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _url = _url.Replace("{targetGroupName}", System.Uri.EscapeDataString(targetGroupName)); + _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 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets all target groups in an agent. + /// + /// + /// 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>> ListByAgentNextWithHttpMessagesAsync(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, "ListByAgentNext", 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/JobTargetGroupsOperationsExtensions.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/JobTargetGroupsOperationsExtensions.cs new file mode 100644 index 000000000000..21cc86013942 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/JobTargetGroupsOperationsExtensions.cs @@ -0,0 +1,272 @@ +// +// 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 JobTargetGroupsOperations. + /// + public static partial class JobTargetGroupsOperationsExtensions + { + /// + /// Gets all target groups in an agent. + /// + /// + /// 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 job agent. + /// + public static IPage ListByAgent(this IJobTargetGroupsOperations operations, string resourceGroupName, string serverName, string jobAgentName) + { + return operations.ListByAgentAsync(resourceGroupName, serverName, jobAgentName).GetAwaiter().GetResult(); + } + + /// + /// Gets all target groups in an agent. + /// + /// + /// 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 job agent. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByAgentAsync(this IJobTargetGroupsOperations operations, string resourceGroupName, string serverName, string jobAgentName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByAgentWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a target group. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the target group. + /// + public static JobTargetGroup Get(this IJobTargetGroupsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string targetGroupName) + { + return operations.GetAsync(resourceGroupName, serverName, jobAgentName, targetGroupName).GetAwaiter().GetResult(); + } + + /// + /// Gets a target group. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the target group. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IJobTargetGroupsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string targetGroupName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, targetGroupName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a target group. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the target group. + /// + /// + /// The requested state of the target group. + /// + public static JobTargetGroup CreateOrUpdate(this IJobTargetGroupsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string targetGroupName, JobTargetGroup parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, targetGroupName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a target group. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the target group. + /// + /// + /// The requested state of the target group. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IJobTargetGroupsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string targetGroupName, JobTargetGroup parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, targetGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a target group. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the target group. + /// + public static void Delete(this IJobTargetGroupsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string targetGroupName) + { + operations.DeleteAsync(resourceGroupName, serverName, jobAgentName, targetGroupName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a target group. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the target group. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IJobTargetGroupsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string targetGroupName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, targetGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Gets all target groups in an agent. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByAgentNext(this IJobTargetGroupsOperations operations, string nextPageLink) + { + return operations.ListByAgentNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets all target groups in an agent. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByAgentNextAsync(this IJobTargetGroupsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByAgentNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/JobVersionsOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/JobVersionsOperations.cs new file mode 100644 index 000000000000..95c25514ce53 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/JobVersionsOperations.cs @@ -0,0 +1,658 @@ +// +// 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; + + /// + /// JobVersionsOperations operations. + /// + internal partial class JobVersionsOperations : IServiceOperations, IJobVersionsOperations + { + /// + /// Initializes a new instance of the JobVersionsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal JobVersionsOperations(SqlManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SqlManagementClient + /// + public SqlManagementClient Client { get; private set; } + + /// + /// Gets all versions of a job. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// 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>> ListByJobWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, string jobName, 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + if (jobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("jobName", jobName); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByJob", 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}/jobAgents/{jobAgentName}/jobs/{jobName}/versions").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); + _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 job version. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job. + /// + /// + /// The version of the job to get. + /// + /// + /// 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 jobAgentName, string jobName, int jobVersion, 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + if (jobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("jobName", jobName); + tracingParameters.Add("jobVersion", jobVersion); + 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}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); + _url = _url.Replace("{jobVersion}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(jobVersion, 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("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 all versions of a job. + /// + /// + /// 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>> ListByJobNextWithHttpMessagesAsync(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, "ListByJobNext", 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/JobVersionsOperationsExtensions.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/JobVersionsOperationsExtensions.cs new file mode 100644 index 000000000000..c43416b642a1 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/JobVersionsOperationsExtensions.cs @@ -0,0 +1,173 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// 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 JobVersionsOperations. + /// + public static partial class JobVersionsOperationsExtensions + { + /// + /// Gets all versions of a job. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + public static IPage ListByJob(this IJobVersionsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName) + { + return operations.ListByJobAsync(resourceGroupName, serverName, jobAgentName, jobName).GetAwaiter().GetResult(); + } + + /// + /// Gets all versions of a job. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByJobAsync(this IJobVersionsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByJobWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, jobName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a job version. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job. + /// + /// + /// The version of the job to get. + /// + public static JobVersion Get(this IJobVersionsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, int jobVersion) + { + return operations.GetAsync(resourceGroupName, serverName, jobAgentName, jobName, jobVersion).GetAwaiter().GetResult(); + } + + /// + /// Gets a job version. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job. + /// + /// + /// The version of the job to get. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IJobVersionsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, int jobVersion, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, jobName, jobVersion, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets all versions of a job. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByJobNext(this IJobVersionsOperations operations, string nextPageLink) + { + return operations.ListByJobNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets all versions of a job. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByJobNextAsync(this IJobVersionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByJobNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/JobsOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/JobsOperations.cs new file mode 100644 index 000000000000..c332ef3b62ae --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/JobsOperations.cs @@ -0,0 +1,1081 @@ +// +// 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; + + /// + /// JobsOperations operations. + /// + internal partial class JobsOperations : IServiceOperations, IJobsOperations + { + /// + /// Initializes a new instance of the JobsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal JobsOperations(SqlManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SqlManagementClient + /// + public SqlManagementClient Client { get; private set; } + + /// + /// Gets a list of jobs. + /// + /// + /// 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 job agent. + /// + /// + /// 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>> ListByAgentWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByAgent", 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}/jobAgents/{jobAgentName}/jobs").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _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 job. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// 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 jobAgentName, string jobName, 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + if (jobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("jobName", jobName); + 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}/jobAgents/{jobAgentName}/jobs/{jobName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); + _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 or updates a job. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The requested job state. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string jobAgentName, string jobName, Job 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + if (jobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("jobName", jobName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); + _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("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes a job. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to delete. + /// + /// + /// 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 jobAgentName, string jobName, 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 (jobAgentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobAgentName"); + } + if (jobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + } + 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("jobAgentName", jobAgentName); + tracingParameters.Add("jobName", jobName); + 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}/jobAgents/{jobAgentName}/jobs/{jobName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{jobAgentName}", System.Uri.EscapeDataString(jobAgentName)); + _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); + _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 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets a list of jobs. + /// + /// + /// 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>> ListByAgentNextWithHttpMessagesAsync(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, "ListByAgentNext", 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/JobsOperationsExtensions.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/JobsOperationsExtensions.cs new file mode 100644 index 000000000000..2382754e9bea --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/JobsOperationsExtensions.cs @@ -0,0 +1,272 @@ +// +// 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 JobsOperations. + /// + public static partial class JobsOperationsExtensions + { + /// + /// Gets a list of jobs. + /// + /// + /// 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 job agent. + /// + public static IPage ListByAgent(this IJobsOperations operations, string resourceGroupName, string serverName, string jobAgentName) + { + return operations.ListByAgentAsync(resourceGroupName, serverName, jobAgentName).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of jobs. + /// + /// + /// 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 job agent. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByAgentAsync(this IJobsOperations operations, string resourceGroupName, string serverName, string jobAgentName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByAgentWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a job. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + public static Job Get(this IJobsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName) + { + return operations.GetAsync(resourceGroupName, serverName, jobAgentName, jobName).GetAwaiter().GetResult(); + } + + /// + /// Gets a job. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IJobsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, jobName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a job. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The requested job state. + /// + public static Job CreateOrUpdate(this IJobsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, Job parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, jobName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a job. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to get. + /// + /// + /// The requested job state. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IJobsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, Job parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, jobName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a job. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to delete. + /// + public static void Delete(this IJobsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName) + { + operations.DeleteAsync(resourceGroupName, serverName, jobAgentName, jobName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a job. + /// + /// + /// 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 job agent. + /// + /// + /// The name of the job to delete. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IJobsOperations operations, string resourceGroupName, string serverName, string jobAgentName, string jobName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, jobAgentName, jobName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Gets a list of jobs. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByAgentNext(this IJobsOperations operations, string nextPageLink) + { + return operations.ListByAgentNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of jobs. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByAgentNextAsync(this IJobsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByAgentNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/DatabaseVulnerabilityAssessment.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/DatabaseVulnerabilityAssessment.cs new file mode 100644 index 000000000000..7c06d83df98d --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/DatabaseVulnerabilityAssessment.cs @@ -0,0 +1,83 @@ +// +// 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 database vulnerability assessment. + /// + [Rest.Serialization.JsonTransformation] + public partial class DatabaseVulnerabilityAssessment : ProxyResource + { + /// + /// Initializes a new instance of the DatabaseVulnerabilityAssessment + /// class. + /// + public DatabaseVulnerabilityAssessment() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DatabaseVulnerabilityAssessment + /// class. + /// + /// Resource ID. + /// Resource name. + /// Resource type. + /// A blob storage container path to + /// hold the scan results (e.g. + /// https://myStorage.blob.core.windows.net/VaScans/). + /// A shared access signature (SAS + /// Key) that has write access to the blob container specified in + /// 'storageContainerPath' parameter. + /// The recurring scans settings + public DatabaseVulnerabilityAssessment(string id = default(string), string name = default(string), string type = default(string), string storageContainerPath = default(string), string storageContainerSasKey = default(string), VulnerabilityAssessmentRecurringScansProperties recurringScans = default(VulnerabilityAssessmentRecurringScansProperties)) + : base(id, name, type) + { + StorageContainerPath = storageContainerPath; + StorageContainerSasKey = storageContainerSasKey; + RecurringScans = recurringScans; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a blob storage container path to hold the scan results + /// (e.g. https://myStorage.blob.core.windows.net/VaScans/). + /// + [JsonProperty(PropertyName = "properties.storageContainerPath")] + public string StorageContainerPath { get; set; } + + /// + /// Gets or sets a shared access signature (SAS Key) that has write + /// access to the blob container specified in 'storageContainerPath' + /// parameter. + /// + [JsonProperty(PropertyName = "properties.storageContainerSasKey")] + public string StorageContainerSasKey { get; set; } + + /// + /// Gets or sets the recurring scans settings + /// + [JsonProperty(PropertyName = "properties.recurringScans")] + public VulnerabilityAssessmentRecurringScansProperties RecurringScans { get; set; } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/DatabaseVulnerabilityAssessmentRuleBaseline.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/DatabaseVulnerabilityAssessmentRuleBaseline.cs new file mode 100644 index 000000000000..c986ecdc847f --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/DatabaseVulnerabilityAssessmentRuleBaseline.cs @@ -0,0 +1,85 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Sql.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A database vulnerability assessment rule baseline. + /// + [Rest.Serialization.JsonTransformation] + public partial class DatabaseVulnerabilityAssessmentRuleBaseline : ProxyResource + { + /// + /// Initializes a new instance of the + /// DatabaseVulnerabilityAssessmentRuleBaseline class. + /// + public DatabaseVulnerabilityAssessmentRuleBaseline() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// DatabaseVulnerabilityAssessmentRuleBaseline class. + /// + /// The rule baseline result + /// Resource ID. + /// Resource name. + /// Resource type. + public DatabaseVulnerabilityAssessmentRuleBaseline(IList baselineResults, string id = default(string), string name = default(string), string type = default(string)) + : base(id, name, type) + { + BaselineResults = baselineResults; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the rule baseline result + /// + [JsonProperty(PropertyName = "properties.baselineResults")] + public IList BaselineResults { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (BaselineResults == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "BaselineResults"); + } + if (BaselineResults != null) + { + foreach (var element in BaselineResults) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/DatabaseVulnerabilityAssessmentRuleBaselineItem.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/DatabaseVulnerabilityAssessmentRuleBaselineItem.cs new file mode 100644 index 000000000000..0b771e41c74b --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/DatabaseVulnerabilityAssessmentRuleBaselineItem.cs @@ -0,0 +1,70 @@ +// +// 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.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Properties for an Azure SQL Database Vulnerability Assessment rule + /// baseline's result. + /// + public partial class DatabaseVulnerabilityAssessmentRuleBaselineItem + { + /// + /// Initializes a new instance of the + /// DatabaseVulnerabilityAssessmentRuleBaselineItem class. + /// + public DatabaseVulnerabilityAssessmentRuleBaselineItem() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// DatabaseVulnerabilityAssessmentRuleBaselineItem class. + /// + /// The rule baseline result + public DatabaseVulnerabilityAssessmentRuleBaselineItem(IList result) + { + Result = result; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the rule baseline result + /// + [JsonProperty(PropertyName = "result")] + public IList Result { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Result == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Result"); + } + } + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/DatabaseVulnerabilityAssessmentScansExport.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/DatabaseVulnerabilityAssessmentScansExport.cs new file mode 100644 index 000000000000..3079732cb63c --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/DatabaseVulnerabilityAssessmentScansExport.cs @@ -0,0 +1,63 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Sql.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// A database Vulnerability Assessment scan export resource. + /// + [Rest.Serialization.JsonTransformation] + public partial class DatabaseVulnerabilityAssessmentScansExport : ProxyResource + { + /// + /// Initializes a new instance of the + /// DatabaseVulnerabilityAssessmentScansExport class. + /// + public DatabaseVulnerabilityAssessmentScansExport() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// DatabaseVulnerabilityAssessmentScansExport class. + /// + /// Resource ID. + /// Resource name. + /// Resource type. + /// Location of the exported + /// report (e.g. + /// https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). + public DatabaseVulnerabilityAssessmentScansExport(string id = default(string), string name = default(string), string type = default(string), string exportedReportLocation = default(string)) + : base(id, name, type) + { + ExportedReportLocation = exportedReportLocation; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets location of the exported report (e.g. + /// https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). + /// + [JsonProperty(PropertyName = "properties.exportedReportLocation")] + public string ExportedReportLocation { get; private set; } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/Job.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/Job.cs new file mode 100644 index 000000000000..f8308d23d084 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/Job.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// 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 job. + /// + [Rest.Serialization.JsonTransformation] + public partial class Job : ProxyResource + { + /// + /// Initializes a new instance of the Job class. + /// + public Job() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Job class. + /// + /// Resource ID. + /// Resource name. + /// Resource type. + /// User-defined description of the + /// job. + /// The job version number. + /// Schedule properties of the job. + public Job(string id = default(string), string name = default(string), string type = default(string), string description = default(string), int? version = default(int?), JobSchedule schedule = default(JobSchedule)) + : base(id, name, type) + { + Description = description; + Version = version; + Schedule = schedule; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets user-defined description of the job. + /// + [JsonProperty(PropertyName = "properties.description")] + public string Description { get; set; } + + /// + /// Gets the job version number. + /// + [JsonProperty(PropertyName = "properties.version")] + public int? Version { get; private set; } + + /// + /// Gets or sets schedule properties of the job. + /// + [JsonProperty(PropertyName = "properties.schedule")] + public JobSchedule Schedule { get; set; } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobAgent.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobAgent.cs new file mode 100644 index 000000000000..fe6f269eab8a --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobAgent.cs @@ -0,0 +1,100 @@ +// +// 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.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// An Azure SQL job agent. + /// + [Rest.Serialization.JsonTransformation] + public partial class JobAgent : TrackedResource + { + /// + /// Initializes a new instance of the JobAgent class. + /// + public JobAgent() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JobAgent class. + /// + /// Resource location. + /// Resource ID of the database to store job + /// metadata in. + /// Resource ID. + /// Resource name. + /// Resource type. + /// Resource tags. + /// The name and tier of the SKU. + /// The state of the job agent. Possible values + /// include: 'Creating', 'Ready', 'Updating', 'Deleting', + /// 'Disabled' + public JobAgent(string location, string databaseId, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku), string state = default(string)) + : base(location, id, name, type, tags) + { + Sku = sku; + DatabaseId = databaseId; + State = state; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name and tier of the SKU. + /// + [JsonProperty(PropertyName = "sku")] + public Sku Sku { get; set; } + + /// + /// Gets or sets resource ID of the database to store job metadata in. + /// + [JsonProperty(PropertyName = "properties.databaseId")] + public string DatabaseId { get; set; } + + /// + /// Gets the state of the job agent. Possible values include: + /// 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' + /// + [JsonProperty(PropertyName = "properties.state")] + public string State { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (DatabaseId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DatabaseId"); + } + if (Sku != null) + { + Sku.Validate(); + } + } + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobAgentState.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobAgentState.cs new file mode 100644 index 000000000000..b8897f53cb79 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobAgentState.cs @@ -0,0 +1,25 @@ +// +// 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 +{ + + /// + /// Defines values for JobAgentState. + /// + public static class JobAgentState + { + public const string Creating = "Creating"; + public const string Ready = "Ready"; + public const string Updating = "Updating"; + public const string Deleting = "Deleting"; + public const string Disabled = "Disabled"; + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobAgentUpdate.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobAgentUpdate.cs new file mode 100644 index 000000000000..f0a908f10564 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobAgentUpdate.cs @@ -0,0 +1,53 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Sql.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// An update to an Azure SQL job agent. + /// + public partial class JobAgentUpdate + { + /// + /// Initializes a new instance of the JobAgentUpdate class. + /// + public JobAgentUpdate() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JobAgentUpdate class. + /// + /// Resource tags. + public JobAgentUpdate(IDictionary tags = default(IDictionary)) + { + Tags = tags; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets resource tags. + /// + [JsonProperty(PropertyName = "tags")] + public IDictionary Tags { get; set; } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobCredential.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobCredential.cs new file mode 100644 index 000000000000..5d91d4bddf99 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobCredential.cs @@ -0,0 +1,84 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Sql.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// A stored credential that can be used by a job to connect to target + /// databases. + /// + [Rest.Serialization.JsonTransformation] + public partial class JobCredential : ProxyResource + { + /// + /// Initializes a new instance of the JobCredential class. + /// + public JobCredential() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JobCredential class. + /// + /// The credential user name. + /// The credential password. + /// Resource ID. + /// Resource name. + /// Resource type. + public JobCredential(string username, string password, string id = default(string), string name = default(string), string type = default(string)) + : base(id, name, type) + { + Username = username; + Password = password; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the credential user name. + /// + [JsonProperty(PropertyName = "properties.username")] + public string Username { get; set; } + + /// + /// Gets or sets the credential password. + /// + [JsonProperty(PropertyName = "properties.password")] + public string Password { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Username == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Username"); + } + if (Password == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Password"); + } + } + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobExecution.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobExecution.cs new file mode 100644 index 000000000000..39c3e70baf2c --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobExecution.cs @@ -0,0 +1,172 @@ +// +// 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; + + /// + /// An execution of a job + /// + [Rest.Serialization.JsonTransformation] + public partial class JobExecution : ProxyResource + { + /// + /// Initializes a new instance of the JobExecution class. + /// + public JobExecution() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JobExecution class. + /// + /// Resource ID. + /// Resource name. + /// Resource type. + /// The job version number. + /// The job step name. + /// The job step id. + /// The unique identifier of the job + /// execution. + /// The detailed state of the job execution. + /// Possible values include: 'Created', 'InProgress', + /// 'WaitingForChildJobExecutions', 'WaitingForRetry', 'Succeeded', + /// 'SucceededWithSkipped', 'Failed', 'TimedOut', 'Canceled', + /// 'Skipped' + /// The ARM provisioning state of the + /// job execution. Possible values include: 'Created', 'InProgress', + /// 'Succeeded', 'Failed', 'Canceled' + /// The time that the job execution was + /// created. + /// The time that the job execution + /// started. + /// The time that the job execution + /// completed. + /// Number of times the job execution has + /// been attempted. + /// Start time of the current + /// attempt. + /// The last status or error message. + /// The target that this execution is executed + /// on. + public JobExecution(string id = default(string), string name = default(string), string type = default(string), int? jobVersion = default(int?), string stepName = default(string), int? stepId = default(int?), System.Guid? jobExecutionId = default(System.Guid?), string lifecycle = default(string), string provisioningState = default(string), System.DateTime? createTime = default(System.DateTime?), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), int? currentAttempts = default(int?), System.DateTime? currentAttemptStartTime = default(System.DateTime?), string lastMessage = default(string), JobExecutionTarget target = default(JobExecutionTarget)) + : base(id, name, type) + { + JobVersion = jobVersion; + StepName = stepName; + StepId = stepId; + JobExecutionId = jobExecutionId; + Lifecycle = lifecycle; + ProvisioningState = provisioningState; + CreateTime = createTime; + StartTime = startTime; + EndTime = endTime; + CurrentAttempts = currentAttempts; + CurrentAttemptStartTime = currentAttemptStartTime; + LastMessage = lastMessage; + Target = target; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the job version number. + /// + [JsonProperty(PropertyName = "properties.jobVersion")] + public int? JobVersion { get; private set; } + + /// + /// Gets the job step name. + /// + [JsonProperty(PropertyName = "properties.stepName")] + public string StepName { get; private set; } + + /// + /// Gets the job step id. + /// + [JsonProperty(PropertyName = "properties.stepId")] + public int? StepId { get; private set; } + + /// + /// Gets the unique identifier of the job execution. + /// + [JsonProperty(PropertyName = "properties.jobExecutionId")] + public System.Guid? JobExecutionId { get; private set; } + + /// + /// Gets the detailed state of the job execution. Possible values + /// include: 'Created', 'InProgress', 'WaitingForChildJobExecutions', + /// 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', 'Failed', + /// 'TimedOut', 'Canceled', 'Skipped' + /// + [JsonProperty(PropertyName = "properties.lifecycle")] + public string Lifecycle { get; private set; } + + /// + /// Gets the ARM provisioning state of the job execution. Possible + /// values include: 'Created', 'InProgress', 'Succeeded', 'Failed', + /// 'Canceled' + /// + [JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState { get; private set; } + + /// + /// Gets the time that the job execution was created. + /// + [JsonProperty(PropertyName = "properties.createTime")] + public System.DateTime? CreateTime { get; private set; } + + /// + /// Gets the time that the job execution started. + /// + [JsonProperty(PropertyName = "properties.startTime")] + public System.DateTime? StartTime { get; private set; } + + /// + /// Gets the time that the job execution completed. + /// + [JsonProperty(PropertyName = "properties.endTime")] + public System.DateTime? EndTime { get; private set; } + + /// + /// Gets or sets number of times the job execution has been attempted. + /// + [JsonProperty(PropertyName = "properties.currentAttempts")] + public int? CurrentAttempts { get; set; } + + /// + /// Gets start time of the current attempt. + /// + [JsonProperty(PropertyName = "properties.currentAttemptStartTime")] + public System.DateTime? CurrentAttemptStartTime { get; private set; } + + /// + /// Gets the last status or error message. + /// + [JsonProperty(PropertyName = "properties.lastMessage")] + public string LastMessage { get; private set; } + + /// + /// Gets the target that this execution is executed on. + /// + [JsonProperty(PropertyName = "properties.target")] + public JobExecutionTarget Target { get; private set; } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobExecutionLifecycle.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobExecutionLifecycle.cs new file mode 100644 index 000000000000..37ead7ce7ff5 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobExecutionLifecycle.cs @@ -0,0 +1,30 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Sql.Models +{ + + /// + /// Defines values for JobExecutionLifecycle. + /// + public static class JobExecutionLifecycle + { + public const string Created = "Created"; + public const string InProgress = "InProgress"; + public const string WaitingForChildJobExecutions = "WaitingForChildJobExecutions"; + public const string WaitingForRetry = "WaitingForRetry"; + public const string Succeeded = "Succeeded"; + public const string SucceededWithSkipped = "SucceededWithSkipped"; + public const string Failed = "Failed"; + public const string TimedOut = "TimedOut"; + public const string Canceled = "Canceled"; + public const string Skipped = "Skipped"; + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobExecutionTarget.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobExecutionTarget.cs new file mode 100644 index 000000000000..6b7e1dff02e8 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobExecutionTarget.cs @@ -0,0 +1,71 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Sql.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The target that a job execution is executed on. + /// + public partial class JobExecutionTarget + { + /// + /// Initializes a new instance of the JobExecutionTarget class. + /// + public JobExecutionTarget() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JobExecutionTarget class. + /// + /// The type of the target. Possible values include: + /// 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', + /// 'SqlServer' + /// The server name. + /// The database name. + public JobExecutionTarget(string type = default(string), string serverName = default(string), string databaseName = default(string)) + { + Type = type; + ServerName = serverName; + DatabaseName = databaseName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the type of the target. Possible values include: + /// 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', + /// 'SqlServer' + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + /// + /// Gets the server name. + /// + [JsonProperty(PropertyName = "serverName")] + public string ServerName { get; private set; } + + /// + /// Gets the database name. + /// + [JsonProperty(PropertyName = "databaseName")] + public string DatabaseName { get; private set; } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobSchedule.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobSchedule.cs new file mode 100644 index 000000000000..c108f887dbb1 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobSchedule.cs @@ -0,0 +1,88 @@ +// +// 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 Newtonsoft.Json; + using System.Linq; + + /// + /// Scheduling properties of a job. + /// + public partial class JobSchedule + { + /// + /// Initializes a new instance of the JobSchedule class. + /// + public JobSchedule() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JobSchedule class. + /// + /// Schedule start time. + /// Schedule end time. + /// Schedule interval type. Possible values include: + /// 'Once', 'Recurring' + /// Whether or not the schedule is + /// enabled. + /// Value of the schedule's recurring interval, + /// if the scheduletype is recurring. ISO8601 duration format. + public JobSchedule(System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), JobScheduleType? type = default(JobScheduleType?), bool? enabled = default(bool?), string interval = default(string)) + { + StartTime = startTime; + EndTime = endTime; + Type = type; + Enabled = enabled; + Interval = interval; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets schedule start time. + /// + [JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime { get; set; } + + /// + /// Gets or sets schedule end time. + /// + [JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime { get; set; } + + /// + /// Gets or sets schedule interval type. Possible values include: + /// 'Once', 'Recurring' + /// + [JsonProperty(PropertyName = "type")] + public JobScheduleType? Type { get; set; } + + /// + /// Gets or sets whether or not the schedule is enabled. + /// + [JsonProperty(PropertyName = "enabled")] + public bool? Enabled { get; set; } + + /// + /// Gets or sets value of the schedule's recurring interval, if the + /// scheduletype is recurring. ISO8601 duration format. + /// + [JsonProperty(PropertyName = "interval")] + public string Interval { get; set; } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobScheduleType.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobScheduleType.cs new file mode 100644 index 000000000000..502616c442b8 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobScheduleType.cs @@ -0,0 +1,60 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Sql.Models +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for JobScheduleType. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum JobScheduleType + { + [EnumMember(Value = "Once")] + Once, + [EnumMember(Value = "Recurring")] + Recurring + } + internal static class JobScheduleTypeEnumExtension + { + internal static string ToSerializedValue(this JobScheduleType? value) + { + return value == null ? null : ((JobScheduleType)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this JobScheduleType value) + { + switch( value ) + { + case JobScheduleType.Once: + return "Once"; + case JobScheduleType.Recurring: + return "Recurring"; + } + return null; + } + + internal static JobScheduleType? ParseJobScheduleType(this string value) + { + switch( value ) + { + case "Once": + return JobScheduleType.Once; + case "Recurring": + return JobScheduleType.Recurring; + } + return null; + } + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobStep.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobStep.cs new file mode 100644 index 000000000000..3388af588093 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobStep.cs @@ -0,0 +1,139 @@ +// +// 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 job step. + /// + [Rest.Serialization.JsonTransformation] + public partial class JobStep : ProxyResource + { + /// + /// Initializes a new instance of the JobStep class. + /// + public JobStep() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JobStep class. + /// + /// The resource ID of the target group that + /// the job step will be executed on. + /// The resource ID of the job credential that + /// will be used to connect to the targets. + /// The action payload of the job step. + /// Resource ID. + /// Resource name. + /// Resource type. + /// The job step's index within the job. If not + /// specified when creating the job step, it will be created as the + /// last step. If not specified when updating the job step, the step id + /// is not modified. + /// Output destination properties of the job + /// step. + /// Execution options for the job + /// step. + public JobStep(string targetGroup, string credential, JobStepAction action, string id = default(string), string name = default(string), string type = default(string), int? stepId = default(int?), JobStepOutput output = default(JobStepOutput), JobStepExecutionOptions executionOptions = default(JobStepExecutionOptions)) + : base(id, name, type) + { + StepId = stepId; + TargetGroup = targetGroup; + Credential = credential; + Action = action; + Output = output; + ExecutionOptions = executionOptions; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the job step's index within the job. If not specified + /// when creating the job step, it will be created as the last step. If + /// not specified when updating the job step, the step id is not + /// modified. + /// + [JsonProperty(PropertyName = "properties.stepId")] + public int? StepId { get; set; } + + /// + /// Gets or sets the resource ID of the target group that the job step + /// will be executed on. + /// + [JsonProperty(PropertyName = "properties.targetGroup")] + public string TargetGroup { get; set; } + + /// + /// Gets or sets the resource ID of the job credential that will be + /// used to connect to the targets. + /// + [JsonProperty(PropertyName = "properties.credential")] + public string Credential { get; set; } + + /// + /// Gets or sets the action payload of the job step. + /// + [JsonProperty(PropertyName = "properties.action")] + public JobStepAction Action { get; set; } + + /// + /// Gets or sets output destination properties of the job step. + /// + [JsonProperty(PropertyName = "properties.output")] + public JobStepOutput Output { get; set; } + + /// + /// Gets or sets execution options for the job step. + /// + [JsonProperty(PropertyName = "properties.executionOptions")] + public JobStepExecutionOptions ExecutionOptions { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (TargetGroup == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TargetGroup"); + } + if (Credential == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Credential"); + } + if (Action == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Action"); + } + if (Action != null) + { + Action.Validate(); + } + if (Output != null) + { + Output.Validate(); + } + } + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobStepAction.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobStepAction.cs new file mode 100644 index 000000000000..51941a310406 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobStepAction.cs @@ -0,0 +1,87 @@ +// +// 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; + + /// + /// The action to be executed by a job step. + /// + public partial class JobStepAction + { + /// + /// Initializes a new instance of the JobStepAction class. + /// + public JobStepAction() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JobStepAction class. + /// + /// The action value, for example the text of the + /// T-SQL script to execute. + /// Type of action being executed by the job step. + /// Possible values include: 'TSql' + /// The source of the action to execute. Possible + /// values include: 'Inline' + public JobStepAction(string value, string type = default(string), string source = default(string)) + { + Type = type; + Source = source; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets type of action being executed by the job step. + /// Possible values include: 'TSql' + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or sets the source of the action to execute. Possible values + /// include: 'Inline' + /// + [JsonProperty(PropertyName = "source")] + public string Source { get; set; } + + /// + /// Gets or sets the action value, for example the text of the T-SQL + /// script to execute. + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Value == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Value"); + } + } + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobStepActionSource.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobStepActionSource.cs new file mode 100644 index 000000000000..2f96d3a39604 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobStepActionSource.cs @@ -0,0 +1,21 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Sql.Models +{ + + /// + /// Defines values for JobStepActionSource. + /// + public static class JobStepActionSource + { + public const string Inline = "Inline"; + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobStepActionType.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobStepActionType.cs new file mode 100644 index 000000000000..6dda291ff321 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobStepActionType.cs @@ -0,0 +1,21 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Sql.Models +{ + + /// + /// Defines values for JobStepActionType. + /// + public static class JobStepActionType + { + public const string TSql = "TSql"; + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobStepExecutionOptions.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobStepExecutionOptions.cs new file mode 100644 index 000000000000..bfc1c11a276a --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobStepExecutionOptions.cs @@ -0,0 +1,90 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Sql.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The execution options of a job step. + /// + public partial class JobStepExecutionOptions + { + /// + /// Initializes a new instance of the JobStepExecutionOptions class. + /// + public JobStepExecutionOptions() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JobStepExecutionOptions class. + /// + /// Execution timeout for the job + /// step. + /// Maximum number of times the job step + /// will be reattempted if the first attempt fails. + /// Initial delay between + /// retries for job step execution. + /// The maximum amount of + /// time to wait between retries for job step execution. + /// The backoff multiplier + /// for the time between retries. + public JobStepExecutionOptions(int? timeoutSeconds = default(int?), int? retryAttempts = default(int?), int? initialRetryIntervalSeconds = default(int?), int? maximumRetryIntervalSeconds = default(int?), double? retryIntervalBackoffMultiplier = default(double?)) + { + TimeoutSeconds = timeoutSeconds; + RetryAttempts = retryAttempts; + InitialRetryIntervalSeconds = initialRetryIntervalSeconds; + MaximumRetryIntervalSeconds = maximumRetryIntervalSeconds; + RetryIntervalBackoffMultiplier = retryIntervalBackoffMultiplier; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets execution timeout for the job step. + /// + [JsonProperty(PropertyName = "timeoutSeconds")] + public int? TimeoutSeconds { get; set; } + + /// + /// Gets or sets maximum number of times the job step will be + /// reattempted if the first attempt fails. + /// + [JsonProperty(PropertyName = "retryAttempts")] + public int? RetryAttempts { get; set; } + + /// + /// Gets or sets initial delay between retries for job step execution. + /// + [JsonProperty(PropertyName = "initialRetryIntervalSeconds")] + public int? InitialRetryIntervalSeconds { get; set; } + + /// + /// Gets or sets the maximum amount of time to wait between retries for + /// job step execution. + /// + [JsonProperty(PropertyName = "maximumRetryIntervalSeconds")] + public int? MaximumRetryIntervalSeconds { get; set; } + + /// + /// Gets or sets the backoff multiplier for the time between retries. + /// + [JsonProperty(PropertyName = "retryIntervalBackoffMultiplier")] + public double? RetryIntervalBackoffMultiplier { get; set; } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobStepOutput.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobStepOutput.cs new file mode 100644 index 000000000000..cdd0db7bec05 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobStepOutput.cs @@ -0,0 +1,140 @@ +// +// 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; + + /// + /// The output configuration of a job step. + /// + public partial class JobStepOutput + { + /// + /// Initializes a new instance of the JobStepOutput class. + /// + public JobStepOutput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JobStepOutput class. + /// + /// The output destination server + /// name. + /// The output destination database. + /// The output destination table. + /// The resource ID of the credential to use + /// to connect to the output destination. + /// The output destination type. Possible values + /// include: 'SqlDatabase' + /// The output destination subscription + /// id. + /// The output destination resource + /// group. + /// The output destination schema. + public JobStepOutput(string serverName, string databaseName, string tableName, string credential, string type = default(string), System.Guid? subscriptionId = default(System.Guid?), string resourceGroupName = default(string), string schemaName = default(string)) + { + Type = type; + SubscriptionId = subscriptionId; + ResourceGroupName = resourceGroupName; + ServerName = serverName; + DatabaseName = databaseName; + SchemaName = schemaName; + TableName = tableName; + Credential = credential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the output destination type. Possible values include: + /// 'SqlDatabase' + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or sets the output destination subscription id. + /// + [JsonProperty(PropertyName = "subscriptionId")] + public System.Guid? SubscriptionId { get; set; } + + /// + /// Gets or sets the output destination resource group. + /// + [JsonProperty(PropertyName = "resourceGroupName")] + public string ResourceGroupName { get; set; } + + /// + /// Gets or sets the output destination server name. + /// + [JsonProperty(PropertyName = "serverName")] + public string ServerName { get; set; } + + /// + /// Gets or sets the output destination database. + /// + [JsonProperty(PropertyName = "databaseName")] + public string DatabaseName { get; set; } + + /// + /// Gets or sets the output destination schema. + /// + [JsonProperty(PropertyName = "schemaName")] + public string SchemaName { get; set; } + + /// + /// Gets or sets the output destination table. + /// + [JsonProperty(PropertyName = "tableName")] + public string TableName { get; set; } + + /// + /// Gets or sets the resource ID of the credential to use to connect to + /// the output destination. + /// + [JsonProperty(PropertyName = "credential")] + public string Credential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ServerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ServerName"); + } + if (DatabaseName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DatabaseName"); + } + if (TableName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TableName"); + } + if (Credential == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Credential"); + } + } + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobStepOutputType.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobStepOutputType.cs new file mode 100644 index 000000000000..bb86c8126657 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobStepOutputType.cs @@ -0,0 +1,21 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Sql.Models +{ + + /// + /// Defines values for JobStepOutputType. + /// + public static class JobStepOutputType + { + public const string SqlDatabase = "SqlDatabase"; + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobTarget.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobTarget.cs new file mode 100644 index 000000000000..7d03cc175e67 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobTarget.cs @@ -0,0 +1,125 @@ +// +// 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; + + /// + /// A job target, for example a specific database or a container of + /// databases that is evaluated during job execution. + /// + public partial class JobTarget + { + /// + /// Initializes a new instance of the JobTarget class. + /// + public JobTarget() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JobTarget class. + /// + /// The target type. Possible values include: + /// 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', + /// 'SqlServer' + /// Whether the target is included or + /// excluded from the group. Possible values include: 'Include', + /// 'Exclude' + /// The target server name. + /// The target database name. + /// The target elastic pool name. + /// The target shard map. + /// The resource ID of the credential + /// that is used during job execution to connect to the target and + /// determine the list of databases inside the target. + public JobTarget(string type, JobTargetGroupMembershipType? membershipType = default(JobTargetGroupMembershipType?), string serverName = default(string), string databaseName = default(string), string elasticPoolName = default(string), string shardMapName = default(string), string refreshCredential = default(string)) + { + MembershipType = membershipType; + Type = type; + ServerName = serverName; + DatabaseName = databaseName; + ElasticPoolName = elasticPoolName; + ShardMapName = shardMapName; + RefreshCredential = refreshCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets whether the target is included or excluded from the + /// group. Possible values include: 'Include', 'Exclude' + /// + [JsonProperty(PropertyName = "membershipType")] + public JobTargetGroupMembershipType? MembershipType { get; set; } + + /// + /// Gets or sets the target type. Possible values include: + /// 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', + /// 'SqlServer' + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or sets the target server name. + /// + [JsonProperty(PropertyName = "serverName")] + public string ServerName { get; set; } + + /// + /// Gets or sets the target database name. + /// + [JsonProperty(PropertyName = "databaseName")] + public string DatabaseName { get; set; } + + /// + /// Gets or sets the target elastic pool name. + /// + [JsonProperty(PropertyName = "elasticPoolName")] + public string ElasticPoolName { get; set; } + + /// + /// Gets or sets the target shard map. + /// + [JsonProperty(PropertyName = "shardMapName")] + public string ShardMapName { get; set; } + + /// + /// Gets or sets the resource ID of the credential that is used during + /// job execution to connect to the target and determine the list of + /// databases inside the target. + /// + [JsonProperty(PropertyName = "refreshCredential")] + public string RefreshCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Type == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Type"); + } + } + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobTargetGroup.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobTargetGroup.cs new file mode 100644 index 000000000000..3269ee0c6e4f --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobTargetGroup.cs @@ -0,0 +1,83 @@ +// +// 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.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A group of job targets. + /// + [Rest.Serialization.JsonTransformation] + public partial class JobTargetGroup : ProxyResource + { + /// + /// Initializes a new instance of the JobTargetGroup class. + /// + public JobTargetGroup() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JobTargetGroup class. + /// + /// Members of the target group. + /// Resource ID. + /// Resource name. + /// Resource type. + public JobTargetGroup(IList members, string id = default(string), string name = default(string), string type = default(string)) + : base(id, name, type) + { + Members = members; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets members of the target group. + /// + [JsonProperty(PropertyName = "properties.members")] + public IList Members { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Members == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Members"); + } + if (Members != null) + { + foreach (var element in Members) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobTargetGroupMembershipType.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobTargetGroupMembershipType.cs new file mode 100644 index 000000000000..91069e0c3204 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobTargetGroupMembershipType.cs @@ -0,0 +1,60 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Sql.Models +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for JobTargetGroupMembershipType. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum JobTargetGroupMembershipType + { + [EnumMember(Value = "Include")] + Include, + [EnumMember(Value = "Exclude")] + Exclude + } + internal static class JobTargetGroupMembershipTypeEnumExtension + { + internal static string ToSerializedValue(this JobTargetGroupMembershipType? value) + { + return value == null ? null : ((JobTargetGroupMembershipType)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this JobTargetGroupMembershipType value) + { + switch( value ) + { + case JobTargetGroupMembershipType.Include: + return "Include"; + case JobTargetGroupMembershipType.Exclude: + return "Exclude"; + } + return null; + } + + internal static JobTargetGroupMembershipType? ParseJobTargetGroupMembershipType(this string value) + { + switch( value ) + { + case "Include": + return JobTargetGroupMembershipType.Include; + case "Exclude": + return JobTargetGroupMembershipType.Exclude; + } + return null; + } + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobTargetType.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobTargetType.cs new file mode 100644 index 000000000000..bf3921ce5ec0 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobTargetType.cs @@ -0,0 +1,25 @@ +// +// 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 +{ + + /// + /// Defines values for JobTargetType. + /// + public static class JobTargetType + { + public const string TargetGroup = "TargetGroup"; + public const string SqlDatabase = "SqlDatabase"; + public const string SqlElasticPool = "SqlElasticPool"; + public const string SqlShardMap = "SqlShardMap"; + public const string SqlServer = "SqlServer"; + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobVersion.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobVersion.cs new file mode 100644 index 000000000000..0ce703009296 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/JobVersion.cs @@ -0,0 +1,46 @@ +// +// 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 System.Linq; + + /// + /// A job version. + /// + public partial class JobVersion : ProxyResource + { + /// + /// Initializes a new instance of the JobVersion class. + /// + public JobVersion() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JobVersion class. + /// + /// Resource ID. + /// Resource name. + /// Resource type. + public JobVersion(string id = default(string), string name = default(string), string type = default(string)) + : base(id, name, type) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/ProvisioningState.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/ProvisioningState.cs new file mode 100644 index 000000000000..86dff5006da9 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/ProvisioningState.cs @@ -0,0 +1,25 @@ +// +// 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 +{ + + /// + /// Defines values for ProvisioningState. + /// + public static class ProvisioningState + { + public const string Created = "Created"; + public const string InProgress = "InProgress"; + public const string Succeeded = "Succeeded"; + public const string Failed = "Failed"; + public const string Canceled = "Canceled"; + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/ShortTermRetentionPolicy.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/ShortTermRetentionPolicy.cs new file mode 100644 index 000000000000..608ac03e2765 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/ShortTermRetentionPolicy.cs @@ -0,0 +1,61 @@ +// +// 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 short term retention policy resource. + /// + [Rest.Serialization.JsonTransformation] + public partial class ShortTermRetentionPolicy : ProxyResource + { + /// + /// Initializes a new instance of the ShortTermRetentionPolicy class. + /// + public ShortTermRetentionPolicy() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ShortTermRetentionPolicy class. + /// + /// Resource ID. + /// Resource name. + /// Resource type. + /// The backup retention period in days. + /// This is how many days Point-in-Time Restore will be + /// supported. + public ShortTermRetentionPolicy(string id = default(string), string name = default(string), string type = default(string), int? retentionDays = default(int?)) + : base(id, name, type) + { + RetentionDays = retentionDays; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the backup retention period in days. This is how many + /// days Point-in-Time Restore will be supported. + /// + [JsonProperty(PropertyName = "properties.retentionDays")] + public int? RetentionDays { get; set; } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/VulnerabilityAssessmentRecurringScansProperties.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/VulnerabilityAssessmentRecurringScansProperties.cs new file mode 100644 index 000000000000..94b0e00b39ab --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/VulnerabilityAssessmentRecurringScansProperties.cs @@ -0,0 +1,76 @@ +// +// 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 Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Properties of a Vulnerability Assessment recurring scans. + /// + public partial class VulnerabilityAssessmentRecurringScansProperties + { + /// + /// Initializes a new instance of the + /// VulnerabilityAssessmentRecurringScansProperties class. + /// + public VulnerabilityAssessmentRecurringScansProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// VulnerabilityAssessmentRecurringScansProperties class. + /// + /// Recurring scans state. + /// Specifies that the schedule + /// scan notification will be is sent to the subscription + /// administrators. + /// Specifies an array of e-mail addresses to + /// which the scan notification is sent. + public VulnerabilityAssessmentRecurringScansProperties(bool? isEnabled = default(bool?), bool? emailSubscriptionAdmins = default(bool?), IList emails = default(IList)) + { + IsEnabled = isEnabled; + EmailSubscriptionAdmins = emailSubscriptionAdmins; + Emails = emails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets recurring scans state. + /// + [JsonProperty(PropertyName = "isEnabled")] + public bool? IsEnabled { get; set; } + + /// + /// Gets or sets specifies that the schedule scan notification will be + /// is sent to the subscription administrators. + /// + [JsonProperty(PropertyName = "emailSubscriptionAdmins")] + public bool? EmailSubscriptionAdmins { get; set; } + + /// + /// Gets or sets specifies an array of e-mail addresses to which the + /// scan notification is sent. + /// + [JsonProperty(PropertyName = "emails")] + public IList Emails { get; set; } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/VulnerabilityAssessmentScanError.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/VulnerabilityAssessmentScanError.cs new file mode 100644 index 000000000000..d381ce53ff14 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/VulnerabilityAssessmentScanError.cs @@ -0,0 +1,61 @@ +// +// 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 Newtonsoft.Json; + using System.Linq; + + /// + /// Properties of a vulnerability assessment scan error. + /// + public partial class VulnerabilityAssessmentScanError + { + /// + /// Initializes a new instance of the VulnerabilityAssessmentScanError + /// class. + /// + public VulnerabilityAssessmentScanError() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VulnerabilityAssessmentScanError + /// class. + /// + /// The error code. + /// The error message. + public VulnerabilityAssessmentScanError(string code = default(string), string message = default(string)) + { + Code = code; + Message = message; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the error code. + /// + [JsonProperty(PropertyName = "code")] + public string Code { get; private set; } + + /// + /// Gets the error message. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; private set; } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/VulnerabilityAssessmentScanRecord.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/VulnerabilityAssessmentScanRecord.cs new file mode 100644 index 000000000000..298f1c24a1f8 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/VulnerabilityAssessmentScanRecord.cs @@ -0,0 +1,124 @@ +// +// 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.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A vulnerability assessment scan record. + /// + [Rest.Serialization.JsonTransformation] + public partial class VulnerabilityAssessmentScanRecord : ProxyResource + { + /// + /// Initializes a new instance of the VulnerabilityAssessmentScanRecord + /// class. + /// + public VulnerabilityAssessmentScanRecord() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VulnerabilityAssessmentScanRecord + /// class. + /// + /// Resource ID. + /// Resource name. + /// Resource type. + /// The scan ID. + /// The scan trigger type. Possible values + /// include: 'OnDemand', 'Recurring' + /// The scan status. Possible values include: + /// 'Passed', 'Failed', 'FailedToRun', 'InProgress' + /// The scan start time (UTC). + /// The scan end time (UTC). + /// The scan errors. + /// The scan results storage + /// container path. + /// The number of failed + /// security checks. + public VulnerabilityAssessmentScanRecord(string id = default(string), string name = default(string), string type = default(string), string scanId = default(string), string triggerType = default(string), string state = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), IList errors = default(IList), string storageContainerPath = default(string), int? numberOfFailedSecurityChecks = default(int?)) + : base(id, name, type) + { + ScanId = scanId; + TriggerType = triggerType; + State = state; + StartTime = startTime; + EndTime = endTime; + Errors = errors; + StorageContainerPath = storageContainerPath; + NumberOfFailedSecurityChecks = numberOfFailedSecurityChecks; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the scan ID. + /// + [JsonProperty(PropertyName = "properties.scanId")] + public string ScanId { get; private set; } + + /// + /// Gets the scan trigger type. Possible values include: 'OnDemand', + /// 'Recurring' + /// + [JsonProperty(PropertyName = "properties.triggerType")] + public string TriggerType { get; private set; } + + /// + /// Gets the scan status. Possible values include: 'Passed', 'Failed', + /// 'FailedToRun', 'InProgress' + /// + [JsonProperty(PropertyName = "properties.state")] + public string State { get; private set; } + + /// + /// Gets the scan start time (UTC). + /// + [JsonProperty(PropertyName = "properties.startTime")] + public System.DateTime? StartTime { get; private set; } + + /// + /// Gets the scan end time (UTC). + /// + [JsonProperty(PropertyName = "properties.endTime")] + public System.DateTime? EndTime { get; private set; } + + /// + /// Gets the scan errors. + /// + [JsonProperty(PropertyName = "properties.errors")] + public IList Errors { get; private set; } + + /// + /// Gets the scan results storage container path. + /// + [JsonProperty(PropertyName = "properties.storageContainerPath")] + public string StorageContainerPath { get; private set; } + + /// + /// Gets the number of failed security checks. + /// + [JsonProperty(PropertyName = "properties.numberOfFailedSecurityChecks")] + public int? NumberOfFailedSecurityChecks { get; private set; } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/VulnerabilityAssessmentScanState.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/VulnerabilityAssessmentScanState.cs new file mode 100644 index 000000000000..503c61895227 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/VulnerabilityAssessmentScanState.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Sql.Models +{ + + /// + /// Defines values for VulnerabilityAssessmentScanState. + /// + public static class VulnerabilityAssessmentScanState + { + public const string Passed = "Passed"; + public const string Failed = "Failed"; + public const string FailedToRun = "FailedToRun"; + public const string InProgress = "InProgress"; + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/Models/VulnerabilityAssessmentScanTriggerType.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/VulnerabilityAssessmentScanTriggerType.cs new file mode 100644 index 000000000000..252a76bff40a --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/VulnerabilityAssessmentScanTriggerType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Sql.Models +{ + + /// + /// Defines values for VulnerabilityAssessmentScanTriggerType. + /// + public static class VulnerabilityAssessmentScanTriggerType + { + public const string OnDemand = "OnDemand"; + public const string Recurring = "Recurring"; + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/SdkInfo_SqlManagementClient.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/SdkInfo_SqlManagementClient.cs index be9133307496..f99851fd90a8 100644 --- a/src/SDKs/SqlManagement/Management.Sql/Generated/SdkInfo_SqlManagementClient.cs +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/SdkInfo_SqlManagementClient.cs @@ -1,16 +1,24 @@ -using System; -using System.Collections.Generic; -using System.Linq; +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// -internal static partial class SdkInfo +namespace Microsoft.Azure.Management.Sql { - public static IEnumerable> ApiInfo_SqlManagementClient - { - get - { - return new Tuple[] - { + using System; + using System.Collections.Generic; + using System.Linq; + + internal static partial class SdkInfo + { + public static IEnumerable> ApiInfo_SqlManagementClient + { + get + { + return new Tuple[] + { new Tuple("Sql", "BackupLongTermRetentionPolicies", "2017-03-01-preview"), new Tuple("Sql", "Capabilities", "2017-10-01-preview"), new Tuple("Sql", "DataMaskingPolicies", "2014-04-01"), @@ -20,6 +28,9 @@ public static IEnumerable> ApiInfo_SqlManagementCl 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", "DatabaseVulnerabilityAssessmentRuleBaselines", "2017-03-01-preview"), + new Tuple("Sql", "DatabaseVulnerabilityAssessmentScans", "2017-10-01-preview"), + new Tuple("Sql", "DatabaseVulnerabilityAssessments", "2017-03-01-preview"), new Tuple("Sql", "Databases", "2014-04-01"), new Tuple("Sql", "Databases", "2017-10-01-preview"), new Tuple("Sql", "ElasticPoolActivities", "2014-04-01"), @@ -32,6 +43,15 @@ public static IEnumerable> ApiInfo_SqlManagementCl new Tuple("Sql", "FirewallRules", "2014-04-01"), new Tuple("Sql", "GeoBackupPolicies", "2014-04-01"), new Tuple("Sql", "InstanceFailoverGroups", "2017-10-01-preview"), + new Tuple("Sql", "JobAgents", "2017-03-01-preview"), + new Tuple("Sql", "JobCredentials", "2017-03-01-preview"), + new Tuple("Sql", "JobExecutions", "2017-03-01-preview"), + new Tuple("Sql", "JobStepExecutions", "2017-03-01-preview"), + new Tuple("Sql", "JobSteps", "2017-03-01-preview"), + new Tuple("Sql", "JobTargetExecutions", "2017-03-01-preview"), + new Tuple("Sql", "JobTargetGroups", "2017-03-01-preview"), + new Tuple("Sql", "JobVersions", "2017-03-01-preview"), + new Tuple("Sql", "Jobs", "2017-03-01-preview"), new Tuple("Sql", "LongTermRetentionBackups", "2017-03-01-preview"), new Tuple("Sql", "ManagedDatabases", "2017-03-01-preview"), new Tuple("Sql", "ManagedInstances", "2015-05-01-preview"), @@ -52,6 +72,7 @@ public static IEnumerable> ApiInfo_SqlManagementCl new Tuple("Sql", "Servers", "2015-05-01-preview"), new Tuple("Sql", "ServiceObjectives", "2014-04-01"), new Tuple("Sql", "ServiceTierAdvisors", "2014-04-01"), + new Tuple("Sql", "ShortTermRetentionPolicies", "2017-10-01-preview"), new Tuple("Sql", "SubscriptionUsages", "2015-05-01-preview"), new Tuple("Sql", "SyncAgents", "2015-05-01-preview"), new Tuple("Sql", "SyncGroups", "2015-05-01-preview"), @@ -59,7 +80,8 @@ public static IEnumerable> ApiInfo_SqlManagementCl new Tuple("Sql", "TransparentDataEncryptionActivities", "2014-04-01"), new Tuple("Sql", "TransparentDataEncryptions", "2014-04-01"), new Tuple("Sql", "VirtualNetworkRules", "2015-05-01-preview"), - }.AsEnumerable(); - } - } + }.AsEnumerable(); + } + } + } } diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/ShortTermRetentionPoliciesOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/ShortTermRetentionPoliciesOperations.cs new file mode 100644 index 000000000000..ee8c84b7e6dd --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/ShortTermRetentionPoliciesOperations.cs @@ -0,0 +1,761 @@ +// +// 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; + + /// + /// ShortTermRetentionPoliciesOperations operations. + /// + internal partial class ShortTermRetentionPoliciesOperations : IServiceOperations, IShortTermRetentionPoliciesOperations + { + /// + /// Initializes a new instance of the ShortTermRetentionPoliciesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ShortTermRetentionPoliciesOperations(SqlManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SqlManagementClient + /// + public SqlManagementClient Client { get; private set; } + + /// + /// Gets a database's short term retention policy. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database. + /// + /// + /// 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, 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 (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string policyName = "default"; + 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("databaseName", databaseName); + tracingParameters.Add("policyName", policyName); + 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}/backupShortTermRetentionPolicies/{policyName}").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("{policyName}", System.Uri.EscapeDataString(policyName)); + _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; + } + + /// + /// Updates a database's short term retention policy. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database. + /// + /// + /// The short term retention policy info. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ShortTermRetentionPolicy 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 a database's short term retention policy. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database. + /// + /// + /// The short term retention policy info. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ShortTermRetentionPolicy 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); + } + + /// + /// Updates a database's short term retention policy. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database. + /// + /// + /// The short term retention policy info. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ShortTermRetentionPolicy 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 (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string policyName = "default"; + 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("databaseName", databaseName); + tracingParameters.Add("policyName", policyName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}").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("{policyName}", System.Uri.EscapeDataString(policyName)); + _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("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Updates a database's short term retention policy. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database. + /// + /// + /// The short term retention policy info. + /// + /// + /// 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> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, ShortTermRetentionPolicy 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 (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string policyName = "default"; + 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("databaseName", databaseName); + tracingParameters.Add("policyName", policyName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + 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}/backupShortTermRetentionPolicies/{policyName}").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("{policyName}", System.Uri.EscapeDataString(policyName)); + _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("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/ShortTermRetentionPoliciesOperationsExtensions.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/ShortTermRetentionPoliciesOperationsExtensions.cs new file mode 100644 index 000000000000..f67551b3a49d --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/ShortTermRetentionPoliciesOperationsExtensions.cs @@ -0,0 +1,289 @@ +// +// 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 ShortTermRetentionPoliciesOperations. + /// + public static partial class ShortTermRetentionPoliciesOperationsExtensions + { + /// + /// Gets a database's short term retention policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database. + /// + public static ShortTermRetentionPolicy Get(this IShortTermRetentionPoliciesOperations operations, string resourceGroupName, string serverName, string databaseName) + { + return operations.GetAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult(); + } + + /// + /// Gets a database's short term retention policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IShortTermRetentionPoliciesOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates a database's short term retention policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database. + /// + /// + /// The short term retention policy info. + /// + public static ShortTermRetentionPolicy CreateOrUpdate(this IShortTermRetentionPoliciesOperations operations, string resourceGroupName, string serverName, string databaseName, ShortTermRetentionPolicy parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Updates a database's short term retention policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database. + /// + /// + /// The short term retention policy info. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IShortTermRetentionPoliciesOperations operations, string resourceGroupName, string serverName, string databaseName, ShortTermRetentionPolicy parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates a database's short term retention policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database. + /// + /// + /// The short term retention policy info. + /// + public static ShortTermRetentionPolicy Update(this IShortTermRetentionPoliciesOperations operations, string resourceGroupName, string serverName, string databaseName, ShortTermRetentionPolicy parameters) + { + return operations.UpdateAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Updates a database's short term retention policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database. + /// + /// + /// The short term retention policy info. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IShortTermRetentionPoliciesOperations operations, string resourceGroupName, string serverName, string databaseName, ShortTermRetentionPolicy parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates a database's short term retention policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database. + /// + /// + /// The short term retention policy info. + /// + public static ShortTermRetentionPolicy BeginCreateOrUpdate(this IShortTermRetentionPoliciesOperations operations, string resourceGroupName, string serverName, string databaseName, ShortTermRetentionPolicy parameters) + { + return operations.BeginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Updates a database's short term retention policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database. + /// + /// + /// The short term retention policy info. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateOrUpdateAsync(this IShortTermRetentionPoliciesOperations operations, string resourceGroupName, string serverName, string databaseName, ShortTermRetentionPolicy parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates a database's short term retention policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database. + /// + /// + /// The short term retention policy info. + /// + public static ShortTermRetentionPolicy BeginUpdate(this IShortTermRetentionPoliciesOperations operations, string resourceGroupName, string serverName, string databaseName, ShortTermRetentionPolicy parameters) + { + return operations.BeginUpdateAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Updates a database's short term retention policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database. + /// + /// + /// The short term retention policy info. + /// + /// + /// The cancellation token. + /// + public static async Task BeginUpdateAsync(this IShortTermRetentionPoliciesOperations operations, string resourceGroupName, string serverName, string databaseName, ShortTermRetentionPolicy parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/SqlManagementClient.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/SqlManagementClient.cs index de51d7d21b0c..9e5ff66ba2ac 100644 --- a/src/SDKs/SqlManagement/Management.Sql/Generated/SqlManagementClient.cs +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/SqlManagementClient.cs @@ -246,6 +246,61 @@ public partial class SqlManagementClient : ServiceClient, I /// public virtual IVirtualNetworkRulesOperations VirtualNetworkRules { get; private set; } + /// + /// Gets the IDatabaseVulnerabilityAssessmentRuleBaselinesOperations. + /// + public virtual IDatabaseVulnerabilityAssessmentRuleBaselinesOperations DatabaseVulnerabilityAssessmentRuleBaselines { get; private set; } + + /// + /// Gets the IDatabaseVulnerabilityAssessmentsOperations. + /// + public virtual IDatabaseVulnerabilityAssessmentsOperations DatabaseVulnerabilityAssessments { get; private set; } + + /// + /// Gets the IJobAgentsOperations. + /// + public virtual IJobAgentsOperations JobAgents { get; private set; } + + /// + /// Gets the IJobCredentialsOperations. + /// + public virtual IJobCredentialsOperations JobCredentials { get; private set; } + + /// + /// Gets the IJobExecutionsOperations. + /// + public virtual IJobExecutionsOperations JobExecutions { get; private set; } + + /// + /// Gets the IJobsOperations. + /// + public virtual IJobsOperations Jobs { get; private set; } + + /// + /// Gets the IJobStepExecutionsOperations. + /// + public virtual IJobStepExecutionsOperations JobStepExecutions { get; private set; } + + /// + /// Gets the IJobStepsOperations. + /// + public virtual IJobStepsOperations JobSteps { get; private set; } + + /// + /// Gets the IJobTargetExecutionsOperations. + /// + public virtual IJobTargetExecutionsOperations JobTargetExecutions { get; private set; } + + /// + /// Gets the IJobTargetGroupsOperations. + /// + public virtual IJobTargetGroupsOperations JobTargetGroups { get; private set; } + + /// + /// Gets the IJobVersionsOperations. + /// + public virtual IJobVersionsOperations JobVersions { get; private set; } + /// /// Gets the ILongTermRetentionBackupsOperations. /// @@ -291,11 +346,21 @@ public partial class SqlManagementClient : ServiceClient, I /// public virtual ICapabilitiesOperations Capabilities { get; private set; } + /// + /// Gets the IDatabaseVulnerabilityAssessmentScansOperations. + /// + public virtual IDatabaseVulnerabilityAssessmentScansOperations DatabaseVulnerabilityAssessmentScans { get; private set; } + /// /// Gets the IInstanceFailoverGroupsOperations. /// public virtual IInstanceFailoverGroupsOperations InstanceFailoverGroups { get; private set; } + /// + /// Gets the IShortTermRetentionPoliciesOperations. + /// + public virtual IShortTermRetentionPoliciesOperations ShortTermRetentionPolicies { get; private set; } + /// /// Initializes a new instance of the SqlManagementClient class. /// @@ -532,6 +597,17 @@ private void Initialize() SyncMembers = new SyncMembersOperations(this); SubscriptionUsages = new SubscriptionUsagesOperations(this); VirtualNetworkRules = new VirtualNetworkRulesOperations(this); + DatabaseVulnerabilityAssessmentRuleBaselines = new DatabaseVulnerabilityAssessmentRuleBaselinesOperations(this); + DatabaseVulnerabilityAssessments = new DatabaseVulnerabilityAssessmentsOperations(this); + JobAgents = new JobAgentsOperations(this); + JobCredentials = new JobCredentialsOperations(this); + JobExecutions = new JobExecutionsOperations(this); + Jobs = new JobsOperations(this); + JobStepExecutions = new JobStepExecutionsOperations(this); + JobSteps = new JobStepsOperations(this); + JobTargetExecutions = new JobTargetExecutionsOperations(this); + JobTargetGroups = new JobTargetGroupsOperations(this); + JobVersions = new JobVersionsOperations(this); LongTermRetentionBackups = new LongTermRetentionBackupsOperations(this); BackupLongTermRetentionPolicies = new BackupLongTermRetentionPoliciesOperations(this); ManagedDatabases = new ManagedDatabasesOperations(this); @@ -541,7 +617,9 @@ private void Initialize() DatabaseOperations = new DatabaseOperations(this); ElasticPoolOperations = new ElasticPoolOperations(this); Capabilities = new CapabilitiesOperations(this); + DatabaseVulnerabilityAssessmentScans = new DatabaseVulnerabilityAssessmentScansOperations(this); InstanceFailoverGroups = new InstanceFailoverGroupsOperations(this); + ShortTermRetentionPolicies = new ShortTermRetentionPoliciesOperations(this); BaseUri = new System.Uri("https://management.azure.com"); AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; 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 472a64da17da..8aa6303aa0c2 100644 --- a/src/SDKs/SqlManagement/Management.Sql/Microsoft.Azure.Management.Sql.csproj +++ b/src/SDKs/SqlManagement/Management.Sql/Microsoft.Azure.Management.Sql.csproj @@ -7,19 +7,13 @@ Microsoft.Azure.Management.Sql Azure SQL Management SDK library Microsoft.Azure.Management.Sql - 1.15.0-preview + 1.16.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 fe4eb9a8d972..5373256cc58e 100644 --- a/src/SDKs/SqlManagement/Management.Sql/Properties/AssemblyInfo.cs +++ b/src/SDKs/SqlManagement/Management.Sql/Properties/AssemblyInfo.cs @@ -22,8 +22,4 @@ [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.15.0.0")] - - - - +[assembly: AssemblyFileVersion("1.16.0.0")] \ No newline at end of file diff --git a/src/SDKs/SqlManagement/Sql.Tests/ElasticJobAgentScenarioTests.cs b/src/SDKs/SqlManagement/Sql.Tests/ElasticJobAgentScenarioTests.cs new file mode 100644 index 000000000000..af3f10024336 --- /dev/null +++ b/src/SDKs/SqlManagement/Sql.Tests/ElasticJobAgentScenarioTests.cs @@ -0,0 +1,563 @@ +using Microsoft.Azure.Management.ResourceManager; +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 Xunit; + +namespace Sql.Tests +{ + public class ElasticJobAgentScenarioTests + { + /// + /// Test end to end agent + /// + [Fact] + public void TestCreateUpdateDropAgent() + { + using (SqlManagementTestContext context = new SqlManagementTestContext(this)) + { + ResourceGroup resourceGroup = context.CreateResourceGroup(); + Server server = context.CreateServer(resourceGroup); + SqlManagementClient sqlClient = context.GetClient(); + + try + { + // Create database only required parameters + string dbName = SqlManagementTestUtilities.GenerateName(); + var db1 = sqlClient.Databases.CreateOrUpdate(resourceGroup.Name, server.Name, dbName, new Database() + { + Location = server.Location, + }); + Assert.NotNull(db1); + + // Create agent + string agentName = "agent1"; + var agent1 = sqlClient.JobAgents.CreateOrUpdate(resourceGroup.Name, server.Name, agentName, new JobAgent + { + Location = server.Location, + DatabaseId = db1.Id + }); + + // Update agent tags + agent1 = sqlClient.JobAgents.CreateOrUpdate(resourceGroup.Name, server.Name, agentName, new JobAgent + { + Location = server.Location, + DatabaseId = db1.Id, + Tags = new Dictionary() + { + { "tagKey1", "TagValue1" } + } + }); + + // Get agent + agent1 = sqlClient.JobAgents.Get(resourceGroup.Name, server.Name, agentName); + + // List agents + var agents = sqlClient.JobAgents.ListByServer(resourceGroup.Name, server.Name); + + // Delete agent + sqlClient.JobAgents.Delete(resourceGroup.Name, server.Name, agentName); + } + finally + { + // Clean up + context.DeleteResourceGroup(resourceGroup.Name); + } + } + } + + /// + /// Tests end to end job credential + /// + [Fact] + public void TestCreateUpdateDropJobCredential() + { + using (SqlManagementTestContext context = new SqlManagementTestContext(this)) + { + ResourceGroup resourceGroup = context.CreateResourceGroup(); + Server server = context.CreateServer(resourceGroup); + SqlManagementClient sqlClient = context.GetClient(); + + try + { + // Create database only required parameters + string dbName = SqlManagementTestUtilities.GenerateName(); + var db1 = sqlClient.Databases.CreateOrUpdate(resourceGroup.Name, server.Name, dbName, new Database() + { + Location = server.Location, + }); + Assert.NotNull(db1); + + // Create agent + string agentName = "agent"; + + JobAgent agent = sqlClient.JobAgents.CreateOrUpdate(resourceGroup.Name, server.Name, agentName, new JobAgent + { + Location = server.Location, + DatabaseId = db1.Id + }); + + // Create credential + JobCredential credential = sqlClient.JobCredentials.CreateOrUpdate(resourceGroup.Name, server.Name, agent.Name, SqlManagementTestUtilities.DefaultLogin, new JobCredential + { + Username = "a", + Password = "b!" + }); + + + // Update credential + credential = sqlClient.JobCredentials.CreateOrUpdate(resourceGroup.Name, server.Name, agent.Name, SqlManagementTestUtilities.DefaultLogin, new JobCredential + { + Username = SqlManagementTestUtilities.DefaultLogin, + Password = SqlManagementTestUtilities.DefaultPassword + }); + + // List credentials + sqlClient.JobCredentials.ListByAgent(resourceGroup.Name, server.Name, agent.Name); + + // Delete credential + sqlClient.JobCredentials.Delete(resourceGroup.Name, server.Name, agent.Name, credential.Name); + } + finally + { + // Clean up resource group + context.DeleteResourceGroup(resourceGroup.Name); + } + } + } + + /// + /// Tests end to end target group + /// + [Fact] + public void TestCreateUpdateDropTargetGroup() + { + using (SqlManagementTestContext context = new SqlManagementTestContext(this)) + { + ResourceGroup resourceGroup = context.CreateResourceGroup(); + Server server = context.CreateServer(resourceGroup); + SqlManagementClient sqlClient = context.GetClient(); + + try + { + // Create database only required parameters + string dbName = SqlManagementTestUtilities.GenerateName(); + var db1 = sqlClient.Databases.CreateOrUpdate(resourceGroup.Name, server.Name, dbName, new Database() + { + Location = server.Location, + }); + Assert.NotNull(db1); + + // Create agent + string agentName = "agent"; + + JobAgent agent = sqlClient.JobAgents.CreateOrUpdate(resourceGroup.Name, server.Name, agentName, new JobAgent + { + Location = server.Location, + DatabaseId = db1.Id + }); + + // Create credential + JobCredential credential = sqlClient.JobCredentials.CreateOrUpdate(resourceGroup.Name, server.Name, agent.Name, SqlManagementTestUtilities.DefaultLogin, new JobCredential + { + Username = SqlManagementTestUtilities.DefaultLogin, + Password = SqlManagementTestUtilities.DefaultPassword + }); + + // Create target group + JobTargetGroup targetGroup = sqlClient.JobTargetGroups.CreateOrUpdate(resourceGroup.Name, server.Name, agent.Name, "tg1", new JobTargetGroup + { + Members = new List + { + // server target + new JobTarget + { + ServerName = "s1", + Type = JobTargetType.SqlServer, + RefreshCredential = credential.Id, + MembershipType = JobTargetGroupMembershipType.Include, + } + } + }); + + // Update target group with each type of target + targetGroup = sqlClient.JobTargetGroups.CreateOrUpdate(resourceGroup.Name, server.Name, agent.Name, "tg1", new JobTargetGroup + { + Members = new List + { + // server target + new JobTarget + { + ServerName = "s1", + Type = JobTargetType.SqlServer, + RefreshCredential = credential.Id, + MembershipType = JobTargetGroupMembershipType.Include, + }, + // db target + new JobTarget + { + DatabaseName = "db1", + ServerName = "s1", + Type = JobTargetType.SqlDatabase, + MembershipType = JobTargetGroupMembershipType.Include, + }, + // shard map target + new JobTarget + { + ShardMapName = "sm1", + DatabaseName = "db1", + ServerName = "s1", + RefreshCredential = credential.Id, + Type = JobTargetType.SqlShardMap, + MembershipType = JobTargetGroupMembershipType.Exclude, + }, + // elastic pool target + new JobTarget + { + ElasticPoolName = "ep1", + ServerName = "s1", + RefreshCredential = credential.Id, + Type = JobTargetType.SqlElasticPool, + MembershipType = JobTargetGroupMembershipType.Exclude, + }, + } + }); + + // List target groups + sqlClient.JobTargetGroups.ListByAgent(resourceGroup.Name, server.Name, agent.Name); + + // Delete target group + sqlClient.JobTargetGroups.Delete(resourceGroup.Name, server.Name, agent.Name, targetGroup.Name); + } + finally + { + context.DeleteResourceGroup(resourceGroup.Name); + } + } + } + + /// + /// Tests end to end job + /// + [Fact] + public void TestCreateUpdateDropJob() + { + using (SqlManagementTestContext context = new SqlManagementTestContext(this)) + { + ResourceGroup resourceGroup = context.CreateResourceGroup(); + Server server = context.CreateServer(resourceGroup); + SqlManagementClient sqlClient = context.GetClient(); + + try + { + // Create database only required parameters + string dbName = SqlManagementTestUtilities.GenerateName(); + var db1 = sqlClient.Databases.CreateOrUpdate(resourceGroup.Name, server.Name, dbName, new Database() + { + Location = server.Location, + }); + Assert.NotNull(db1); + + // Create agent + string agentName = "agent"; + + JobAgent agent = sqlClient.JobAgents.CreateOrUpdate(resourceGroup.Name, server.Name, agentName, new JobAgent + { + Location = server.Location, + DatabaseId = db1.Id + }); + + // Create job that repeats every 5 min from now. Starting now and ending in a day. + Job job1 = sqlClient.Jobs.CreateOrUpdate(resourceGroup.Name, server.Name, agent.Name, "job1", new Job + { + Description = "Test description", + Schedule = new JobSchedule + { + Enabled = false, + StartTime = new DateTime(), + EndTime = new DateTime().AddDays(1), + Type = JobScheduleType.Recurring, + Interval = "PT5M" + } + }); + + // Update job to run once + job1 = sqlClient.Jobs.CreateOrUpdate(resourceGroup.Name, server.Name, agent.Name, "job1", new Job + { + Description = "Test description", + Schedule = new JobSchedule + { + Enabled = true, + Type = JobScheduleType.Once, + } + }); + + // List job + sqlClient.Jobs.ListByAgent(resourceGroup.Name, server.Name, agent.Name); + + // Delete job + sqlClient.Jobs.Delete(resourceGroup.Name, server.Name, agent.Name, job1.Name); + } + finally + { + context.DeleteResourceGroup(resourceGroup.Name); + } + } + } + + /// + /// Tests end to end job step + /// + [Fact] + public void TestCreateUpdateDropJobStep() + { + using (SqlManagementTestContext context = new SqlManagementTestContext(this)) + { + ResourceGroup resourceGroup = context.CreateResourceGroup(); + Server server = context.CreateServer(resourceGroup); + SqlManagementClient sqlClient = context.GetClient(); + + try + { + // Create database only required parameters + string dbName = SqlManagementTestUtilities.GenerateName(); + var db1 = sqlClient.Databases.CreateOrUpdate(resourceGroup.Name, server.Name, dbName, new Database() + { + Location = server.Location, + }); + Assert.NotNull(db1); + + // Create agent + string agentName = "agent"; + + JobAgent agent = sqlClient.JobAgents.CreateOrUpdate(resourceGroup.Name, server.Name, agentName, new JobAgent + { + Location = server.Location, + DatabaseId = db1.Id + }); + + + // Create credential + JobCredential credential = sqlClient.JobCredentials.CreateOrUpdate(resourceGroup.Name, server.Name, agent.Name, SqlManagementTestUtilities.DefaultLogin, new JobCredential + { + Username = SqlManagementTestUtilities.DefaultLogin, + Password = SqlManagementTestUtilities.DefaultPassword + }); + + // Create target group + JobTargetGroup targetGroup = sqlClient.JobTargetGroups.CreateOrUpdate(resourceGroup.Name, server.Name, agent.Name, "tg1", new JobTargetGroup + { + Members = new List + { + // server target + new JobTarget + { + ServerName = server.Name, + Type = JobTargetType.SqlServer, + RefreshCredential = credential.Id, + MembershipType = JobTargetGroupMembershipType.Include, + } + } + }); + + // Create job that runs once + Job job1 = sqlClient.Jobs.CreateOrUpdate(resourceGroup.Name, server.Name, agent.Name, "job1", new Job + { + Description = "Test description", + Schedule = new JobSchedule + { + Enabled = true, + Type = JobScheduleType.Once, + } + }); + + // Create step with min params + JobStep step1 = sqlClient.JobSteps.CreateOrUpdate(resourceGroup.Name, server.Name, agent.Name, job1.Name, "step1", new JobStep + { + Credential = credential.Id, + Action = new JobStepAction + { + Value = "SELECT 1" + }, + TargetGroup = targetGroup.Id + }); + + + + // Update step with max params + step1 = sqlClient.JobSteps.CreateOrUpdate(resourceGroup.Name, server.Name, agent.Name, job1.Name, "step1", new JobStep + { + Credential = credential.Id, + Action = new JobStepAction + { + Value = "SELECT 1", + Source = "Inline", + Type = "TSql" + }, + TargetGroup = targetGroup.Id, + ExecutionOptions = new JobStepExecutionOptions + { + InitialRetryIntervalSeconds = 100, + MaximumRetryIntervalSeconds = 1000, + RetryAttempts = 1000, + RetryIntervalBackoffMultiplier = 1.5, + TimeoutSeconds = 10000 + }, + Output = new JobStepOutput + { + ResourceGroupName = "rg1", + ServerName = "s1", + DatabaseName = "db1", + SchemaName = "dbo", + TableName = "tbl", + SubscriptionId = new Guid(), + Credential = credential.Id, + Type = JobTargetType.SqlDatabase + } + }); + + + // List steps by job + sqlClient.JobSteps.ListByJob(resourceGroup.Name, server.Name, agent.Name, job1.Name); + + // Delete job step + sqlClient.JobSteps.Delete(resourceGroup.Name, server.Name, agent.Name, job1.Name, step1.Name); + } + finally + { + context.DeleteResourceGroup(resourceGroup.Name); + } + } + } + + + /// + /// Tests end to end job execution + /// + [Fact] + public void TestStartStopGetJobExecution() + { + using (SqlManagementTestContext context = new SqlManagementTestContext(this)) + { + ResourceGroup resourceGroup = context.CreateResourceGroup(); + Server server = context.CreateServer(resourceGroup); + + SqlManagementClient sqlClient = context.GetClient(); + + try + { + // Allow all conenctions for test + sqlClient.FirewallRules.CreateOrUpdate(resourceGroup.Name, server.Name, "allowAll", new FirewallRule + { + StartIpAddress = "0.0.0.0", + EndIpAddress = "255.255.255.255", + }); + + // Create database only required parameters + string dbName = SqlManagementTestUtilities.GenerateName(); + var db1 = sqlClient.Databases.CreateOrUpdate(resourceGroup.Name, server.Name, dbName, new Database() + { + Location = server.Location, + }); + Assert.NotNull(db1); + + // Create agent + string agentName = "agent"; + + JobAgent agent = sqlClient.JobAgents.CreateOrUpdate(resourceGroup.Name, server.Name, agentName, new JobAgent + { + Location = server.Location, + DatabaseId = db1.Id + }); + + + // Create credential + JobCredential credential = sqlClient.JobCredentials.CreateOrUpdate(resourceGroup.Name, server.Name, agent.Name, SqlManagementTestUtilities.DefaultLogin, new JobCredential + { + Username = SqlManagementTestUtilities.DefaultLogin, + Password = SqlManagementTestUtilities.DefaultPassword + }); + + + // Create target group + JobTargetGroup targetGroup = sqlClient.JobTargetGroups.CreateOrUpdate(resourceGroup.Name, server.Name, agent.Name, "tg1", new JobTargetGroup + { + Members = new List + { + // server target + new JobTarget + { + ServerName = server.Name, + DatabaseName = db1.Name, + Type = JobTargetType.SqlDatabase, + MembershipType = JobTargetGroupMembershipType.Include, + } + } + }); + + // Create job that runs once + Job job1 = sqlClient.Jobs.CreateOrUpdate(resourceGroup.Name, server.Name, agent.Name, "job1", new Job + { + Description = "Test description", + Schedule = new JobSchedule + { + Enabled = true, + Type = JobScheduleType.Once, + } + }); + + // Create job step + JobStep step1 = sqlClient.JobSteps.CreateOrUpdate(resourceGroup.Name, server.Name, agent.Name, job1.Name, "step1", new JobStep + { + Credential = credential.Id, + Action = new JobStepAction + { + Value = "SELECT 1" + }, + TargetGroup = targetGroup.Id + }); + + + // Create job execution from job1 - do sync so we can be sure a step execution succeeds + JobExecution jobExecution = sqlClient.JobExecutions.Create(resourceGroup.Name, server.Name, agent.Name, job1.Name); + + // List executions by agent + sqlClient.JobExecutions.ListByAgent(resourceGroup.Name, server.Name, agent.Name); + + // List executions by job + sqlClient.JobExecutions.ListByJob(resourceGroup.Name, server.Name, agent.Name, job1.Name); + + // Get root job execution + jobExecution = sqlClient.JobExecutions.Get(resourceGroup.Name, server.Name, agent.Name, job1.Name, jobExecution.JobExecutionId.Value); + + // List step executions by root execution + sqlClient.JobStepExecutions.ListByJobExecution(resourceGroup.Name, server.Name, agent.Name, job1.Name, jobExecution.JobExecutionId.Value); + + // Get step1 execution + sqlClient.JobStepExecutions.Get(resourceGroup.Name, server.Name, agent.Name, job1.Name, jobExecution.JobExecutionId.Value, step1.Name); + + // List target executions by root job execution + sqlClient.JobTargetExecutions.ListByJobExecution(resourceGroup.Name, server.Name, agent.Name, job1.Name, jobExecution.JobExecutionId.Value); + + // List target executions by job step + IPage targetStepExecutions = sqlClient.JobTargetExecutions.ListByStep(resourceGroup.Name, server.Name, agent.Name, job1.Name, jobExecution.JobExecutionId.Value, step1.Name); + Assert.Single(targetStepExecutions); + + // Get target execution + sqlClient.JobTargetExecutions.Get(resourceGroup.Name, server.Name, agent.Name, job1.Name, jobExecution.JobExecutionId.Value, step1.Name, Guid.Parse(targetStepExecutions.FirstOrDefault().Name)); + + // Cancel the job execution + sqlClient.JobExecutions.Cancel(resourceGroup.Name, server.Name, agent.Name, job1.Name, jobExecution.JobExecutionId.Value); + } + finally + { + context.DeleteResourceGroup(resourceGroup.Name); + } + } + } + } +} \ No newline at end of file diff --git a/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ElasticJobAgentScenarioTests/TestCreateUpdateDropAgent.json b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ElasticJobAgentScenarioTests/TestCreateUpdateDropAgent.json new file mode 100644 index 000000000000..08edc7acc215 --- /dev/null +++ b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ElasticJobAgentScenarioTests/TestCreateUpdateDropAgent.json @@ -0,0 +1,2037 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-5716?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTU3MTY/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"west us 2\",\r\n \"tags\": {\r\n \"sqlcrudtest-5716\": \"2018-05-22 00:28:32Z\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "98" + ], + "x-ms-client-request-id": [ + "40bcacf0-9180-4432-8ddc-c9e03df7df7d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716\",\r\n \"name\": \"sqlcrudtest-5716\",\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"sqlcrudtest-5716\": \"2018-05-22 00:28:32Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "237" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:28:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "b4b000d5-1457-4744-980d-10d4edc1d893" + ], + "x-ms-correlation-request-id": [ + "b4b000d5-1457-4744-980d-10d4edc1d893" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002833Z:b4b000d5-1457-4744-980d-10d4edc1d893" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/servers/sqlcrudtest-1134?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU3MTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xMTM0P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "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\": \"west us 2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "183" + ], + "x-ms-client-request-id": [ + "e997444d-2ef2-4499-914d-f9438c99c0e4" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertLogicalServer\",\r\n \"startTime\": \"2018-05-22T00:28:35.77Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "73" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:28:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/locations/westus2/serverOperationResults/b3ff17c0-951e-4866-87e8-eefc07303e49?api-version=2015-05-01-preview" + ], + "Retry-After": [ + "1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/b3ff17c0-951e-4866-87e8-eefc07303e49?api-version=2015-05-01-preview" + ], + "x-ms-request-id": [ + "b3ff17c0-951e-4866-87e8-eefc07303e49" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "3520c820-0fc7-48df-bef2-a74155fd2fe5" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002835Z:3520c820-0fc7-48df-bef2-a74155fd2fe5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/b3ff17c0-951e-4866-87e8-eefc07303e49?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU3MTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi9iM2ZmMTdjMC05NTFlLTQ4NjYtODdlOC1lZWZjMDczMDNlNDk/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"b3ff17c0-951e-4866-87e8-eefc07303e49\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:28:35.77Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:28:46 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "5e3125b1-0e67-4baf-925f-4b4452143a75" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "25cca5c8-9b25-4c89-b61d-5657a50c033b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002846Z:25cca5c8-9b25-4c89-b61d-5657a50c033b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/b3ff17c0-951e-4866-87e8-eefc07303e49?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU3MTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi9iM2ZmMTdjMC05NTFlLTQ4NjYtODdlOC1lZWZjMDczMDNlNDk/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"b3ff17c0-951e-4866-87e8-eefc07303e49\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:28:35.77Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:29:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "4437d365-3447-4a48-b42e-61e5df9324fc" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "ec26e30d-fbfc-4c3d-8430-2418c0c373b0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002906Z:ec26e30d-fbfc-4c3d-8430-2418c0c373b0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/b3ff17c0-951e-4866-87e8-eefc07303e49?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU3MTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi9iM2ZmMTdjMC05NTFlLTQ4NjYtODdlOC1lZWZjMDczMDNlNDk/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"b3ff17c0-951e-4866-87e8-eefc07303e49\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T00:28:35.77Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:29:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "63556947-b229-4317-a8cd-21b4433fec38" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "0ca46909-645b-47ab-b8fa-c14293aa3748" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002926Z:0ca46909-645b-47ab-b8fa-c14293aa3748" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/servers/sqlcrudtest-1134?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU3MTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xMTM0P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.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-1134.database.windows.net\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/servers/sqlcrudtest-1134\",\r\n \"name\": \"sqlcrudtest-1134\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:29:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "54fea576-5887-4fef-96ca-324d236c2e8d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "28ea8919-473c-4d34-9039-a9106e258a57" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002926Z:28ea8919-473c-4d34-9039-a9106e258a57" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/servers/sqlcrudtest-1134/databases/sqlcrudtest-6823?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU3MTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xMTM0L2RhdGFiYXNlcy9zcWxjcnVkdGVzdC02ODIzP2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"westus2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "29" + ], + "x-ms-client-request-id": [ + "c70d1e0b-f9da-48e0-9926-6fa5f9caeb89" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"CreateLogicalDatabase\",\r\n \"startTime\": \"2018-05-22T00:29:27.34Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "75" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:29:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/locations/westus2/databaseOperationResults/078efefe-d005-4c55-95f8-0f49993b051e?api-version=2017-10-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/078efefe-d005-4c55-95f8-0f49993b051e?api-version=2017-10-01-preview" + ], + "x-ms-request-id": [ + "7deb8403-cfda-46ff-a893-c62e631436e0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "3748a24b-f4d6-4832-8131-ae7c8bac5ec7" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002927Z:3748a24b-f4d6-4832-8131-ae7c8bac5ec7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/078efefe-d005-4c55-95f8-0f49993b051e?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU3MTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uLzA3OGVmZWZlLWQwMDUtNGM1NS05NWY4LTBmNDk5OTNiMDUxZT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"078efefe-d005-4c55-95f8-0f49993b051e\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:29:27.34Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:29:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "a36119df-1c40-4405-9a96-c4d217e71f1f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "d20460f1-ffec-4013-adfe-f8e250a46e01" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002942Z:d20460f1-ffec-4013-adfe-f8e250a46e01" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/078efefe-d005-4c55-95f8-0f49993b051e?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU3MTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uLzA3OGVmZWZlLWQwMDUtNGM1NS05NWY4LTBmNDk5OTNiMDUxZT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"078efefe-d005-4c55-95f8-0f49993b051e\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:29:27.34Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:29:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ac507365-d76f-468e-84d9-d5cdb1f9a391" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "b27e5c12-b4b8-4434-971b-301aa9cf6884" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002957Z:b27e5c12-b4b8-4434-971b-301aa9cf6884" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/078efefe-d005-4c55-95f8-0f49993b051e?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU3MTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uLzA3OGVmZWZlLWQwMDUtNGM1NS05NWY4LTBmNDk5OTNiMDUxZT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"078efefe-d005-4c55-95f8-0f49993b051e\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:29:27.34Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:30:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e320e760-8124-48d6-8918-cd21923b4f17" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "32d9b1af-e6bb-4235-98fb-dde54f43590d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003012Z:32d9b1af-e6bb-4235-98fb-dde54f43590d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/078efefe-d005-4c55-95f8-0f49993b051e?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU3MTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uLzA3OGVmZWZlLWQwMDUtNGM1NS05NWY4LTBmNDk5OTNiMDUxZT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"078efefe-d005-4c55-95f8-0f49993b051e\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:29:27.34Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:30:27 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9b215542-6083-40db-a0c3-1ced35d91202" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "8e39c5da-9fdb-405b-9f44-f612e687eac2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003027Z:8e39c5da-9fdb-405b-9f44-f612e687eac2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/078efefe-d005-4c55-95f8-0f49993b051e?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU3MTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uLzA3OGVmZWZlLWQwMDUtNGM1NS05NWY4LTBmNDk5OTNiMDUxZT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"078efefe-d005-4c55-95f8-0f49993b051e\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:29:27.34Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:30:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "8cbf0aa6-847c-446b-8928-22dec1f9c1f0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "0a89f078-28cf-4598-8698-34c1a0441be4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003042Z:0a89f078-28cf-4598-8698-34c1a0441be4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/078efefe-d005-4c55-95f8-0f49993b051e?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU3MTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uLzA3OGVmZWZlLWQwMDUtNGM1NS05NWY4LTBmNDk5OTNiMDUxZT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"078efefe-d005-4c55-95f8-0f49993b051e\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T00:29:27.34Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:30:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "358ce7d0-cb82-4109-8058-c2d84e221030" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "c4a6d75f-75b3-4362-9a7d-f3095f8f1892" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003057Z:c4a6d75f-75b3-4362-9a7d-f3095f8f1892" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/servers/sqlcrudtest-1134/databases/sqlcrudtest-6823?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU3MTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xMTM0L2RhdGFiYXNlcy9zcWxjcnVkdGVzdC02ODIzP2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 10\r\n },\r\n \"kind\": \"v12.0,user\",\r\n \"properties\": {\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": 268435456000,\r\n \"status\": \"Online\",\r\n \"databaseId\": \"72550b5e-d610-4a4b-b5af-f96fee3af393\",\r\n \"creationDate\": \"2018-05-22T00:29:27.777Z\",\r\n \"currentServiceObjectiveName\": \"S0\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"defaultSecondaryLocation\": \"West Central US\",\r\n \"catalogCollation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"zoneRedundant\": false,\r\n \"earliestRestoreDate\": \"2018-05-22T01:00:56.347Z\",\r\n \"readScale\": \"Disabled\",\r\n \"currentSku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 10\r\n }\r\n },\r\n \"location\": \"westus2\",\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/servers/sqlcrudtest-1134/databases/sqlcrudtest-6823\",\r\n \"name\": \"sqlcrudtest-6823\",\r\n \"type\": \"Microsoft.Sql/servers/databases\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:30:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "78bd0662-56be-427b-8cc7-61f27ad6c3c9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "bd712024-e08a-4dd4-bdf6-b16b0c76ecd2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003058Z:bd712024-e08a-4dd4-bdf6-b16b0c76ecd2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/servers/sqlcrudtest-1134/jobAgents/agent1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU3MTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xMTM0L2pvYkFnZW50cy9hZ2VudDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/servers/sqlcrudtest-1134/databases/sqlcrudtest-6823\"\r\n },\r\n \"location\": \"westus2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "235" + ], + "x-ms-client-request-id": [ + "af7291ee-7ec3-46a2-9e3d-00954e4445e8" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertJobAccount\",\r\n \"startTime\": \"2018-05-22T00:30:58.557Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "71" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:30:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/locations/westus2/jobAgentOperationResults/cc854e5e-de86-4fab-92e1-c8ebf5fa2a86?api-version=2017-03-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/cc854e5e-de86-4fab-92e1-c8ebf5fa2a86?api-version=2017-03-01-preview" + ], + "x-ms-request-id": [ + "47a137ae-0a7e-4ecd-865d-d79593b68341" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "5da0f5b3-26c1-48a8-9589-cb05b904f09e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003058Z:5da0f5b3-26c1-48a8-9589-cb05b904f09e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/servers/sqlcrudtest-1134/jobAgents/agent1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU3MTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xMTM0L2pvYkFnZW50cy9hZ2VudDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/servers/sqlcrudtest-1134/databases/sqlcrudtest-6823\"\r\n },\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"location\": \"westus2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "282" + ], + "x-ms-client-request-id": [ + "3ef1ffb3-73b3-41b6-a6a2-9232c973de41" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertJobAccount\",\r\n \"startTime\": \"2018-05-22T00:32:44.887Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "71" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:32:46 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/locations/westus2/jobAgentOperationResults/4d518887-ea3d-480e-b6f9-0450830f3f45?api-version=2017-03-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/4d518887-ea3d-480e-b6f9-0450830f3f45?api-version=2017-03-01-preview" + ], + "x-ms-request-id": [ + "a3dd3988-134a-4dbd-b919-6b05ada9b2c1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "e6c4c75c-b199-4352-9485-b600ded08c25" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003246Z:e6c4c75c-b199-4352-9485-b600ded08c25" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/cc854e5e-de86-4fab-92e1-c8ebf5fa2a86?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU3MTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2NjODU0ZTVlLWRlODYtNGZhYi05MmUxLWM4ZWJmNWZhMmE4Nj9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"cc854e5e-de86-4fab-92e1-c8ebf5fa2a86\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:30:58.557Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:31:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f05bc805-85e0-4e3b-8e0f-f7f54facc5d0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "f5e6a54b-cd89-462b-8e5f-324b575833b4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003113Z:f5e6a54b-cd89-462b-8e5f-324b575833b4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/cc854e5e-de86-4fab-92e1-c8ebf5fa2a86?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU3MTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2NjODU0ZTVlLWRlODYtNGZhYi05MmUxLWM4ZWJmNWZhMmE4Nj9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"cc854e5e-de86-4fab-92e1-c8ebf5fa2a86\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:30:58.557Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:31:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "4ccc3607-cb2d-4677-ac9b-c9278bc2c48c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "db3ce9ee-f2c6-4ac9-98ca-8a05d8ab3656" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003128Z:db3ce9ee-f2c6-4ac9-98ca-8a05d8ab3656" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/cc854e5e-de86-4fab-92e1-c8ebf5fa2a86?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU3MTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2NjODU0ZTVlLWRlODYtNGZhYi05MmUxLWM4ZWJmNWZhMmE4Nj9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"cc854e5e-de86-4fab-92e1-c8ebf5fa2a86\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:30:58.557Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:31:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "3ae4461a-5c26-4f0f-954e-848dc6983364" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "3469b6c7-a589-40ca-bc85-35faa6287c6d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003143Z:3469b6c7-a589-40ca-bc85-35faa6287c6d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/cc854e5e-de86-4fab-92e1-c8ebf5fa2a86?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU3MTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2NjODU0ZTVlLWRlODYtNGZhYi05MmUxLWM4ZWJmNWZhMmE4Nj9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"cc854e5e-de86-4fab-92e1-c8ebf5fa2a86\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:30:58.557Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:31:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f719dfd9-c322-4569-9017-bfbfbcf77717" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "fd9b0e42-f12f-4501-8368-b0bbfc79c6a1" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003158Z:fd9b0e42-f12f-4501-8368-b0bbfc79c6a1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/cc854e5e-de86-4fab-92e1-c8ebf5fa2a86?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU3MTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2NjODU0ZTVlLWRlODYtNGZhYi05MmUxLWM4ZWJmNWZhMmE4Nj9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"cc854e5e-de86-4fab-92e1-c8ebf5fa2a86\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:30:58.557Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:32:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "de1f1769-b642-4b42-a014-2dc38da66079" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "1c21a2e0-3829-4a54-bfd4-e2ff6cb018fd" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003213Z:1c21a2e0-3829-4a54-bfd4-e2ff6cb018fd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/cc854e5e-de86-4fab-92e1-c8ebf5fa2a86?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU3MTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2NjODU0ZTVlLWRlODYtNGZhYi05MmUxLWM4ZWJmNWZhMmE4Nj9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"cc854e5e-de86-4fab-92e1-c8ebf5fa2a86\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:30:58.557Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:32:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "c4df0cfd-50dc-48a4-aa3e-5f0edca8d982" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "c9c5cde9-a1e9-4575-8878-ab47d53b2fc7" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003228Z:c9c5cde9-a1e9-4575-8878-ab47d53b2fc7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/cc854e5e-de86-4fab-92e1-c8ebf5fa2a86?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU3MTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2NjODU0ZTVlLWRlODYtNGZhYi05MmUxLWM4ZWJmNWZhMmE4Nj9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"cc854e5e-de86-4fab-92e1-c8ebf5fa2a86\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T00:30:58.557Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:32:44 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e01c9ab0-cf3e-441e-84bc-e54ba387a2ce" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "c4189aac-ee67-4a21-b582-00a0302dc5e5" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003244Z:c4189aac-ee67-4a21-b582-00a0302dc5e5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/servers/sqlcrudtest-1134/jobAgents/agent1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU3MTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xMTM0L2pvYkFnZW50cy9hZ2VudDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Agent\",\r\n \"capacity\": 100\r\n },\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/servers/sqlcrudtest-1134/databases/sqlcrudtest-6823\",\r\n \"state\": \"Ready\"\r\n },\r\n \"location\": \"westus2\",\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/servers/sqlcrudtest-1134/jobAgents/agent1\",\r\n \"name\": \"agent1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:32:44 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "d87a04b1-9623-4c90-9123-f704a45dc270" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-correlation-request-id": [ + "967c244a-dda6-4276-a132-e14bc3031009" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003244Z:967c244a-dda6-4276-a132-e14bc3031009" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/servers/sqlcrudtest-1134/jobAgents/agent1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU3MTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xMTM0L2pvYkFnZW50cy9hZ2VudDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Agent\",\r\n \"capacity\": 100\r\n },\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/servers/sqlcrudtest-1134/databases/sqlcrudtest-6823\",\r\n \"state\": \"Ready\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/servers/sqlcrudtest-1134/jobAgents/agent1\",\r\n \"name\": \"agent1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:33:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "604f049d-67e8-426d-95e4-7c99fc7907cf" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14979" + ], + "x-ms-correlation-request-id": [ + "1e722edf-248e-4d81-a9bf-0d2e158e3eda" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003301Z:1e722edf-248e-4d81-a9bf-0d2e158e3eda" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/servers/sqlcrudtest-1134/jobAgents/agent1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU3MTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xMTM0L2pvYkFnZW50cy9hZ2VudDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d991fe2d-4629-4b18-aa6d-8656f9a5d16c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Agent\",\r\n \"capacity\": 100\r\n },\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/servers/sqlcrudtest-1134/databases/sqlcrudtest-6823\",\r\n \"state\": \"Ready\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/servers/sqlcrudtest-1134/jobAgents/agent1\",\r\n \"name\": \"agent1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:33:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "2e680bd9-d53b-4998-90d1-fd2e511b8a3b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14978" + ], + "x-ms-correlation-request-id": [ + "26f0f2a4-14e2-41cd-84b5-8b33995a9d6e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003301Z:26f0f2a4-14e2-41cd-84b5-8b33995a9d6e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/4d518887-ea3d-480e-b6f9-0450830f3f45?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU3MTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzRkNTE4ODg3LWVhM2QtNDgwZS1iNmY5LTA0NTA4MzBmM2Y0NT9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"4d518887-ea3d-480e-b6f9-0450830f3f45\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T00:32:44.887Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:33:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "8cf075c1-198d-4276-ad43-dc29a4de92cf" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-correlation-request-id": [ + "0c977c30-32ae-4165-ba95-a551fdb726a7" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003301Z:0c977c30-32ae-4165-ba95-a551fdb726a7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/servers/sqlcrudtest-1134/jobAgents?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU3MTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xMTM0L2pvYkFnZW50cz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "58a4710d-7df9-40ff-9c0d-faa0304d9d48" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"sku\": {\r\n \"name\": \"Agent\",\r\n \"capacity\": 100\r\n },\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/servers/sqlcrudtest-1134/databases/sqlcrudtest-6823\",\r\n \"state\": \"Ready\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/servers/sqlcrudtest-1134/jobAgents/agent1\",\r\n \"name\": \"agent1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:33:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7ef272ce-40d8-4fa7-9aab-1d4d42890b72" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14977" + ], + "x-ms-correlation-request-id": [ + "73501c39-71cf-41a5-9b79-590e9d38bee4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003302Z:73501c39-71cf-41a5-9b79-590e9d38bee4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/servers/sqlcrudtest-1134/jobAgents/agent1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU3MTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xMTM0L2pvYkFnZW50cy9hZ2VudDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "95621446-0031-4b3c-ab30-61d8774405ca" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"DeleteJobAccount\",\r\n \"startTime\": \"2018-05-22T00:33:02.533Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "71" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:33:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/locations/westus2/jobAgentOperationResults/6bbe858e-511f-4a6e-9f04-7a5c60e0acf4?api-version=2017-03-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/6bbe858e-511f-4a6e-9f04-7a5c60e0acf4?api-version=2017-03-01-preview" + ], + "x-ms-request-id": [ + "7a9bed35-1605-426f-98cd-71fe16cc488f" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "2144f7c0-cac4-477c-b6e6-96a6729811ff" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003302Z:2144f7c0-cac4-477c-b6e6-96a6729811ff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-5716/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/6bbe858e-511f-4a6e-9f04-7a5c60e0acf4?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU3MTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzZiYmU4NThlLTUxMWYtNGE2ZS05ZjA0LTdhNWM2MGUwYWNmND9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"6bbe858e-511f-4a6e-9f04-7a5c60e0acf4\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T00:33:02.533Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:33:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e2d25125-8e28-46a5-8dd9-9e7aaade38f5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14976" + ], + "x-ms-correlation-request-id": [ + "5163e7dc-322f-41f8-a1e6-054f903bb88f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003317Z:5163e7dc-322f-41f8-a1e6-054f903bb88f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-5716?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTU3MTY/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "42534271-004a-47b9-9c95-82d83bd68036" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:33:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDU3MTYtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "eb4b561e-dba7-48f4-b493-ea3c302d149e" + ], + "x-ms-correlation-request-id": [ + "eb4b561e-dba7-48f4-b493-ea3c302d149e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003318Z:eb4b561e-dba7-48f4-b493-ea3c302d149e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-5716?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTU3MTY/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f6ddc0f4-0ac7-458c-bf38-88d296220bb6" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:33:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDU3MTYtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14998" + ], + "x-ms-request-id": [ + "3f9c32b3-83f6-452a-99d0-62e701ab4081" + ], + "x-ms-correlation-request-id": [ + "3f9c32b3-83f6-452a-99d0-62e701ab4081" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003318Z:3f9c32b3-83f6-452a-99d0-62e701ab4081" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + } + ], + "Names": { + "CreateResourceGroup": [ + "sqlcrudtest-5716" + ], + "CreateServer": [ + "sqlcrudtest-1134" + ], + "TestCreateUpdateDropAgent": [ + "sqlcrudtest-6823" + ] + }, + "Variables": { + "DefaultLocation": "west us 2", + "SubscriptionId": "1b132fbc-df61-4dd8-bba0-71d7d4277eda" + } +} \ No newline at end of file diff --git a/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ElasticJobAgentScenarioTests/TestCreateUpdateDropJob.json b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ElasticJobAgentScenarioTests/TestCreateUpdateDropJob.json new file mode 100644 index 000000000000..530199a637c1 --- /dev/null +++ b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ElasticJobAgentScenarioTests/TestCreateUpdateDropJob.json @@ -0,0 +1,1781 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-2102?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTIxMDI/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"west us 2\",\r\n \"tags\": {\r\n \"sqlcrudtest-2102\": \"2018-05-22 00:24:33Z\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "98" + ], + "x-ms-client-request-id": [ + "f9f03c72-2604-4974-8cd5-79b97f8543f7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102\",\r\n \"name\": \"sqlcrudtest-2102\",\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"sqlcrudtest-2102\": \"2018-05-22 00:24:33Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "237" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:24:33 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "8ccc47b9-9a73-4ce7-9c83-da3daf5cd2c8" + ], + "x-ms-correlation-request-id": [ + "8ccc47b9-9a73-4ce7-9c83-da3daf5cd2c8" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002434Z:8ccc47b9-9a73-4ce7-9c83-da3daf5cd2c8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/servers/sqlcrudtest-9529?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIxMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05NTI5P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "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\": \"west us 2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "183" + ], + "x-ms-client-request-id": [ + "754c0670-1d06-4234-9d10-d576011d1e51" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertLogicalServer\",\r\n \"startTime\": \"2018-05-22T00:24:36.277Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "74" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:24:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/locations/westus2/serverOperationResults/cf1b85ae-3522-493c-8d0c-bea63d318cc7?api-version=2015-05-01-preview" + ], + "Retry-After": [ + "1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/cf1b85ae-3522-493c-8d0c-bea63d318cc7?api-version=2015-05-01-preview" + ], + "x-ms-request-id": [ + "cf1b85ae-3522-493c-8d0c-bea63d318cc7" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-correlation-request-id": [ + "7ffeda8a-56d5-47cb-b80b-3ad0da4799d3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002436Z:7ffeda8a-56d5-47cb-b80b-3ad0da4799d3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/cf1b85ae-3522-493c-8d0c-bea63d318cc7?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIxMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi9jZjFiODVhZS0zNTIyLTQ5M2MtOGQwYy1iZWE2M2QzMThjYzc/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"cf1b85ae-3522-493c-8d0c-bea63d318cc7\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:24:36.277Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:24:46 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e25b086f-d29e-4ae8-a41f-c0f88c33d2e3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-correlation-request-id": [ + "3e67d898-4cac-45c6-ad77-d04e3dcc7a74" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002446Z:3e67d898-4cac-45c6-ad77-d04e3dcc7a74" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/cf1b85ae-3522-493c-8d0c-bea63d318cc7?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIxMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi9jZjFiODVhZS0zNTIyLTQ5M2MtOGQwYy1iZWE2M2QzMThjYzc/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"cf1b85ae-3522-493c-8d0c-bea63d318cc7\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:24:36.277Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:25:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f2786c70-e248-46b4-9f09-2dfb28165438" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-correlation-request-id": [ + "5229c370-050f-4ede-a8ea-3049e8efa62d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002506Z:5229c370-050f-4ede-a8ea-3049e8efa62d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/cf1b85ae-3522-493c-8d0c-bea63d318cc7?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIxMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi9jZjFiODVhZS0zNTIyLTQ5M2MtOGQwYy1iZWE2M2QzMThjYzc/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"cf1b85ae-3522-493c-8d0c-bea63d318cc7\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T00:24:36.277Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:25:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "601861f4-adec-4582-b3f3-7c8d7d91a223" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14979" + ], + "x-ms-correlation-request-id": [ + "5ff6ab98-7ba2-42e4-90f7-39aa7d45191c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002526Z:5ff6ab98-7ba2-42e4-90f7-39aa7d45191c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/servers/sqlcrudtest-9529?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIxMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05NTI5P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.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-9529.database.windows.net\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/servers/sqlcrudtest-9529\",\r\n \"name\": \"sqlcrudtest-9529\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:25:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "c30a0365-8cae-482d-92e8-1c3c5a97af77" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14978" + ], + "x-ms-correlation-request-id": [ + "3d353333-ba75-4f8b-9223-7c8393be25f8" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002526Z:3d353333-ba75-4f8b-9223-7c8393be25f8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/servers/sqlcrudtest-9529/databases/sqlcrudtest-5140?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIxMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05NTI5L2RhdGFiYXNlcy9zcWxjcnVkdGVzdC01MTQwP2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"westus2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "29" + ], + "x-ms-client-request-id": [ + "4fd8657b-a63b-4d6b-b9ff-b774d9c45e54" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"CreateLogicalDatabase\",\r\n \"startTime\": \"2018-05-22T00:25:26.823Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "76" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:25:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/locations/westus2/databaseOperationResults/bbf43c20-11ed-49f2-b46b-fe84d99e935e?api-version=2017-10-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/bbf43c20-11ed-49f2-b46b-fe84d99e935e?api-version=2017-10-01-preview" + ], + "x-ms-request-id": [ + "2d8e2ccd-294a-4bdb-9682-da606049a651" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1192" + ], + "x-ms-correlation-request-id": [ + "86e41691-318a-4f7d-9448-766f5918aecc" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002527Z:86e41691-318a-4f7d-9448-766f5918aecc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/bbf43c20-11ed-49f2-b46b-fe84d99e935e?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIxMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uL2JiZjQzYzIwLTExZWQtNDlmMi1iNDZiLWZlODRkOTllOTM1ZT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"bbf43c20-11ed-49f2-b46b-fe84d99e935e\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:25:26.823Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:25:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f926db38-df30-49d2-b031-8d3f51e364bf" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14977" + ], + "x-ms-correlation-request-id": [ + "7c83f9cd-89c9-4ece-b050-12887f073654" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002542Z:7c83f9cd-89c9-4ece-b050-12887f073654" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/bbf43c20-11ed-49f2-b46b-fe84d99e935e?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIxMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uL2JiZjQzYzIwLTExZWQtNDlmMi1iNDZiLWZlODRkOTllOTM1ZT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"bbf43c20-11ed-49f2-b46b-fe84d99e935e\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:25:26.823Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:25:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b1bf4369-445f-416b-9833-d54cbf0871a7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14976" + ], + "x-ms-correlation-request-id": [ + "5b758c66-245d-474a-9b89-d92a7748faf3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002557Z:5b758c66-245d-474a-9b89-d92a7748faf3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/bbf43c20-11ed-49f2-b46b-fe84d99e935e?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIxMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uL2JiZjQzYzIwLTExZWQtNDlmMi1iNDZiLWZlODRkOTllOTM1ZT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"bbf43c20-11ed-49f2-b46b-fe84d99e935e\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:25:26.823Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:26:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f1bab47c-4447-4012-976a-5c8574c5000d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14975" + ], + "x-ms-correlation-request-id": [ + "49e11731-3295-4f84-b1e5-66247673330d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002612Z:49e11731-3295-4f84-b1e5-66247673330d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/bbf43c20-11ed-49f2-b46b-fe84d99e935e?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIxMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uL2JiZjQzYzIwLTExZWQtNDlmMi1iNDZiLWZlODRkOTllOTM1ZT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"bbf43c20-11ed-49f2-b46b-fe84d99e935e\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T00:25:26.823Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:26:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f799c8b2-9370-4639-ba10-e95ac6d77ec8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14974" + ], + "x-ms-correlation-request-id": [ + "dbfefdc3-7269-48f8-b6dd-c43b2469709e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002627Z:dbfefdc3-7269-48f8-b6dd-c43b2469709e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/servers/sqlcrudtest-9529/databases/sqlcrudtest-5140?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIxMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05NTI5L2RhdGFiYXNlcy9zcWxjcnVkdGVzdC01MTQwP2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 10\r\n },\r\n \"kind\": \"v12.0,user\",\r\n \"properties\": {\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": 268435456000,\r\n \"status\": \"Online\",\r\n \"databaseId\": \"b53561df-4f9b-448e-82d6-f8d2ae89f8c8\",\r\n \"creationDate\": \"2018-05-22T00:25:27.137Z\",\r\n \"currentServiceObjectiveName\": \"S0\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"defaultSecondaryLocation\": \"West Central US\",\r\n \"catalogCollation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"zoneRedundant\": false,\r\n \"earliestRestoreDate\": \"2018-05-22T00:56:13.407Z\",\r\n \"readScale\": \"Disabled\",\r\n \"currentSku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 10\r\n }\r\n },\r\n \"location\": \"westus2\",\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/servers/sqlcrudtest-9529/databases/sqlcrudtest-5140\",\r\n \"name\": \"sqlcrudtest-5140\",\r\n \"type\": \"Microsoft.Sql/servers/databases\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:26:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b887ae74-fbe5-430e-8d03-210ad75c157d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14973" + ], + "x-ms-correlation-request-id": [ + "97e16793-e25b-4bf6-8ab0-341fa59f3957" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002627Z:97e16793-e25b-4bf6-8ab0-341fa59f3957" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/servers/sqlcrudtest-9529/jobAgents/agent?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIxMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05NTI5L2pvYkFnZW50cy9hZ2VudD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/servers/sqlcrudtest-9529/databases/sqlcrudtest-5140\"\r\n },\r\n \"location\": \"westus2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "235" + ], + "x-ms-client-request-id": [ + "f183ba61-aa18-40f6-8a9f-7bb1d78c648f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertJobAccount\",\r\n \"startTime\": \"2018-05-22T00:26:27.747Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "71" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:26:27 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/locations/westus2/jobAgentOperationResults/49353073-f826-4f1d-956e-4766f2e027f3?api-version=2017-03-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/49353073-f826-4f1d-956e-4766f2e027f3?api-version=2017-03-01-preview" + ], + "x-ms-request-id": [ + "fbdd51e8-3af9-40dc-bf3b-b75a00b2e87e" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1191" + ], + "x-ms-correlation-request-id": [ + "3e9a5be2-ac9c-4057-b5bd-85f818ab840f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002627Z:3e9a5be2-ac9c-4057-b5bd-85f818ab840f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/49353073-f826-4f1d-956e-4766f2e027f3?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIxMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzQ5MzUzMDczLWY4MjYtNGYxZC05NTZlLTQ3NjZmMmUwMjdmMz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"49353073-f826-4f1d-956e-4766f2e027f3\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:26:27.747Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:26:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ed5802a7-90bc-4e4b-8fb1-da79d85db589" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14972" + ], + "x-ms-correlation-request-id": [ + "03ab405b-a44e-4f71-b6f7-61e51ac9549b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002642Z:03ab405b-a44e-4f71-b6f7-61e51ac9549b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/49353073-f826-4f1d-956e-4766f2e027f3?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIxMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzQ5MzUzMDczLWY4MjYtNGYxZC05NTZlLTQ3NjZmMmUwMjdmMz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"49353073-f826-4f1d-956e-4766f2e027f3\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:26:27.747Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:26:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "36c3370b-cc49-4f9e-bc47-8586ee7e83cd" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14971" + ], + "x-ms-correlation-request-id": [ + "6c841054-0708-4357-80da-cd37cd1c30c1" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002657Z:6c841054-0708-4357-80da-cd37cd1c30c1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/49353073-f826-4f1d-956e-4766f2e027f3?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIxMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzQ5MzUzMDczLWY4MjYtNGYxZC05NTZlLTQ3NjZmMmUwMjdmMz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"49353073-f826-4f1d-956e-4766f2e027f3\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:26:27.747Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:27:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f41d8b8e-0ca6-4531-9607-d06dca337276" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14970" + ], + "x-ms-correlation-request-id": [ + "11b94759-82b3-4df5-a41e-e299dc33ff64" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002713Z:11b94759-82b3-4df5-a41e-e299dc33ff64" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/49353073-f826-4f1d-956e-4766f2e027f3?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIxMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzQ5MzUzMDczLWY4MjYtNGYxZC05NTZlLTQ3NjZmMmUwMjdmMz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"49353073-f826-4f1d-956e-4766f2e027f3\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:26:27.747Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:27:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "c0ebedf0-5021-4781-b990-52e2a57864b4" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14969" + ], + "x-ms-correlation-request-id": [ + "6a42cb74-4b3c-4f2d-94f1-c3db5dc7e387" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002728Z:6a42cb74-4b3c-4f2d-94f1-c3db5dc7e387" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/49353073-f826-4f1d-956e-4766f2e027f3?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIxMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzQ5MzUzMDczLWY4MjYtNGYxZC05NTZlLTQ3NjZmMmUwMjdmMz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"49353073-f826-4f1d-956e-4766f2e027f3\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:26:27.747Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:27:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "3d2ef129-1230-4794-9d5d-7ffeab769bce" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14968" + ], + "x-ms-correlation-request-id": [ + "08a254fc-c826-418f-b161-446ec8188526" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002743Z:08a254fc-c826-418f-b161-446ec8188526" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/49353073-f826-4f1d-956e-4766f2e027f3?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIxMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzQ5MzUzMDczLWY4MjYtNGYxZC05NTZlLTQ3NjZmMmUwMjdmMz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"49353073-f826-4f1d-956e-4766f2e027f3\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:26:27.747Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:27:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e8404ea5-3110-409a-82c9-87acc0fb7794" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14967" + ], + "x-ms-correlation-request-id": [ + "8d79c953-ded2-434b-8a3e-58a0e9d1ef8b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002758Z:8d79c953-ded2-434b-8a3e-58a0e9d1ef8b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/49353073-f826-4f1d-956e-4766f2e027f3?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIxMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzQ5MzUzMDczLWY4MjYtNGYxZC05NTZlLTQ3NjZmMmUwMjdmMz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"49353073-f826-4f1d-956e-4766f2e027f3\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:26:27.747Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:28:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "72656cf1-3ad0-460d-8a7a-43207d80bffd" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14966" + ], + "x-ms-correlation-request-id": [ + "5184d810-d737-4ef9-a29a-11b0ccbefd30" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002813Z:5184d810-d737-4ef9-a29a-11b0ccbefd30" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/49353073-f826-4f1d-956e-4766f2e027f3?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIxMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzQ5MzUzMDczLWY4MjYtNGYxZC05NTZlLTQ3NjZmMmUwMjdmMz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"49353073-f826-4f1d-956e-4766f2e027f3\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T00:26:27.747Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:28:27 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "394b5847-96e9-440d-92bf-76b0c4eed5de" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14965" + ], + "x-ms-correlation-request-id": [ + "f22260f1-bbe6-45d9-8ee1-8ef76153c083" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002828Z:f22260f1-bbe6-45d9-8ee1-8ef76153c083" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/servers/sqlcrudtest-9529/jobAgents/agent?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIxMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05NTI5L2pvYkFnZW50cy9hZ2VudD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Agent\",\r\n \"capacity\": 100\r\n },\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/servers/sqlcrudtest-9529/databases/sqlcrudtest-5140\",\r\n \"state\": \"Ready\"\r\n },\r\n \"location\": \"westus2\",\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/servers/sqlcrudtest-9529/jobAgents/agent\",\r\n \"name\": \"agent\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:28:27 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e09117c5-e03f-4044-b57c-d6265615d5a8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14964" + ], + "x-ms-correlation-request-id": [ + "4aec277d-1737-4b6c-9790-2e70fd088129" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002828Z:4aec277d-1737-4b6c-9790-2e70fd088129" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/servers/sqlcrudtest-9529/jobAgents/agent/jobs/job1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIxMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05NTI5L2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"description\": \"Test description\",\r\n \"schedule\": {\r\n \"startTime\": \"0001-01-01T00:00:00Z\",\r\n \"endTime\": \"0001-01-02T00:00:00Z\",\r\n \"type\": \"Recurring\",\r\n \"enabled\": false,\r\n \"interval\": \"PT5M\"\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "259" + ], + "x-ms-client-request-id": [ + "628cb031-baae-4be5-89fc-1133d9965579" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"description\": \"Test description\",\r\n \"version\": 0,\r\n \"schedule\": {\r\n \"startTime\": \"0001-01-01T00:00:00Z\",\r\n \"endTime\": \"0001-01-02T00:00:00Z\",\r\n \"type\": \"Recurring\",\r\n \"enabled\": false,\r\n \"interval\": \"PT5M\"\r\n }\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/servers/sqlcrudtest-9529/jobAgents/agent/jobs/job1\",\r\n \"name\": \"job1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "421" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:28:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "565728e7-05f7-415b-a7b4-c036cec6d834" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1190" + ], + "x-ms-correlation-request-id": [ + "2fc1ae50-e2fc-4254-81bd-237a62cdb5f2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002829Z:2fc1ae50-e2fc-4254-81bd-237a62cdb5f2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/servers/sqlcrudtest-9529/jobAgents/agent/jobs/job1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIxMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05NTI5L2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"description\": \"Test description\",\r\n \"schedule\": {\r\n \"type\": \"Once\",\r\n \"enabled\": true\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "140" + ], + "x-ms-client-request-id": [ + "6b0124c4-a424-4892-8bc3-5a5a4e6738b2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"description\": \"Test description\",\r\n \"version\": 0,\r\n \"schedule\": {\r\n \"startTime\": \"0001-01-01T00:00:00Z\",\r\n \"endTime\": \"9999-12-31T11:59:59Z\",\r\n \"type\": \"Once\",\r\n \"enabled\": true\r\n }\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/servers/sqlcrudtest-9529/jobAgents/agent/jobs/job1\",\r\n \"name\": \"job1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:28:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "13da78e3-35fc-4701-989e-ae2ece729411" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1189" + ], + "x-ms-correlation-request-id": [ + "4cc4844e-406f-442e-a37e-57d84256080b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002829Z:4cc4844e-406f-442e-a37e-57d84256080b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/servers/sqlcrudtest-9529/jobAgents/agent/jobs?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIxMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05NTI5L2pvYkFnZW50cy9hZ2VudC9qb2JzP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "bdc64149-d1fd-47c6-af91-e62d408d73e4" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"description\": \"Test description\",\r\n \"version\": 0,\r\n \"schedule\": {\r\n \"startTime\": \"0001-01-01T00:00:00Z\",\r\n \"endTime\": \"9999-12-31T11:59:59Z\",\r\n \"type\": \"Once\",\r\n \"enabled\": true\r\n }\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/servers/sqlcrudtest-9529/jobAgents/agent/jobs/job1\",\r\n \"name\": \"job1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:28:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9c6e1b32-464c-44a6-b4a5-fac2fc0388a6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14963" + ], + "x-ms-correlation-request-id": [ + "19558aad-d2b6-4c5d-8b4e-69164d43559c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002829Z:19558aad-d2b6-4c5d-8b4e-69164d43559c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-2102/providers/Microsoft.Sql/servers/sqlcrudtest-9529/jobAgents/agent/jobs/job1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIxMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05NTI5L2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "eba4dcc9-57de-4364-b50d-ef685c6bb2d0" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:28:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "7b9aa7f0-dc81-4a40-aa10-b057acdb1517" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "1a244aee-34d6-479c-ab6b-098c16f2671a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002829Z:1a244aee-34d6-479c-ab6b-098c16f2671a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-2102?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTIxMDI/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a8bd604e-0edb-4997-8430-9b9efd93f7ea" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:28:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDIxMDItV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "6a2c4865-d6f9-4196-9e1e-10b75ebd88d2" + ], + "x-ms-correlation-request-id": [ + "6a2c4865-d6f9-4196-9e1e-10b75ebd88d2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002830Z:6a2c4865-d6f9-4196-9e1e-10b75ebd88d2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-2102?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTIxMDI/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a144975b-1d3e-4ee0-bae5-9ae4258c086c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:28:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDIxMDItV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14998" + ], + "x-ms-request-id": [ + "ccd971ab-33a9-45ab-b547-c3bc24a70ab1" + ], + "x-ms-correlation-request-id": [ + "ccd971ab-33a9-45ab-b547-c3bc24a70ab1" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002830Z:ccd971ab-33a9-45ab-b547-c3bc24a70ab1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + } + ], + "Names": { + "CreateResourceGroup": [ + "sqlcrudtest-2102" + ], + "CreateServer": [ + "sqlcrudtest-9529" + ], + "TestCreateUpdateDropJob": [ + "sqlcrudtest-5140" + ] + }, + "Variables": { + "DefaultLocation": "west us 2", + "SubscriptionId": "1b132fbc-df61-4dd8-bba0-71d7d4277eda" + } +} \ No newline at end of file diff --git a/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ElasticJobAgentScenarioTests/TestCreateUpdateDropJobCredential.json b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ElasticJobAgentScenarioTests/TestCreateUpdateDropJobCredential.json new file mode 100644 index 000000000000..407b6881596e --- /dev/null +++ b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ElasticJobAgentScenarioTests/TestCreateUpdateDropJobCredential.json @@ -0,0 +1,1598 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-6025?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTYwMjU/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"west us 2\",\r\n \"tags\": {\r\n \"sqlcrudtest-6025\": \"2018-05-22 00:17:08Z\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "98" + ], + "x-ms-client-request-id": [ + "08a9141f-3a47-46a3-babe-0c44147e302b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025\",\r\n \"name\": \"sqlcrudtest-6025\",\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"sqlcrudtest-6025\": \"2018-05-22 00:17:08Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "237" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:17:09 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "b674f32e-6c62-4c22-81ef-6d6ee9bae05b" + ], + "x-ms-correlation-request-id": [ + "b674f32e-6c62-4c22-81ef-6d6ee9bae05b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001709Z:b674f32e-6c62-4c22-81ef-6d6ee9bae05b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/servers/sqlcrudtest-7874?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYwMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC03ODc0P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "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\": \"west us 2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "183" + ], + "x-ms-client-request-id": [ + "78f7d031-bb4f-449c-9b6a-fa106b7081d8" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertLogicalServer\",\r\n \"startTime\": \"2018-05-22T00:17:13.553Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "74" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:17:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/locations/westus2/serverOperationResults/8eca8525-7a73-41c7-ad6d-6bdcf575b4d7?api-version=2015-05-01-preview" + ], + "Retry-After": [ + "1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/8eca8525-7a73-41c7-ad6d-6bdcf575b4d7?api-version=2015-05-01-preview" + ], + "x-ms-request-id": [ + "8eca8525-7a73-41c7-ad6d-6bdcf575b4d7" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "5d85cfb7-1bfe-4e34-a67c-305c5fb50166" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001713Z:5d85cfb7-1bfe-4e34-a67c-305c5fb50166" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/8eca8525-7a73-41c7-ad6d-6bdcf575b4d7?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYwMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi84ZWNhODUyNS03YTczLTQxYzctYWQ2ZC02YmRjZjU3NWI0ZDc/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"8eca8525-7a73-41c7-ad6d-6bdcf575b4d7\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:17:13.553Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:17:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "97d724ad-debd-4b4c-aad0-835ceae9c5b5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "d86f26c1-ed15-4010-9719-55b25d9d263c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001723Z:d86f26c1-ed15-4010-9719-55b25d9d263c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/8eca8525-7a73-41c7-ad6d-6bdcf575b4d7?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYwMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi84ZWNhODUyNS03YTczLTQxYzctYWQ2ZC02YmRjZjU3NWI0ZDc/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"8eca8525-7a73-41c7-ad6d-6bdcf575b4d7\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:17:13.553Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:17:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "d230dcc6-99c1-4463-851c-b73aa091bb8a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "eb002520-895f-4999-ad99-0d8f47ed71e2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001743Z:eb002520-895f-4999-ad99-0d8f47ed71e2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/8eca8525-7a73-41c7-ad6d-6bdcf575b4d7?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYwMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi84ZWNhODUyNS03YTczLTQxYzctYWQ2ZC02YmRjZjU3NWI0ZDc/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"8eca8525-7a73-41c7-ad6d-6bdcf575b4d7\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T00:17:13.553Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:18:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f9e5cd9d-67d3-4b10-a358-3bac33f03634" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "c425f829-43bf-4414-a2bf-bda1b8e59224" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001803Z:c425f829-43bf-4414-a2bf-bda1b8e59224" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/servers/sqlcrudtest-7874?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYwMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC03ODc0P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.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-7874.database.windows.net\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/servers/sqlcrudtest-7874\",\r\n \"name\": \"sqlcrudtest-7874\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:18:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b0fe88ce-5d91-405c-9878-ecbe04acb72e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "283cc934-c9ba-4efa-9c4e-dd0887862565" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001803Z:283cc934-c9ba-4efa-9c4e-dd0887862565" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/servers/sqlcrudtest-7874/databases/sqlcrudtest-7344?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYwMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC03ODc0L2RhdGFiYXNlcy9zcWxjcnVkdGVzdC03MzQ0P2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"westus2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "29" + ], + "x-ms-client-request-id": [ + "8f342489-e09e-427f-ad46-458686acd371" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"CreateLogicalDatabase\",\r\n \"startTime\": \"2018-05-22T00:18:04.283Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "76" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:18:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/locations/westus2/databaseOperationResults/12906b1f-52d5-4018-96fb-75ed1a42208b?api-version=2017-10-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/12906b1f-52d5-4018-96fb-75ed1a42208b?api-version=2017-10-01-preview" + ], + "x-ms-request-id": [ + "0b1e9dca-d03b-4883-bc55-b7562cabd2fc" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "4c28ba4a-a23f-42b1-8c6d-fa82026576e1" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001804Z:4c28ba4a-a23f-42b1-8c6d-fa82026576e1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/12906b1f-52d5-4018-96fb-75ed1a42208b?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYwMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uLzEyOTA2YjFmLTUyZDUtNDAxOC05NmZiLTc1ZWQxYTQyMjA4Yj9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"12906b1f-52d5-4018-96fb-75ed1a42208b\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:18:04.283Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:18:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "5080232d-340f-4a14-948c-cf3713323e5d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "dfa9790c-542a-4312-88b7-65f1c0daae62" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001819Z:dfa9790c-542a-4312-88b7-65f1c0daae62" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/12906b1f-52d5-4018-96fb-75ed1a42208b?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYwMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uLzEyOTA2YjFmLTUyZDUtNDAxOC05NmZiLTc1ZWQxYTQyMjA4Yj9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"12906b1f-52d5-4018-96fb-75ed1a42208b\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:18:04.283Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:18:34 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "fcc7a572-a58e-436f-84ca-4ebf3ed592a3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "76dfac2e-59a6-4a63-97dd-9928afbaf797" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001835Z:76dfac2e-59a6-4a63-97dd-9928afbaf797" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/12906b1f-52d5-4018-96fb-75ed1a42208b?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYwMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uLzEyOTA2YjFmLTUyZDUtNDAxOC05NmZiLTc1ZWQxYTQyMjA4Yj9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"12906b1f-52d5-4018-96fb-75ed1a42208b\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:18:04.283Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:18:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f9ffc16e-fc23-4cce-836d-dbcdf32866f0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "062c39ca-ab24-43bd-a000-e50be7d71640" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001850Z:062c39ca-ab24-43bd-a000-e50be7d71640" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/12906b1f-52d5-4018-96fb-75ed1a42208b?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYwMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uLzEyOTA2YjFmLTUyZDUtNDAxOC05NmZiLTc1ZWQxYTQyMjA4Yj9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"12906b1f-52d5-4018-96fb-75ed1a42208b\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T00:18:04.283Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:19:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "651bee55-4b6b-4d0b-900b-f151d2d5cbe7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "ce085ad9-4ccd-4f0e-8db7-cf2aed4dfbbf" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001905Z:ce085ad9-4ccd-4f0e-8db7-cf2aed4dfbbf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/servers/sqlcrudtest-7874/databases/sqlcrudtest-7344?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYwMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC03ODc0L2RhdGFiYXNlcy9zcWxjcnVkdGVzdC03MzQ0P2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 10\r\n },\r\n \"kind\": \"v12.0,user\",\r\n \"properties\": {\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": 268435456000,\r\n \"status\": \"Online\",\r\n \"databaseId\": \"7a1cd104-c8a4-4a14-aa9f-cf4824790c9c\",\r\n \"creationDate\": \"2018-05-22T00:18:04.503Z\",\r\n \"currentServiceObjectiveName\": \"S0\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"defaultSecondaryLocation\": \"West Central US\",\r\n \"catalogCollation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"zoneRedundant\": false,\r\n \"earliestRestoreDate\": \"2018-05-22T00:49:03.257Z\",\r\n \"readScale\": \"Disabled\",\r\n \"currentSku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 10\r\n }\r\n },\r\n \"location\": \"westus2\",\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/servers/sqlcrudtest-7874/databases/sqlcrudtest-7344\",\r\n \"name\": \"sqlcrudtest-7344\",\r\n \"type\": \"Microsoft.Sql/servers/databases\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:19:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7f304579-31a5-4b50-8e2c-f23c06b0fea5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "60b2c5fb-4f21-406d-9655-21b6e50a0aad" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001905Z:60b2c5fb-4f21-406d-9655-21b6e50a0aad" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/servers/sqlcrudtest-7874/jobAgents/agent?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYwMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC03ODc0L2pvYkFnZW50cy9hZ2VudD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/servers/sqlcrudtest-7874/databases/sqlcrudtest-7344\"\r\n },\r\n \"location\": \"westus2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "235" + ], + "x-ms-client-request-id": [ + "69fd5d1c-2225-442d-91ff-bab2df367b0b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertJobAccount\",\r\n \"startTime\": \"2018-05-22T00:19:05.39Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "70" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:19:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/locations/westus2/jobAgentOperationResults/52201af0-e143-49e4-aa89-c76ea0291a1c?api-version=2017-03-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/52201af0-e143-49e4-aa89-c76ea0291a1c?api-version=2017-03-01-preview" + ], + "x-ms-request-id": [ + "8f3def10-c119-4c77-af5c-0cee6786cb72" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "e171a1cb-9506-406e-9bde-90f11bcf2f61" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001905Z:e171a1cb-9506-406e-9bde-90f11bcf2f61" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/52201af0-e143-49e4-aa89-c76ea0291a1c?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYwMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzUyMjAxYWYwLWUxNDMtNDllNC1hYTg5LWM3NmVhMDI5MWExYz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"52201af0-e143-49e4-aa89-c76ea0291a1c\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:19:05.39Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:19:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "49e2f364-e50e-4a65-b718-f85ce71b7fa8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "b7f68565-211f-4a58-aa6f-a5bc14021c60" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001920Z:b7f68565-211f-4a58-aa6f-a5bc14021c60" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/52201af0-e143-49e4-aa89-c76ea0291a1c?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYwMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzUyMjAxYWYwLWUxNDMtNDllNC1hYTg5LWM3NmVhMDI5MWExYz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"52201af0-e143-49e4-aa89-c76ea0291a1c\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:19:05.39Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:19:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "6199ebf2-3236-4435-84ae-1bb59cb3ac68" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "03c7d8f6-82d3-45b5-9a3f-4b0be68e4814" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001935Z:03c7d8f6-82d3-45b5-9a3f-4b0be68e4814" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/52201af0-e143-49e4-aa89-c76ea0291a1c?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYwMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzUyMjAxYWYwLWUxNDMtNDllNC1hYTg5LWM3NmVhMDI5MWExYz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"52201af0-e143-49e4-aa89-c76ea0291a1c\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:19:05.39Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:19:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ff85ad62-4587-427b-9dff-b3f30f325692" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "19f77071-35cf-440e-a03c-047ae13a6fab" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001950Z:19f77071-35cf-440e-a03c-047ae13a6fab" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/52201af0-e143-49e4-aa89-c76ea0291a1c?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYwMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzUyMjAxYWYwLWUxNDMtNDllNC1hYTg5LWM3NmVhMDI5MWExYz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"52201af0-e143-49e4-aa89-c76ea0291a1c\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:19:05.39Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:20:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "0275cfb8-b58b-412a-9f0e-bd56f1c6d244" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "007aafa9-8ff2-478d-b9c9-dc6c70cfad14" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002005Z:007aafa9-8ff2-478d-b9c9-dc6c70cfad14" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/52201af0-e143-49e4-aa89-c76ea0291a1c?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYwMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzUyMjAxYWYwLWUxNDMtNDllNC1hYTg5LWM3NmVhMDI5MWExYz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"52201af0-e143-49e4-aa89-c76ea0291a1c\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T00:19:05.39Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:20:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ebd85c8c-13aa-4d5e-b3a9-ae99b89668c1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "2cfef623-3aea-4e50-929b-2eff96ba5239" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002020Z:2cfef623-3aea-4e50-929b-2eff96ba5239" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/servers/sqlcrudtest-7874/jobAgents/agent?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYwMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC03ODc0L2pvYkFnZW50cy9hZ2VudD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Agent\",\r\n \"capacity\": 100\r\n },\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/servers/sqlcrudtest-7874/databases/sqlcrudtest-7344\",\r\n \"state\": \"Ready\"\r\n },\r\n \"location\": \"westus2\",\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/servers/sqlcrudtest-7874/jobAgents/agent\",\r\n \"name\": \"agent\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:20:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "29c6cbe6-b9c9-4501-9761-26ac4ce2b3ee" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "18d449d4-07d8-48ea-9fef-907590ddc5e0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002021Z:18d449d4-07d8-48ea-9fef-907590ddc5e0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/servers/sqlcrudtest-7874/jobAgents/agent/credentials/dummylogin?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYwMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC03ODc0L2pvYkFnZW50cy9hZ2VudC9jcmVkZW50aWFscy9kdW1teWxvZ2luP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"username\": \"a\",\r\n \"password\": \"b!\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "72" + ], + "x-ms-client-request-id": [ + "d75bcb8a-2a92-4c5c-b851-c1c9e893ee1b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"username\": \"a\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/servers/sqlcrudtest-7874/jobAgents/agent/credentials/dummylogin\",\r\n \"name\": \"dummylogin\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/credentials\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "283" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:20:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "2dfe6fde-354b-4662-8c41-30c0a86ca9ce" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "31d2e6a8-039e-4b5b-9337-801df8d3fdf5" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002022Z:31d2e6a8-039e-4b5b-9337-801df8d3fdf5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/servers/sqlcrudtest-7874/jobAgents/agent/credentials/dummylogin?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYwMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC03ODc0L2pvYkFnZW50cy9hZ2VudC9jcmVkZW50aWFscy9kdW1teWxvZ2luP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"username\": \"dummylogin\",\r\n \"password\": \"Un53cuRE!\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "88" + ], + "x-ms-client-request-id": [ + "4835e98d-e1f0-4400-a0bd-df97b9230a13" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"username\": \"dummylogin\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/servers/sqlcrudtest-7874/jobAgents/agent/credentials/dummylogin\",\r\n \"name\": \"dummylogin\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/credentials\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:20:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7c4a342a-eeaf-45f1-b442-47746190e895" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "3e463f49-9d94-451d-9b0d-7f502e349ffe" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002022Z:3e463f49-9d94-451d-9b0d-7f502e349ffe" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/servers/sqlcrudtest-7874/jobAgents/agent/credentials?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYwMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC03ODc0L2pvYkFnZW50cy9hZ2VudC9jcmVkZW50aWFscz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "10b87d67-59a9-4730-8e09-3a09fad91578" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"username\": \"dummylogin\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/servers/sqlcrudtest-7874/jobAgents/agent/credentials/dummylogin\",\r\n \"name\": \"dummylogin\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/credentials\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:20:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "4c6f25ea-035e-4cc5-a7be-acc5b0bd29a9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "3e79fa27-ed7e-4000-acdb-0c227ba4c953" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002022Z:3e79fa27-ed7e-4000-acdb-0c227ba4c953" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6025/providers/Microsoft.Sql/servers/sqlcrudtest-7874/jobAgents/agent/credentials/dummylogin?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYwMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC03ODc0L2pvYkFnZW50cy9hZ2VudC9jcmVkZW50aWFscy9kdW1teWxvZ2luP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b7a9a6b4-c34e-40a5-b561-9aaa28f6e9e2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:20:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "29a600e5-c40c-4549-904a-e7baa94031f7" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "8d4dcd4d-1536-4737-b2ce-5b6535fbce1f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002022Z:8d4dcd4d-1536-4737-b2ce-5b6535fbce1f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-6025?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTYwMjU/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "318ae6f9-13fe-4d28-aec7-43e025ba570e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:20:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDYwMjUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "e9b4ee93-cf4b-42a0-86db-c90d78a1b157" + ], + "x-ms-correlation-request-id": [ + "e9b4ee93-cf4b-42a0-86db-c90d78a1b157" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002023Z:e9b4ee93-cf4b-42a0-86db-c90d78a1b157" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-6025?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTYwMjU/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "01d1c4fc-eb5a-4ef6-89ee-7fb9bf57d3ba" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:20:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDYwMjUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14998" + ], + "x-ms-request-id": [ + "22c09fd0-82a0-491a-afe5-56ab2cb48764" + ], + "x-ms-correlation-request-id": [ + "22c09fd0-82a0-491a-afe5-56ab2cb48764" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002023Z:22c09fd0-82a0-491a-afe5-56ab2cb48764" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + } + ], + "Names": { + "CreateResourceGroup": [ + "sqlcrudtest-6025" + ], + "CreateServer": [ + "sqlcrudtest-7874" + ], + "TestCreateUpdateDropJobCredential": [ + "sqlcrudtest-7344" + ] + }, + "Variables": { + "DefaultLocation": "west us 2", + "SubscriptionId": "1b132fbc-df61-4dd8-bba0-71d7d4277eda" + } +} \ No newline at end of file diff --git a/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ElasticJobAgentScenarioTests/TestCreateUpdateDropJobStep.json b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ElasticJobAgentScenarioTests/TestCreateUpdateDropJobStep.json new file mode 100644 index 000000000000..943391b8c2ed --- /dev/null +++ b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ElasticJobAgentScenarioTests/TestCreateUpdateDropJobStep.json @@ -0,0 +1,1982 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-8393?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTgzOTM/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"west us 2\",\r\n \"tags\": {\r\n \"sqlcrudtest-8393\": \"2018-05-22 00:20:27Z\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "98" + ], + "x-ms-client-request-id": [ + "e055dd05-7c33-4156-84f1-2ce6fc3f5278" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393\",\r\n \"name\": \"sqlcrudtest-8393\",\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"sqlcrudtest-8393\": \"2018-05-22 00:20:27Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "237" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:20:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "f717c481-e70d-4916-bf76-51ad1a6c7622" + ], + "x-ms-correlation-request-id": [ + "f717c481-e70d-4916-bf76-51ad1a6c7622" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002029Z:f717c481-e70d-4916-bf76-51ad1a6c7622" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgzOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC02MzYxP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "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\": \"west us 2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "183" + ], + "x-ms-client-request-id": [ + "d3b0e857-0f44-423d-93c9-2cd52d4e9805" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertLogicalServer\",\r\n \"startTime\": \"2018-05-22T00:20:35.137Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "74" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:20:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/locations/westus2/serverOperationResults/69ab1edb-65e0-4e58-82f0-dd0d803329c0?api-version=2015-05-01-preview" + ], + "Retry-After": [ + "1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/69ab1edb-65e0-4e58-82f0-dd0d803329c0?api-version=2015-05-01-preview" + ], + "x-ms-request-id": [ + "69ab1edb-65e0-4e58-82f0-dd0d803329c0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "5f4797bf-fb92-4a40-9b03-e43b6c8be44a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002035Z:5f4797bf-fb92-4a40-9b03-e43b6c8be44a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/69ab1edb-65e0-4e58-82f0-dd0d803329c0?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgzOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi82OWFiMWVkYi02NWUwLTRlNTgtODJmMC1kZDBkODAzMzI5YzA/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"69ab1edb-65e0-4e58-82f0-dd0d803329c0\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:20:35.137Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:20:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "1edfac4d-49fb-48b5-9f4c-b9d0b5022b73" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "bf14ab55-783a-4f28-b061-ecdda0b56ffd" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002045Z:bf14ab55-783a-4f28-b061-ecdda0b56ffd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/69ab1edb-65e0-4e58-82f0-dd0d803329c0?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgzOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi82OWFiMWVkYi02NWUwLTRlNTgtODJmMC1kZDBkODAzMzI5YzA/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"69ab1edb-65e0-4e58-82f0-dd0d803329c0\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:20:35.137Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:21:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "be0b285c-f5ed-449c-bf08-36efc49cc3bc" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "fc191042-bc41-4496-bbcf-4ed3ef150b10" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002105Z:fc191042-bc41-4496-bbcf-4ed3ef150b10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/69ab1edb-65e0-4e58-82f0-dd0d803329c0?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgzOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi82OWFiMWVkYi02NWUwLTRlNTgtODJmMC1kZDBkODAzMzI5YzA/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"69ab1edb-65e0-4e58-82f0-dd0d803329c0\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T00:20:35.137Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:21:24 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "cc1f716e-5f69-4f3b-bebc-a970b86290ce" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "b585aec5-f001-4e8f-b4a4-c36c3ff09827" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002125Z:b585aec5-f001-4e8f-b4a4-c36c3ff09827" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgzOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC02MzYxP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.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-6361.database.windows.net\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361\",\r\n \"name\": \"sqlcrudtest-6361\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:21:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "0ead810f-e94b-46a5-8e77-8260faa9dfcc" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "2456bc78-e56b-4a53-9e2f-367259ed0a77" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002125Z:2456bc78-e56b-4a53-9e2f-367259ed0a77" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/databases/sqlcrudtest-8819?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgzOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC02MzYxL2RhdGFiYXNlcy9zcWxjcnVkdGVzdC04ODE5P2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"westus2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "29" + ], + "x-ms-client-request-id": [ + "a30fbb9c-646e-4bfd-9fc1-28b897174e4f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"CreateLogicalDatabase\",\r\n \"startTime\": \"2018-05-22T00:21:25.85Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "75" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:21:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/locations/westus2/databaseOperationResults/79b99117-64c3-4942-b850-8db0b8bef109?api-version=2017-10-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/79b99117-64c3-4942-b850-8db0b8bef109?api-version=2017-10-01-preview" + ], + "x-ms-request-id": [ + "b1ddcb1f-9a77-4168-bd2b-cbfcbe029b6d" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "7d25d202-f1b2-469b-b04b-aaaa1380565b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002125Z:7d25d202-f1b2-469b-b04b-aaaa1380565b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/79b99117-64c3-4942-b850-8db0b8bef109?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgzOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uLzc5Yjk5MTE3LTY0YzMtNDk0Mi1iODUwLThkYjBiOGJlZjEwOT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"79b99117-64c3-4942-b850-8db0b8bef109\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:21:25.85Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:21:39 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e095c939-6617-4d60-bced-eb5c2ad36e93" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "419a042e-535c-4cda-af7c-289c7ec60192" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002140Z:419a042e-535c-4cda-af7c-289c7ec60192" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/79b99117-64c3-4942-b850-8db0b8bef109?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgzOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uLzc5Yjk5MTE3LTY0YzMtNDk0Mi1iODUwLThkYjBiOGJlZjEwOT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"79b99117-64c3-4942-b850-8db0b8bef109\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:21:25.85Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:21:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "6b0f7623-ee19-48ff-a9d2-f5911f2370bc" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "b1f06725-8fba-4c47-97cf-ef510b6cdb82" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002156Z:b1f06725-8fba-4c47-97cf-ef510b6cdb82" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/79b99117-64c3-4942-b850-8db0b8bef109?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgzOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uLzc5Yjk5MTE3LTY0YzMtNDk0Mi1iODUwLThkYjBiOGJlZjEwOT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"79b99117-64c3-4942-b850-8db0b8bef109\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:21:25.85Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:22:10 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "4b867f85-ebea-4ae7-8aaa-325d9d223af7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "48ce4526-1f0a-4caa-8b75-f22ee3501029" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002211Z:48ce4526-1f0a-4caa-8b75-f22ee3501029" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/79b99117-64c3-4942-b850-8db0b8bef109?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgzOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uLzc5Yjk5MTE3LTY0YzMtNDk0Mi1iODUwLThkYjBiOGJlZjEwOT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"79b99117-64c3-4942-b850-8db0b8bef109\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T00:21:25.85Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:22:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ee933283-61ee-4421-bcd2-9fe5f3f3b6c9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "06702ff5-d342-4d91-a5c9-ee3263cc9199" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002226Z:06702ff5-d342-4d91-a5c9-ee3263cc9199" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/databases/sqlcrudtest-8819?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgzOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC02MzYxL2RhdGFiYXNlcy9zcWxjcnVkdGVzdC04ODE5P2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 10\r\n },\r\n \"kind\": \"v12.0,user\",\r\n \"properties\": {\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": 268435456000,\r\n \"status\": \"Online\",\r\n \"databaseId\": \"debdfeef-5702-464e-ab4e-74730f473185\",\r\n \"creationDate\": \"2018-05-22T00:21:26.1Z\",\r\n \"currentServiceObjectiveName\": \"S0\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"defaultSecondaryLocation\": \"West Central US\",\r\n \"catalogCollation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"zoneRedundant\": false,\r\n \"earliestRestoreDate\": \"2018-05-22T00:52:16.917Z\",\r\n \"readScale\": \"Disabled\",\r\n \"currentSku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 10\r\n }\r\n },\r\n \"location\": \"westus2\",\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/databases/sqlcrudtest-8819\",\r\n \"name\": \"sqlcrudtest-8819\",\r\n \"type\": \"Microsoft.Sql/servers/databases\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:22:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "81703154-6dd1-47e7-8514-678047a82b52" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "a6b0b45e-c190-4ee7-a8f9-bb0677f0dac3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002226Z:a6b0b45e-c190-4ee7-a8f9-bb0677f0dac3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgzOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC02MzYxL2pvYkFnZW50cy9hZ2VudD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/databases/sqlcrudtest-8819\"\r\n },\r\n \"location\": \"westus2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "235" + ], + "x-ms-client-request-id": [ + "b344830b-7e81-4c9e-851f-0c5185660416" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertJobAccount\",\r\n \"startTime\": \"2018-05-22T00:22:26.783Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "71" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:22:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/locations/westus2/jobAgentOperationResults/7ab5f1c9-0437-44bf-ae47-01a40957a274?api-version=2017-03-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/7ab5f1c9-0437-44bf-ae47-01a40957a274?api-version=2017-03-01-preview" + ], + "x-ms-request-id": [ + "d7c71cdb-6020-44d4-9d20-9ca37af47b7a" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "ddf4d3a4-c02a-4139-bb36-a79e61cfcc20" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002226Z:ddf4d3a4-c02a-4139-bb36-a79e61cfcc20" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/7ab5f1c9-0437-44bf-ae47-01a40957a274?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgzOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzdhYjVmMWM5LTA0MzctNDRiZi1hZTQ3LTAxYTQwOTU3YTI3ND9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"7ab5f1c9-0437-44bf-ae47-01a40957a274\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:22:26.783Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:22:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "69f498cf-656f-4361-95c2-d118de10d8e5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "3e56eff3-4d65-481b-a176-887a6696e5b8" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002241Z:3e56eff3-4d65-481b-a176-887a6696e5b8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/7ab5f1c9-0437-44bf-ae47-01a40957a274?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgzOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzdhYjVmMWM5LTA0MzctNDRiZi1hZTQ3LTAxYTQwOTU3YTI3ND9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"7ab5f1c9-0437-44bf-ae47-01a40957a274\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:22:26.783Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:22:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e28b9ae5-803b-4da8-b011-0fc739845dbf" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "28f961b1-d95e-4a1f-b18e-05ac5d16d89d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002256Z:28f961b1-d95e-4a1f-b18e-05ac5d16d89d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/7ab5f1c9-0437-44bf-ae47-01a40957a274?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgzOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzdhYjVmMWM5LTA0MzctNDRiZi1hZTQ3LTAxYTQwOTU3YTI3ND9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"7ab5f1c9-0437-44bf-ae47-01a40957a274\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:22:26.783Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:23:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "1e88453e-ce93-4ce5-ae8b-e9d02c9f07a3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "94db6f31-8d0a-42a8-9341-6c324c930d7e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002312Z:94db6f31-8d0a-42a8-9341-6c324c930d7e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/7ab5f1c9-0437-44bf-ae47-01a40957a274?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgzOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzdhYjVmMWM5LTA0MzctNDRiZi1hZTQ3LTAxYTQwOTU3YTI3ND9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"7ab5f1c9-0437-44bf-ae47-01a40957a274\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:22:26.783Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:23:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "802ce37f-5091-4e23-9b32-1cf3ea82fbb8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "767aed58-cd59-4abf-8bf2-bbf38b42cfbe" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002327Z:767aed58-cd59-4abf-8bf2-bbf38b42cfbe" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/7ab5f1c9-0437-44bf-ae47-01a40957a274?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgzOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzdhYjVmMWM5LTA0MzctNDRiZi1hZTQ3LTAxYTQwOTU3YTI3ND9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"7ab5f1c9-0437-44bf-ae47-01a40957a274\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:22:26.783Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:23:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "34244548-f7ce-4d20-af3f-45e66c4717ad" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "0d3d4c5b-9bb1-4362-b14a-a4247716d048" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002342Z:0d3d4c5b-9bb1-4362-b14a-a4247716d048" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/7ab5f1c9-0437-44bf-ae47-01a40957a274?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgzOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzdhYjVmMWM5LTA0MzctNDRiZi1hZTQ3LTAxYTQwOTU3YTI3ND9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"7ab5f1c9-0437-44bf-ae47-01a40957a274\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:22:26.783Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:23:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "282f4915-08ff-4d55-9516-1ad4fc5b6f86" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "024d1fb5-1adf-4ee9-a4d0-3b624b08d983" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002357Z:024d1fb5-1adf-4ee9-a4d0-3b624b08d983" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/7ab5f1c9-0437-44bf-ae47-01a40957a274?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgzOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzdhYjVmMWM5LTA0MzctNDRiZi1hZTQ3LTAxYTQwOTU3YTI3ND9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"7ab5f1c9-0437-44bf-ae47-01a40957a274\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:22:26.783Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:24:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "0645762f-739c-42e1-b652-61c8926fad38" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "3306f0f8-3202-4a0f-8f5f-2806e2d3cdda" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002412Z:3306f0f8-3202-4a0f-8f5f-2806e2d3cdda" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/7ab5f1c9-0437-44bf-ae47-01a40957a274?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgzOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzdhYjVmMWM5LTA0MzctNDRiZi1hZTQ3LTAxYTQwOTU3YTI3ND9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"7ab5f1c9-0437-44bf-ae47-01a40957a274\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T00:22:26.783Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:24:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "1fc2342d-8ca0-4657-9ac1-ee171ea8edb7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "7abef27f-b5c3-4ac1-86da-45b2b6192fbb" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002427Z:7abef27f-b5c3-4ac1-86da-45b2b6192fbb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgzOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC02MzYxL2pvYkFnZW50cy9hZ2VudD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Agent\",\r\n \"capacity\": 100\r\n },\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/databases/sqlcrudtest-8819\",\r\n \"state\": \"Ready\"\r\n },\r\n \"location\": \"westus2\",\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent\",\r\n \"name\": \"agent\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:24:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "34eae5a9-e72f-4246-aa45-794d6b51d027" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "dcff21a9-5aaa-42b9-bdf2-f2a725def8d3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002427Z:dcff21a9-5aaa-42b9-bdf2-f2a725def8d3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent/credentials/dummylogin?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgzOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC02MzYxL2pvYkFnZW50cy9hZ2VudC9jcmVkZW50aWFscy9kdW1teWxvZ2luP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"username\": \"dummylogin\",\r\n \"password\": \"Un53cuRE!\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "88" + ], + "x-ms-client-request-id": [ + "e73519a2-a7f6-4c6c-84f8-00d92735237d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"username\": \"dummylogin\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent/credentials/dummylogin\",\r\n \"name\": \"dummylogin\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/credentials\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "292" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:24:27 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "98169511-2426-48a9-bf13-42ef47e6d1bf" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "6f8f2805-d24d-4d3f-9415-37abfd2a3800" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002428Z:6f8f2805-d24d-4d3f-9415-37abfd2a3800" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent/targetGroups/tg1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgzOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC02MzYxL2pvYkFnZW50cy9hZ2VudC90YXJnZXRHcm91cHMvdGcxP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"members\": [\r\n {\r\n \"membershipType\": \"Include\",\r\n \"type\": \"SqlServer\",\r\n \"serverName\": \"sqlcrudtest-6361\",\r\n \"refreshCredential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent/credentials/dummylogin\"\r\n }\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "386" + ], + "x-ms-client-request-id": [ + "2169f669-b7fa-418b-8c61-4250c31260c4" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"members\": [\r\n {\r\n \"membershipType\": \"Include\",\r\n \"type\": \"SqlServer\",\r\n \"serverName\": \"sqlcrudtest-6361\",\r\n \"refreshCredential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent/credentials/dummylogin\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent/targetGroups/tg1\",\r\n \"name\": \"tg1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/targetGroups\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "542" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:24:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "47516e5b-3963-4573-965e-0ae5c29c57d7" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "cf2803fc-33b7-4af3-b5c2-344db6fccf30" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002428Z:cf2803fc-33b7-4af3-b5c2-344db6fccf30" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent/jobs/job1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgzOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC02MzYxL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"description\": \"Test description\",\r\n \"schedule\": {\r\n \"type\": \"Once\",\r\n \"enabled\": true\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "140" + ], + "x-ms-client-request-id": [ + "f2dd7431-bfed-45ec-a930-56d073d42b60" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"description\": \"Test description\",\r\n \"version\": 0,\r\n \"schedule\": {\r\n \"startTime\": \"0001-01-01T00:00:00Z\",\r\n \"endTime\": \"9999-12-31T11:59:59Z\",\r\n \"type\": \"Once\",\r\n \"enabled\": true\r\n }\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent/jobs/job1\",\r\n \"name\": \"job1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "397" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:24:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "a305b46d-808b-4037-a483-68b5efe5496b" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "443375e7-f69a-4afd-b5fb-0c8450319a13" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002429Z:443375e7-f69a-4afd-b5fb-0c8450319a13" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent/jobs/job1/steps/step1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgzOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC02MzYxL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvc3RlcHMvc3RlcDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"targetGroup\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent/targetGroups/tg1\",\r\n \"credential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent/credentials/dummylogin\",\r\n \"action\": {\r\n \"value\": \"SELECT 1\"\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "462" + ], + "x-ms-client-request-id": [ + "8792b0ba-f045-42c6-acad-ec5cfedda235" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"stepId\": 1,\r\n \"targetGroup\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent/targetGroups/tg1\",\r\n \"credential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent/credentials/dummylogin\",\r\n \"action\": {\r\n \"type\": \"TSql\",\r\n \"source\": \"Inline\",\r\n \"value\": \"SELECT 1\"\r\n },\r\n \"executionOptions\": {\r\n \"timeoutSeconds\": 43200,\r\n \"retryAttempts\": 10,\r\n \"initialRetryIntervalSeconds\": 1,\r\n \"maximumRetryIntervalSeconds\": 120,\r\n \"retryIntervalBackoffMultiplier\": 2.0\r\n }\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent/jobs/job1/steps/step1\",\r\n \"name\": \"step1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/steps\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "869" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:24:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "e05f73d0-a4ae-4ba0-a42c-65086ea55b8a" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-correlation-request-id": [ + "05bb73d9-f46d-4320-8338-f2facf1032a8" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002430Z:05bb73d9-f46d-4320-8338-f2facf1032a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent/jobs/job1/steps/step1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgzOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC02MzYxL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvc3RlcHMvc3RlcDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"targetGroup\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent/targetGroups/tg1\",\r\n \"credential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent/credentials/dummylogin\",\r\n \"action\": {\r\n \"type\": \"TSql\",\r\n \"source\": \"Inline\",\r\n \"value\": \"SELECT 1\"\r\n },\r\n \"output\": {\r\n \"type\": \"SqlDatabase\",\r\n \"subscriptionId\": \"00000000-0000-0000-0000-000000000000\",\r\n \"resourceGroupName\": \"rg1\",\r\n \"serverName\": \"s1\",\r\n \"databaseName\": \"db1\",\r\n \"schemaName\": \"dbo\",\r\n \"tableName\": \"tbl\",\r\n \"credential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent/credentials/dummylogin\"\r\n },\r\n \"executionOptions\": {\r\n \"timeoutSeconds\": 10000,\r\n \"retryAttempts\": 1000,\r\n \"initialRetryIntervalSeconds\": 100,\r\n \"maximumRetryIntervalSeconds\": 1000,\r\n \"retryIntervalBackoffMultiplier\": 1.5\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "1203" + ], + "x-ms-client-request-id": [ + "0733b534-3cb9-4f5d-84dc-3f6cf6810900" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"stepId\": 1,\r\n \"targetGroup\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent/targetGroups/tg1\",\r\n \"credential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent/credentials/dummylogin\",\r\n \"action\": {\r\n \"type\": \"TSql\",\r\n \"source\": \"Inline\",\r\n \"value\": \"SELECT 1\"\r\n },\r\n \"output\": {\r\n \"type\": \"SqlDatabase\",\r\n \"resourceGroupName\": \"rg1\",\r\n \"serverName\": \"s1\",\r\n \"databaseName\": \"db1\",\r\n \"schemaName\": \"dbo\",\r\n \"tableName\": \"tbl\",\r\n \"credential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent/credentials/dummylogin\"\r\n },\r\n \"executionOptions\": {\r\n \"timeoutSeconds\": 10000,\r\n \"retryAttempts\": 1000,\r\n \"initialRetryIntervalSeconds\": 100,\r\n \"maximumRetryIntervalSeconds\": 1000,\r\n \"retryIntervalBackoffMultiplier\": 1.5\r\n }\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent/jobs/job1/steps/step1\",\r\n \"name\": \"step1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/steps\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:24:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "abfbd03a-7b30-4987-939e-63193c8de329" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1192" + ], + "x-ms-correlation-request-id": [ + "5aeabe19-867a-46bb-9c13-5031f4f1cca0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002430Z:5aeabe19-867a-46bb-9c13-5031f4f1cca0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent/jobs/job1/steps?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgzOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC02MzYxL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvc3RlcHM/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c76fe375-bafb-40ac-b24c-7be79be7cf36" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"stepId\": 1,\r\n \"targetGroup\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent/targetGroups/tg1\",\r\n \"credential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent/credentials/dummylogin\",\r\n \"action\": {\r\n \"type\": \"TSql\",\r\n \"source\": \"Inline\",\r\n \"value\": \"SELECT 1\"\r\n },\r\n \"output\": {\r\n \"type\": \"SqlDatabase\",\r\n \"resourceGroupName\": \"rg1\",\r\n \"serverName\": \"s1\",\r\n \"databaseName\": \"db1\",\r\n \"schemaName\": \"dbo\",\r\n \"tableName\": \"tbl\",\r\n \"credential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent/credentials/dummylogin\"\r\n },\r\n \"executionOptions\": {\r\n \"timeoutSeconds\": 10000,\r\n \"retryAttempts\": 1000,\r\n \"initialRetryIntervalSeconds\": 100,\r\n \"maximumRetryIntervalSeconds\": 1000,\r\n \"retryIntervalBackoffMultiplier\": 1.5\r\n }\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent/jobs/job1/steps/step1\",\r\n \"name\": \"step1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/steps\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:24:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "d06ce36c-68d7-46de-9921-86a8a8eaf096" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-correlation-request-id": [ + "b6e576e4-599f-4203-8bef-2e16ffba3cd0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002430Z:b6e576e4-599f-4203-8bef-2e16ffba3cd0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8393/providers/Microsoft.Sql/servers/sqlcrudtest-6361/jobAgents/agent/jobs/job1/steps/step1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgzOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC02MzYxL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvc3RlcHMvc3RlcDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5e5be27a-4962-47e0-a221-e58b18466568" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:24:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "1442f03c-999f-45fd-ab86-be6a37cea786" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "48e6ddd2-2945-43b2-ad46-507208da2955" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002431Z:48e6ddd2-2945-43b2-ad46-507208da2955" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-8393?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTgzOTM/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ab4e154b-15a6-4d05-bf65-518ba9a76840" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:24:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDgzOTMtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "5d6903a3-ba65-4b7f-8111-7feb647d1448" + ], + "x-ms-correlation-request-id": [ + "5d6903a3-ba65-4b7f-8111-7feb647d1448" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002431Z:5d6903a3-ba65-4b7f-8111-7feb647d1448" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-8393?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTgzOTM/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2a4c557d-9ccf-413b-99b1-885ac4ca2955" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:24:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDgzOTMtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14998" + ], + "x-ms-request-id": [ + "cc318ef8-8781-40da-8e97-7fd6dc8443bf" + ], + "x-ms-correlation-request-id": [ + "cc318ef8-8781-40da-8e97-7fd6dc8443bf" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T002431Z:cc318ef8-8781-40da-8e97-7fd6dc8443bf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + } + ], + "Names": { + "CreateResourceGroup": [ + "sqlcrudtest-8393" + ], + "CreateServer": [ + "sqlcrudtest-6361" + ], + "TestCreateUpdateDropJobStep": [ + "sqlcrudtest-8819" + ] + }, + "Variables": { + "DefaultLocation": "west us 2", + "SubscriptionId": "1b132fbc-df61-4dd8-bba0-71d7d4277eda" + } +} \ No newline at end of file diff --git a/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ElasticJobAgentScenarioTests/TestCreateUpdateDropTargetGroup.json b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ElasticJobAgentScenarioTests/TestCreateUpdateDropTargetGroup.json new file mode 100644 index 000000000000..8e324017ba72 --- /dev/null +++ b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ElasticJobAgentScenarioTests/TestCreateUpdateDropTargetGroup.json @@ -0,0 +1,1787 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-6442?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTY0NDI/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"west us 2\",\r\n \"tags\": {\r\n \"sqlcrudtest-6442\": \"2018-05-22 00:13:21Z\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "98" + ], + "x-ms-client-request-id": [ + "1256d1dd-73f7-47ca-8b14-e96dac67b5b2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442\",\r\n \"name\": \"sqlcrudtest-6442\",\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"sqlcrudtest-6442\": \"2018-05-22 00:13:21Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "237" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:13:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "a53dd609-88cd-42ad-935b-4f0538800584" + ], + "x-ms-correlation-request-id": [ + "a53dd609-88cd-42ad-935b-4f0538800584" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001322Z:a53dd609-88cd-42ad-935b-4f0538800584" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05MjQyP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "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\": \"west us 2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "183" + ], + "x-ms-client-request-id": [ + "8a313bba-d117-4c43-942f-99738f1702b8" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertLogicalServer\",\r\n \"startTime\": \"2018-05-22T00:13:25.207Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "74" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:13:24 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/locations/westus2/serverOperationResults/e8514573-8323-477c-9aa4-ef2d9e6bca72?api-version=2015-05-01-preview" + ], + "Retry-After": [ + "1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/e8514573-8323-477c-9aa4-ef2d9e6bca72?api-version=2015-05-01-preview" + ], + "x-ms-request-id": [ + "e8514573-8323-477c-9aa4-ef2d9e6bca72" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "26635795-8776-45ab-be5a-155d48311223" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001325Z:26635795-8776-45ab-be5a-155d48311223" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/e8514573-8323-477c-9aa4-ef2d9e6bca72?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi9lODUxNDU3My04MzIzLTQ3N2MtOWFhNC1lZjJkOWU2YmNhNzI/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"e8514573-8323-477c-9aa4-ef2d9e6bca72\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:13:25.207Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:13:34 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "91315d33-8637-44c4-ae6c-8b34c17f253c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "eac8b714-5e32-40f0-b7d9-a6255fea2ac6" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001335Z:eac8b714-5e32-40f0-b7d9-a6255fea2ac6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/e8514573-8323-477c-9aa4-ef2d9e6bca72?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi9lODUxNDU3My04MzIzLTQ3N2MtOWFhNC1lZjJkOWU2YmNhNzI/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"e8514573-8323-477c-9aa4-ef2d9e6bca72\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:13:25.207Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:13:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e9d8600a-080b-4043-bf1f-a4589649c006" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "8fbd79de-84a2-4d12-b45d-d1c55dca85e0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001355Z:8fbd79de-84a2-4d12-b45d-d1c55dca85e0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/e8514573-8323-477c-9aa4-ef2d9e6bca72?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi9lODUxNDU3My04MzIzLTQ3N2MtOWFhNC1lZjJkOWU2YmNhNzI/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"e8514573-8323-477c-9aa4-ef2d9e6bca72\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T00:13:25.207Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:14:14 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "cf183ab7-46ba-4944-a3fc-eaf5678a7d28" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "26b669a7-5d82-4977-993c-52a056162a40" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001415Z:26b669a7-5d82-4977-993c-52a056162a40" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05MjQyP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.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-9242.database.windows.net\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242\",\r\n \"name\": \"sqlcrudtest-9242\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:14:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "5c0fe1ac-d5a8-4278-90cf-39810fa7c3c1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "d0b552e7-6da9-4bae-b40c-6eb46bad5b17" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001415Z:d0b552e7-6da9-4bae-b40c-6eb46bad5b17" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242/databases/sqlcrudtest-1600?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05MjQyL2RhdGFiYXNlcy9zcWxjcnVkdGVzdC0xNjAwP2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"westus2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "29" + ], + "x-ms-client-request-id": [ + "15d9a9ce-7792-4ab5-98b1-6b03acc44a49" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"CreateLogicalDatabase\",\r\n \"startTime\": \"2018-05-22T00:14:16.14Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "75" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:14:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/locations/westus2/databaseOperationResults/437aed9c-db2d-440e-a87d-682d1ebd13f9?api-version=2017-10-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/437aed9c-db2d-440e-a87d-682d1ebd13f9?api-version=2017-10-01-preview" + ], + "x-ms-request-id": [ + "12ec5a66-aacd-4507-b6b8-945aab77634f" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "07a06384-3e17-4fb2-9264-9fb779ab2ac6" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001416Z:07a06384-3e17-4fb2-9264-9fb779ab2ac6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/437aed9c-db2d-440e-a87d-682d1ebd13f9?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uLzQzN2FlZDljLWRiMmQtNDQwZS1hODdkLTY4MmQxZWJkMTNmOT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"437aed9c-db2d-440e-a87d-682d1ebd13f9\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:14:16.14Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:14:31 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "312405da-aea4-4dac-97b9-d89d2f285ef5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "3328c0a2-2add-4f00-95e6-fef979eeea05" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001431Z:3328c0a2-2add-4f00-95e6-fef979eeea05" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/437aed9c-db2d-440e-a87d-682d1ebd13f9?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uLzQzN2FlZDljLWRiMmQtNDQwZS1hODdkLTY4MmQxZWJkMTNmOT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"437aed9c-db2d-440e-a87d-682d1ebd13f9\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:14:16.14Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:14:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7cc8bfa6-3125-4894-a14a-55c3b4c08ad5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "255097e7-eeab-48ea-bf15-96e035114458" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001446Z:255097e7-eeab-48ea-bf15-96e035114458" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/437aed9c-db2d-440e-a87d-682d1ebd13f9?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uLzQzN2FlZDljLWRiMmQtNDQwZS1hODdkLTY4MmQxZWJkMTNmOT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"437aed9c-db2d-440e-a87d-682d1ebd13f9\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:14:16.14Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:15:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "24e4579a-61c3-4875-9f4d-08b420a9b552" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "cc92bbd8-d49e-4151-a14b-ad6e86851f9d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001501Z:cc92bbd8-d49e-4151-a14b-ad6e86851f9d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/437aed9c-db2d-440e-a87d-682d1ebd13f9?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uLzQzN2FlZDljLWRiMmQtNDQwZS1hODdkLTY4MmQxZWJkMTNmOT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"437aed9c-db2d-440e-a87d-682d1ebd13f9\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T00:14:16.14Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:15:16 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "a1acc335-8119-429c-8bd4-41bcf182f6e6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "06516de7-60ab-4476-8f11-2648a45770ec" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001516Z:06516de7-60ab-4476-8f11-2648a45770ec" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242/databases/sqlcrudtest-1600?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05MjQyL2RhdGFiYXNlcy9zcWxjcnVkdGVzdC0xNjAwP2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 10\r\n },\r\n \"kind\": \"v12.0,user\",\r\n \"properties\": {\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": 268435456000,\r\n \"status\": \"Online\",\r\n \"databaseId\": \"6cc18958-3dff-4778-93c0-1493fadc4dbd\",\r\n \"creationDate\": \"2018-05-22T00:14:16.44Z\",\r\n \"currentServiceObjectiveName\": \"S0\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"defaultSecondaryLocation\": \"West Central US\",\r\n \"catalogCollation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"zoneRedundant\": false,\r\n \"earliestRestoreDate\": \"2018-05-22T00:45:09.913Z\",\r\n \"readScale\": \"Disabled\",\r\n \"currentSku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 10\r\n }\r\n },\r\n \"location\": \"westus2\",\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242/databases/sqlcrudtest-1600\",\r\n \"name\": \"sqlcrudtest-1600\",\r\n \"type\": \"Microsoft.Sql/servers/databases\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:15:16 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "911a66d7-9d0c-43be-b978-0cc3ffb36e8e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "d89bed44-139b-4e9f-b6f0-44192fa4fc70" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001516Z:d89bed44-139b-4e9f-b6f0-44192fa4fc70" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242/jobAgents/agent?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05MjQyL2pvYkFnZW50cy9hZ2VudD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242/databases/sqlcrudtest-1600\"\r\n },\r\n \"location\": \"westus2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "235" + ], + "x-ms-client-request-id": [ + "c997089f-93de-4405-a443-2424c5deff7d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertJobAccount\",\r\n \"startTime\": \"2018-05-22T00:15:16.927Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "71" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:15:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/locations/westus2/jobAgentOperationResults/27013a81-2a22-486a-aee7-8b0238739c40?api-version=2017-03-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/27013a81-2a22-486a-aee7-8b0238739c40?api-version=2017-03-01-preview" + ], + "x-ms-request-id": [ + "af9caf06-da66-4dc0-89cf-67306fea7c6e" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "5d65660f-080e-4262-975a-65c4647382c9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001517Z:5d65660f-080e-4262-975a-65c4647382c9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/27013a81-2a22-486a-aee7-8b0238739c40?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzI3MDEzYTgxLTJhMjItNDg2YS1hZWU3LThiMDIzODczOWM0MD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"27013a81-2a22-486a-aee7-8b0238739c40\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:15:16.927Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:15:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "0eaaff6d-ba9b-4642-a0c6-e5a1bb8b84ab" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "4df30f1d-d06e-44fd-89be-da2aab6c54e7" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001532Z:4df30f1d-d06e-44fd-89be-da2aab6c54e7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/27013a81-2a22-486a-aee7-8b0238739c40?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzI3MDEzYTgxLTJhMjItNDg2YS1hZWU3LThiMDIzODczOWM0MD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"27013a81-2a22-486a-aee7-8b0238739c40\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:15:16.927Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:15:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "cf2539f3-3fab-42a5-ad11-f4c4affda0d2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "78bdcecb-af97-42ad-ac3e-eb84e33a3bb6" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001547Z:78bdcecb-af97-42ad-ac3e-eb84e33a3bb6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/27013a81-2a22-486a-aee7-8b0238739c40?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzI3MDEzYTgxLTJhMjItNDg2YS1hZWU3LThiMDIzODczOWM0MD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"27013a81-2a22-486a-aee7-8b0238739c40\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:15:16.927Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:16:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b415778d-8202-4913-9d7c-9c0895eb8101" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "37a522f6-3c23-4075-a6d4-4a1df6a19c0a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001603Z:37a522f6-3c23-4075-a6d4-4a1df6a19c0a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/27013a81-2a22-486a-aee7-8b0238739c40?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzI3MDEzYTgxLTJhMjItNDg2YS1hZWU3LThiMDIzODczOWM0MD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"27013a81-2a22-486a-aee7-8b0238739c40\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:15:16.927Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:16:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "0bd5dc09-a22c-4f32-bbc3-3e42768333f8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "4286667e-2b14-42e5-89ba-2089c98af9fa" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001618Z:4286667e-2b14-42e5-89ba-2089c98af9fa" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/27013a81-2a22-486a-aee7-8b0238739c40?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzI3MDEzYTgxLTJhMjItNDg2YS1hZWU3LThiMDIzODczOWM0MD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"27013a81-2a22-486a-aee7-8b0238739c40\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:15:16.927Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:16:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "fd2710fe-d746-45af-8680-45f3a610449e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "8d7d76e0-3589-4697-a98f-2ad0f1cfca7a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001633Z:8d7d76e0-3589-4697-a98f-2ad0f1cfca7a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/27013a81-2a22-486a-aee7-8b0238739c40?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzI3MDEzYTgxLTJhMjItNDg2YS1hZWU3LThiMDIzODczOWM0MD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"27013a81-2a22-486a-aee7-8b0238739c40\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:15:16.927Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:16:48 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e9664edb-724c-43e7-9087-43f917c86714" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "4deb2892-309f-44f2-9947-5b09bb2d93ba" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001648Z:4deb2892-309f-44f2-9947-5b09bb2d93ba" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/27013a81-2a22-486a-aee7-8b0238739c40?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzI3MDEzYTgxLTJhMjItNDg2YS1hZWU3LThiMDIzODczOWM0MD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"27013a81-2a22-486a-aee7-8b0238739c40\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T00:15:16.927Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:17:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "427bf128-b4d0-45e2-b407-930bc2537493" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "5db1c516-bdd2-4eb3-ac4d-7621fb0adfb5" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001703Z:5db1c516-bdd2-4eb3-ac4d-7621fb0adfb5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242/jobAgents/agent?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05MjQyL2pvYkFnZW50cy9hZ2VudD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Agent\",\r\n \"capacity\": 100\r\n },\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242/databases/sqlcrudtest-1600\",\r\n \"state\": \"Ready\"\r\n },\r\n \"location\": \"westus2\",\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242/jobAgents/agent\",\r\n \"name\": \"agent\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:17:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ac80dbb8-571c-4fd5-87f2-181239f3ae95" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "f5df8609-1293-422b-bf7a-8d5eb057c6d6" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001703Z:f5df8609-1293-422b-bf7a-8d5eb057c6d6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242/jobAgents/agent/credentials/dummylogin?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05MjQyL2pvYkFnZW50cy9hZ2VudC9jcmVkZW50aWFscy9kdW1teWxvZ2luP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"username\": \"dummylogin\",\r\n \"password\": \"Un53cuRE!\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "88" + ], + "x-ms-client-request-id": [ + "41d66447-b2e3-4557-b512-04174b3a4dae" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"username\": \"dummylogin\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242/jobAgents/agent/credentials/dummylogin\",\r\n \"name\": \"dummylogin\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/credentials\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "292" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:17:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "9075f28c-d571-49be-b6c6-fce04d831d98" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "b81d7158-d1e3-40d6-880a-a2b058c0b19a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001704Z:b81d7158-d1e3-40d6-880a-a2b058c0b19a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242/jobAgents/agent/targetGroups/tg1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05MjQyL2pvYkFnZW50cy9hZ2VudC90YXJnZXRHcm91cHMvdGcxP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"members\": [\r\n {\r\n \"membershipType\": \"Include\",\r\n \"type\": \"SqlServer\",\r\n \"serverName\": \"s1\",\r\n \"refreshCredential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242/jobAgents/agent/credentials/dummylogin\"\r\n }\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "372" + ], + "x-ms-client-request-id": [ + "ef2f2000-80f7-41f4-a439-dd085f46c2f3" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"members\": [\r\n {\r\n \"membershipType\": \"Include\",\r\n \"type\": \"SqlServer\",\r\n \"serverName\": \"s1\",\r\n \"refreshCredential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242/jobAgents/agent/credentials/dummylogin\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242/jobAgents/agent/targetGroups/tg1\",\r\n \"name\": \"tg1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/targetGroups\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "528" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:17:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "54caba2c-00cc-4b62-8db1-b3c9afd29f06" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "96f61769-cd20-446b-b273-c18e3a196e37" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001705Z:96f61769-cd20-446b-b273-c18e3a196e37" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242/jobAgents/agent/targetGroups/tg1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05MjQyL2pvYkFnZW50cy9hZ2VudC90YXJnZXRHcm91cHMvdGcxP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"members\": [\r\n {\r\n \"membershipType\": \"Include\",\r\n \"type\": \"SqlServer\",\r\n \"serverName\": \"s1\",\r\n \"refreshCredential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242/jobAgents/agent/credentials/dummylogin\"\r\n },\r\n {\r\n \"membershipType\": \"Include\",\r\n \"type\": \"SqlDatabase\",\r\n \"serverName\": \"s1\",\r\n \"databaseName\": \"db1\"\r\n },\r\n {\r\n \"membershipType\": \"Exclude\",\r\n \"type\": \"SqlShardMap\",\r\n \"serverName\": \"s1\",\r\n \"databaseName\": \"db1\",\r\n \"shardMapName\": \"sm1\",\r\n \"refreshCredential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242/jobAgents/agent/credentials/dummylogin\"\r\n },\r\n {\r\n \"membershipType\": \"Exclude\",\r\n \"type\": \"SqlElasticPool\",\r\n \"serverName\": \"s1\",\r\n \"elasticPoolName\": \"ep1\",\r\n \"refreshCredential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242/jobAgents/agent/credentials/dummylogin\"\r\n }\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "1267" + ], + "x-ms-client-request-id": [ + "b27dc7d5-6a73-4745-8298-df9ea54276c7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"members\": [\r\n {\r\n \"membershipType\": \"Exclude\",\r\n \"type\": \"SqlElasticPool\",\r\n \"serverName\": \"s1\",\r\n \"elasticPoolName\": \"ep1\",\r\n \"refreshCredential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242/jobAgents/agent/credentials/dummylogin\"\r\n },\r\n {\r\n \"membershipType\": \"Exclude\",\r\n \"type\": \"SqlShardMap\",\r\n \"serverName\": \"s1\",\r\n \"databaseName\": \"db1\",\r\n \"shardMapName\": \"sm1\",\r\n \"refreshCredential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242/jobAgents/agent/credentials/dummylogin\"\r\n },\r\n {\r\n \"membershipType\": \"Include\",\r\n \"type\": \"SqlDatabase\",\r\n \"serverName\": \"s1\",\r\n \"databaseName\": \"db1\"\r\n },\r\n {\r\n \"membershipType\": \"Include\",\r\n \"type\": \"SqlServer\",\r\n \"serverName\": \"s1\",\r\n \"refreshCredential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242/jobAgents/agent/credentials/dummylogin\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242/jobAgents/agent/targetGroups/tg1\",\r\n \"name\": \"tg1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/targetGroups\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:17:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "dfa8832e-00c8-4f07-bfb2-11cfb58cb9fd" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "eeb0bc57-2f2f-4156-b157-68cc3486700e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001705Z:eeb0bc57-2f2f-4156-b157-68cc3486700e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242/jobAgents/agent/targetGroups?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05MjQyL2pvYkFnZW50cy9hZ2VudC90YXJnZXRHcm91cHM/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4c0f37bf-c182-45e0-875a-58cf553d4dd3" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"members\": [\r\n {\r\n \"membershipType\": \"Exclude\",\r\n \"type\": \"SqlElasticPool\",\r\n \"serverName\": \"s1\",\r\n \"elasticPoolName\": \"ep1\",\r\n \"refreshCredential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242/jobAgents/agent/credentials/dummylogin\"\r\n },\r\n {\r\n \"membershipType\": \"Exclude\",\r\n \"type\": \"SqlShardMap\",\r\n \"serverName\": \"s1\",\r\n \"databaseName\": \"db1\",\r\n \"shardMapName\": \"sm1\",\r\n \"refreshCredential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242/jobAgents/agent/credentials/dummylogin\"\r\n },\r\n {\r\n \"membershipType\": \"Include\",\r\n \"type\": \"SqlDatabase\",\r\n \"serverName\": \"s1\",\r\n \"databaseName\": \"db1\"\r\n },\r\n {\r\n \"membershipType\": \"Include\",\r\n \"type\": \"SqlServer\",\r\n \"serverName\": \"s1\",\r\n \"refreshCredential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242/jobAgents/agent/credentials/dummylogin\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242/jobAgents/agent/targetGroups/tg1\",\r\n \"name\": \"tg1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/targetGroups\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:17:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9a4d2443-ede5-4e9c-af61-97f2178bd467" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "76e8b7fd-7a17-4a86-a902-d761672469f5" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001705Z:76e8b7fd-7a17-4a86-a902-d761672469f5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-6442/providers/Microsoft.Sql/servers/sqlcrudtest-9242/jobAgents/agent/targetGroups/tg1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05MjQyL2pvYkFnZW50cy9hZ2VudC90YXJnZXRHcm91cHMvdGcxP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "08734c9e-0222-4c86-a44d-b58c43c308b1" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:17:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "008937e5-7b15-4860-9b32-6b1e9223c076" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "361d1c76-8d23-4192-9a46-69a4ec1e7599" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001705Z:361d1c76-8d23-4192-9a46-69a4ec1e7599" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-6442?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTY0NDI/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "73d9f911-4de0-4c5d-860f-b4a1c8a0d382" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:17:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDY0NDItV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "673ae7bd-d2cd-4a39-a352-58bf311e3e36" + ], + "x-ms-correlation-request-id": [ + "673ae7bd-d2cd-4a39-a352-58bf311e3e36" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001706Z:673ae7bd-d2cd-4a39-a352-58bf311e3e36" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-6442?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTY0NDI/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "21c58d8d-ffe6-4306-a52f-337931f98608" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:17:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDY0NDItV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14998" + ], + "x-ms-request-id": [ + "8063163b-8d2f-4507-9900-ac1ad4ad0c49" + ], + "x-ms-correlation-request-id": [ + "8063163b-8d2f-4507-9900-ac1ad4ad0c49" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T001706Z:8063163b-8d2f-4507-9900-ac1ad4ad0c49" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + } + ], + "Names": { + "CreateResourceGroup": [ + "sqlcrudtest-6442" + ], + "CreateServer": [ + "sqlcrudtest-9242" + ], + "TestCreateUpdateDropTargetGroup": [ + "sqlcrudtest-1600" + ] + }, + "Variables": { + "SubscriptionId": "1b132fbc-df61-4dd8-bba0-71d7d4277eda", + "DefaultLocation": "west us 2" + } +} \ No newline at end of file diff --git a/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ElasticJobAgentScenarioTests/TestStartStopGetJobExecution.json b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ElasticJobAgentScenarioTests/TestStartStopGetJobExecution.json new file mode 100644 index 000000000000..1c120e8d5ffb --- /dev/null +++ b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ElasticJobAgentScenarioTests/TestStartStopGetJobExecution.json @@ -0,0 +1,2494 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-7377?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTczNzc/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"west us 2\",\r\n \"tags\": {\r\n \"sqlcrudtest-7377\": \"2018-05-22 00:33:21Z\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "98" + ], + "x-ms-client-request-id": [ + "7c8bf852-097c-434a-b673-036e968d4953" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377\",\r\n \"name\": \"sqlcrudtest-7377\",\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"sqlcrudtest-7377\": \"2018-05-22 00:33:21Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "237" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:33:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "16a8f6b0-4364-4186-8607-bd6d7fdf2a26" + ], + "x-ms-correlation-request-id": [ + "16a8f6b0-4364-4186-8607-bd6d7fdf2a26" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003321Z:16a8f6b0-4364-4186-8607-bd6d7fdf2a26" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01NjYyP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "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\": \"west us 2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "183" + ], + "x-ms-client-request-id": [ + "1ed59394-7dcd-4ba6-8107-ce36b2ee2a9c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertLogicalServer\",\r\n \"startTime\": \"2018-05-22T00:33:23.7Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "72" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:33:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/locations/westus2/serverOperationResults/8bbc1442-3ae8-46b4-9dae-c11131a11527?api-version=2015-05-01-preview" + ], + "Retry-After": [ + "1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/8bbc1442-3ae8-46b4-9dae-c11131a11527?api-version=2015-05-01-preview" + ], + "x-ms-request-id": [ + "8bbc1442-3ae8-46b4-9dae-c11131a11527" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "a44b56db-da0d-4417-be70-f0a1254a6e55" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003323Z:a44b56db-da0d-4417-be70-f0a1254a6e55" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/8bbc1442-3ae8-46b4-9dae-c11131a11527?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi84YmJjMTQ0Mi0zYWU4LTQ2YjQtOWRhZS1jMTExMzFhMTE1Mjc/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"8bbc1442-3ae8-46b4-9dae-c11131a11527\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:33:23.7Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:33:33 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "967c93e1-96d5-44be-8569-7af00ba4609b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "22de71ac-a091-4749-89fd-cfb580aaa417" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003333Z:22de71ac-a091-4749-89fd-cfb580aaa417" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/8bbc1442-3ae8-46b4-9dae-c11131a11527?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi84YmJjMTQ0Mi0zYWU4LTQ2YjQtOWRhZS1jMTExMzFhMTE1Mjc/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"8bbc1442-3ae8-46b4-9dae-c11131a11527\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:33:23.7Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:33:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "6db805b5-d335-4623-8c1d-0a9a28f088b0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "1043744c-5016-46f5-ac31-70de54a07a58" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003353Z:1043744c-5016-46f5-ac31-70de54a07a58" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/8bbc1442-3ae8-46b4-9dae-c11131a11527?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi84YmJjMTQ0Mi0zYWU4LTQ2YjQtOWRhZS1jMTExMzFhMTE1Mjc/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"8bbc1442-3ae8-46b4-9dae-c11131a11527\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T00:33:23.7Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:34:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "a9d526c8-f589-4172-aaa8-2c13e28093f5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "a105b1dc-60d4-4778-b25a-26a8234bcfaf" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003413Z:a105b1dc-60d4-4778-b25a-26a8234bcfaf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01NjYyP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.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-5662.database.windows.net\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662\",\r\n \"name\": \"sqlcrudtest-5662\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:34:14 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "69b50457-1e3d-44bf-baca-060f57f3d2c1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "52460474-11a7-4154-864b-b268f74d93b5" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003414Z:52460474-11a7-4154-864b-b268f74d93b5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/firewallRules/allowAll?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01NjYyL2ZpcmV3YWxsUnVsZXMvYWxsb3dBbGw/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"startIpAddress\": \"0.0.0.0\",\r\n \"endIpAddress\": \"255.255.255.255\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "101" + ], + "x-ms-client-request-id": [ + "fe650a91-c2c3-4218-b8b0-7d9d6476049b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/firewallRules/allowAll\",\r\n \"name\": \"allowAll\",\r\n \"type\": \"Microsoft.Sql/servers/firewallRules\",\r\n \"location\": \"West US 2\",\r\n \"kind\": \"v12.0\",\r\n \"properties\": {\r\n \"startIpAddress\": \"0.0.0.0\",\r\n \"endIpAddress\": \"255.255.255.255\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "340" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:34:15 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "bf005538-12ae-4f00-9bc1-2d077641aeea" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "b6b99950-fe38-4581-8a65-2f34aed90a30" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003415Z:b6b99950-fe38-4581-8a65-2f34aed90a30" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/databases/sqlcrudtest-729?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01NjYyL2RhdGFiYXNlcy9zcWxjcnVkdGVzdC03Mjk/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"westus2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "29" + ], + "x-ms-client-request-id": [ + "75ae504e-5dce-4ebe-b0bd-72d9f7493243" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"CreateLogicalDatabase\",\r\n \"startTime\": \"2018-05-22T00:34:15.62Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "75" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:34:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/locations/westus2/databaseOperationResults/bc664df3-50b3-416d-8db9-01930070d05c?api-version=2017-10-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/bc664df3-50b3-416d-8db9-01930070d05c?api-version=2017-10-01-preview" + ], + "x-ms-request-id": [ + "2efa3ba5-9356-437d-bc4e-cb6b486163cd" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "818ee8f2-e58b-48eb-9cca-f4691a586455" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003415Z:818ee8f2-e58b-48eb-9cca-f4691a586455" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/bc664df3-50b3-416d-8db9-01930070d05c?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uL2JjNjY0ZGYzLTUwYjMtNDE2ZC04ZGI5LTAxOTMwMDcwZDA1Yz9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"bc664df3-50b3-416d-8db9-01930070d05c\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:34:15.62Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:34:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9cabb080-330b-4158-82f1-436fa1a8e16c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "bd70e80f-a16a-4902-9e97-93dc94e900a6" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003430Z:bd70e80f-a16a-4902-9e97-93dc94e900a6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/bc664df3-50b3-416d-8db9-01930070d05c?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uL2JjNjY0ZGYzLTUwYjMtNDE2ZC04ZGI5LTAxOTMwMDcwZDA1Yz9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"bc664df3-50b3-416d-8db9-01930070d05c\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:34:15.62Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:34:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e892acb1-359d-4573-9f97-591d227e72e3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "2fbda759-1ca9-4471-85bc-1c87521dfcdd" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003445Z:2fbda759-1ca9-4471-85bc-1c87521dfcdd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/bc664df3-50b3-416d-8db9-01930070d05c?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uL2JjNjY0ZGYzLTUwYjMtNDE2ZC04ZGI5LTAxOTMwMDcwZDA1Yz9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"bc664df3-50b3-416d-8db9-01930070d05c\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T00:34:15.62Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:35:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "aad871f7-6ee8-40fb-9285-3a7222186ab1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "97e483b1-65bc-4f66-8a9b-ec627018b9d1" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003501Z:97e483b1-65bc-4f66-8a9b-ec627018b9d1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/databases/sqlcrudtest-729?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01NjYyL2RhdGFiYXNlcy9zcWxjcnVkdGVzdC03Mjk/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 10\r\n },\r\n \"kind\": \"v12.0,user\",\r\n \"properties\": {\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": 268435456000,\r\n \"status\": \"Online\",\r\n \"databaseId\": \"94515d9c-1689-49ff-af72-488495afb2f6\",\r\n \"creationDate\": \"2018-05-22T00:34:15.87Z\",\r\n \"currentServiceObjectiveName\": \"S0\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"defaultSecondaryLocation\": \"West Central US\",\r\n \"catalogCollation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"zoneRedundant\": false,\r\n \"earliestRestoreDate\": \"2018-05-22T01:04:56.73Z\",\r\n \"readScale\": \"Disabled\",\r\n \"currentSku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 10\r\n }\r\n },\r\n \"location\": \"westus2\",\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/databases/sqlcrudtest-729\",\r\n \"name\": \"sqlcrudtest-729\",\r\n \"type\": \"Microsoft.Sql/servers/databases\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:35:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9ed3effa-e586-4d09-883b-0aaf74a9fd1d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "2b2a2ced-cc91-4237-99c7-44860233f8e9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003501Z:2b2a2ced-cc91-4237-99c7-44860233f8e9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01NjYyL2pvYkFnZW50cy9hZ2VudD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/databases/sqlcrudtest-729\"\r\n },\r\n \"location\": \"westus2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "234" + ], + "x-ms-client-request-id": [ + "defb189d-da07-4b90-b086-eba6ae405aca" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertJobAccount\",\r\n \"startTime\": \"2018-05-22T00:35:01.59Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "70" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:35:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/locations/westus2/jobAgentOperationResults/316305bf-ab5c-4cfa-8d6b-b9ec05034b3e?api-version=2017-03-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/316305bf-ab5c-4cfa-8d6b-b9ec05034b3e?api-version=2017-03-01-preview" + ], + "x-ms-request-id": [ + "3a090485-be0f-4cc3-a2d3-0a227156ae05" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "524266eb-e3c9-4276-a684-796b29deb3db" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003502Z:524266eb-e3c9-4276-a684-796b29deb3db" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/316305bf-ab5c-4cfa-8d6b-b9ec05034b3e?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzMxNjMwNWJmLWFiNWMtNGNmYS04ZDZiLWI5ZWMwNTAzNGIzZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"316305bf-ab5c-4cfa-8d6b-b9ec05034b3e\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:35:01.59Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:35:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "dff3e84f-80c4-4225-9ea6-ebadd9ec660e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "9046d73d-6cf2-429c-b828-ea9373f06a31" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003517Z:9046d73d-6cf2-429c-b828-ea9373f06a31" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/316305bf-ab5c-4cfa-8d6b-b9ec05034b3e?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzMxNjMwNWJmLWFiNWMtNGNmYS04ZDZiLWI5ZWMwNTAzNGIzZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"316305bf-ab5c-4cfa-8d6b-b9ec05034b3e\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:35:01.59Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:35:31 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ead36652-1878-401a-91fc-4870f22536a9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "42304577-300d-40f2-a57d-cfa062fa6242" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003532Z:42304577-300d-40f2-a57d-cfa062fa6242" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/316305bf-ab5c-4cfa-8d6b-b9ec05034b3e?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzMxNjMwNWJmLWFiNWMtNGNmYS04ZDZiLWI5ZWMwNTAzNGIzZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"316305bf-ab5c-4cfa-8d6b-b9ec05034b3e\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:35:01.59Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:35:46 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "fb6610f2-800a-4783-89c3-3e33a3a14196" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "04ff2b90-34cf-49d8-830c-a69f7609b8e4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003547Z:04ff2b90-34cf-49d8-830c-a69f7609b8e4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/316305bf-ab5c-4cfa-8d6b-b9ec05034b3e?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzMxNjMwNWJmLWFiNWMtNGNmYS04ZDZiLWI5ZWMwNTAzNGIzZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"316305bf-ab5c-4cfa-8d6b-b9ec05034b3e\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:35:01.59Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:36:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "d7506840-d118-41a4-85f0-25ac20ecd566" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "dfba90ec-807b-43d8-bcf5-ddc2f1e2de10" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003602Z:dfba90ec-807b-43d8-bcf5-ddc2f1e2de10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/316305bf-ab5c-4cfa-8d6b-b9ec05034b3e?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzMxNjMwNWJmLWFiNWMtNGNmYS04ZDZiLWI5ZWMwNTAzNGIzZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"316305bf-ab5c-4cfa-8d6b-b9ec05034b3e\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:35:01.59Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:36:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "83ae62a0-8957-4ac0-a0ed-18953de749f4" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "6dbba3c6-9458-4802-b367-5077d1ab6580" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003617Z:6dbba3c6-9458-4802-b367-5077d1ab6580" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/316305bf-ab5c-4cfa-8d6b-b9ec05034b3e?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzMxNjMwNWJmLWFiNWMtNGNmYS04ZDZiLWI5ZWMwNTAzNGIzZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"316305bf-ab5c-4cfa-8d6b-b9ec05034b3e\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:35:01.59Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:36:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "fcf9ba7b-d8f7-49bc-bb9e-e684908c1da2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "94ffd1de-d273-4a2d-aab7-c70757c7107f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003632Z:94ffd1de-d273-4a2d-aab7-c70757c7107f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/316305bf-ab5c-4cfa-8d6b-b9ec05034b3e?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzMxNjMwNWJmLWFiNWMtNGNmYS04ZDZiLWI5ZWMwNTAzNGIzZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"316305bf-ab5c-4cfa-8d6b-b9ec05034b3e\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T00:35:01.59Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:36:46 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f9d0c9cc-e0a0-48c0-98d1-680bc14320d2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "267cf64e-5f2d-4222-af61-84d5eda6ae8c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003647Z:267cf64e-5f2d-4222-af61-84d5eda6ae8c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/316305bf-ab5c-4cfa-8d6b-b9ec05034b3e?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzMxNjMwNWJmLWFiNWMtNGNmYS04ZDZiLWI5ZWMwNTAzNGIzZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"316305bf-ab5c-4cfa-8d6b-b9ec05034b3e\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T00:35:01.59Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:37:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "c89fe905-d4ef-481e-9bda-ed6df4f2734d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "b0818d51-49de-448a-baa5-a16e07de40e9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003702Z:b0818d51-49de-448a-baa5-a16e07de40e9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01NjYyL2pvYkFnZW50cy9hZ2VudD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Agent\",\r\n \"capacity\": 100\r\n },\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/databases/sqlcrudtest-729\",\r\n \"state\": \"Ready\"\r\n },\r\n \"location\": \"westus2\",\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent\",\r\n \"name\": \"agent\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:37:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f92d5d44-703a-42e7-884c-b2ea3b035113" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "7280fa62-74a6-4a01-b70d-c200eddb19f5" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003702Z:7280fa62-74a6-4a01-b70d-c200eddb19f5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/credentials/dummylogin?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01NjYyL2pvYkFnZW50cy9hZ2VudC9jcmVkZW50aWFscy9kdW1teWxvZ2luP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"username\": \"dummylogin\",\r\n \"password\": \"Un53cuRE!\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "88" + ], + "x-ms-client-request-id": [ + "7f210512-2af2-4c03-9c7c-d44b553cf79a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"username\": \"dummylogin\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/credentials/dummylogin\",\r\n \"name\": \"dummylogin\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/credentials\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "292" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:37:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "14412671-b59d-465c-8f4f-5c3c8fe9c083" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "c6605456-db41-4c55-87ac-9ba4256601e2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003703Z:c6605456-db41-4c55-87ac-9ba4256601e2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/targetGroups/tg1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01NjYyL2pvYkFnZW50cy9hZ2VudC90YXJnZXRHcm91cHMvdGcxP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"members\": [\r\n {\r\n \"membershipType\": \"Include\",\r\n \"type\": \"SqlDatabase\",\r\n \"serverName\": \"sqlcrudtest-5662\",\r\n \"databaseName\": \"sqlcrudtest-729\"\r\n }\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "227" + ], + "x-ms-client-request-id": [ + "d9b837e3-f576-4ef9-8d13-e21fefddf782" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"members\": [\r\n {\r\n \"membershipType\": \"Include\",\r\n \"type\": \"SqlDatabase\",\r\n \"serverName\": \"sqlcrudtest-5662\",\r\n \"databaseName\": \"sqlcrudtest-729\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/targetGroups/tg1\",\r\n \"name\": \"tg1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/targetGroups\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "383" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:37:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "11082cf7-8188-47a0-afa7-24fb4bfc3b87" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "51acb1a1-e423-4082-800d-a89bd4e5f4dd" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003703Z:51acb1a1-e423-4082-800d-a89bd4e5f4dd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/jobs/job1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01NjYyL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"description\": \"Test description\",\r\n \"schedule\": {\r\n \"type\": \"Once\",\r\n \"enabled\": true\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "140" + ], + "x-ms-client-request-id": [ + "3c11fc28-704d-4472-963b-7bf3494e1940" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"description\": \"Test description\",\r\n \"version\": 0,\r\n \"schedule\": {\r\n \"startTime\": \"0001-01-01T00:00:00Z\",\r\n \"endTime\": \"9999-12-31T11:59:59Z\",\r\n \"type\": \"Once\",\r\n \"enabled\": true\r\n }\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/jobs/job1\",\r\n \"name\": \"job1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "397" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:37:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "b355c421-711a-4253-b0e2-ac0e159158af" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-correlation-request-id": [ + "9f89d164-e4c2-4479-92a5-c26f3c11e86a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003704Z:9f89d164-e4c2-4479-92a5-c26f3c11e86a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/jobs/job1/steps/step1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01NjYyL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvc3RlcHMvc3RlcDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"targetGroup\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/targetGroups/tg1\",\r\n \"credential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/credentials/dummylogin\",\r\n \"action\": {\r\n \"value\": \"SELECT 1\"\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "462" + ], + "x-ms-client-request-id": [ + "ee01b7f2-03b5-4d0c-9c27-c9dcd26ca4c9" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"stepId\": 1,\r\n \"targetGroup\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/targetGroups/tg1\",\r\n \"credential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/credentials/dummylogin\",\r\n \"action\": {\r\n \"type\": \"TSql\",\r\n \"source\": \"Inline\",\r\n \"value\": \"SELECT 1\"\r\n },\r\n \"executionOptions\": {\r\n \"timeoutSeconds\": 43200,\r\n \"retryAttempts\": 10,\r\n \"initialRetryIntervalSeconds\": 1,\r\n \"maximumRetryIntervalSeconds\": 120,\r\n \"retryIntervalBackoffMultiplier\": 2.0\r\n }\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/jobs/job1/steps/step1\",\r\n \"name\": \"step1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/steps\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "869" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:37:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "ded1c1a1-f056-4052-9b43-5bacec451707" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1192" + ], + "x-ms-correlation-request-id": [ + "13969d54-9c57-4440-ae63-1d182e870437" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003705Z:13969d54-9c57-4440-ae63-1d182e870437" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/jobs/job1/start?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01NjYyL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvc3RhcnQ/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0fc81433-2c4a-4b2d-ba92-9dd37613d576" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"jobVersion\": 1,\r\n \"jobExecutionId\": \"e01eea78-9f6d-4c07-bd57-6ccd94b3c733\",\r\n \"lifecycle\": \"Created\",\r\n \"provisioningState\": \"Created\",\r\n \"createTime\": \"2018-05-22T00:37:05.48Z\",\r\n \"currentAttempts\": 0,\r\n \"lastMessage\": \"Job execution created.\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/jobs/job1/executions/e01eea78-9f6d-4c07-bd57-6ccd94b3c733\",\r\n \"name\": \"e01eea78-9f6d-4c07-bd57-6ccd94b3c733\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/executions\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:37:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/jobs/job1/executions/e01eea78-9f6d-4c07-bd57-6ccd94b3c733?api-version=2017-03-01-preview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "d8e50032-eea8-4b1a-a049-a34b051d6968" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1191" + ], + "x-ms-correlation-request-id": [ + "f11a7da3-0162-4b8d-9b4f-cf460a8fcbe2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003705Z:f11a7da3-0162-4b8d-9b4f-cf460a8fcbe2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/jobs/job1/executions/e01eea78-9f6d-4c07-bd57-6ccd94b3c733?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01NjYyL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvZXhlY3V0aW9ucy9lMDFlZWE3OC05ZjZkLTRjMDctYmQ1Ny02Y2NkOTRiM2M3MzM/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"jobVersion\": 1,\r\n \"jobExecutionId\": \"e01eea78-9f6d-4c07-bd57-6ccd94b3c733\",\r\n \"lifecycle\": \"Succeeded\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"createTime\": \"2018-05-22T00:37:05.48Z\",\r\n \"startTime\": \"2018-05-22T00:37:09.8409224Z\",\r\n \"endTime\": \"2018-05-22T00:37:25.9855884Z\",\r\n \"currentAttempts\": 0,\r\n \"lastMessage\": \"Job execution succeeded.\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/jobs/job1/executions/e01eea78-9f6d-4c07-bd57-6ccd94b3c733\",\r\n \"name\": \"e01eea78-9f6d-4c07-bd57-6ccd94b3c733\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/executions\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:37:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "76ea196f-c766-4caf-b585-9e52a7bfd9fe" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "a2228e9d-526d-4d1d-859c-8a1a58da6ce3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003735Z:a2228e9d-526d-4d1d-859c-8a1a58da6ce3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/jobs/job1/executions/e01eea78-9f6d-4c07-bd57-6ccd94b3c733?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01NjYyL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvZXhlY3V0aW9ucy9lMDFlZWE3OC05ZjZkLTRjMDctYmQ1Ny02Y2NkOTRiM2M3MzM/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "17490c54-99ca-4a2f-963b-81efffa2bd47" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"jobVersion\": 1,\r\n \"jobExecutionId\": \"e01eea78-9f6d-4c07-bd57-6ccd94b3c733\",\r\n \"lifecycle\": \"Succeeded\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"createTime\": \"2018-05-22T00:37:05.48Z\",\r\n \"startTime\": \"2018-05-22T00:37:09.8409224Z\",\r\n \"endTime\": \"2018-05-22T00:37:25.9855884Z\",\r\n \"currentAttempts\": 0,\r\n \"lastMessage\": \"Job execution succeeded.\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/jobs/job1/executions/e01eea78-9f6d-4c07-bd57-6ccd94b3c733\",\r\n \"name\": \"e01eea78-9f6d-4c07-bd57-6ccd94b3c733\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/executions\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:37:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e0ea31da-bb87-4097-9795-704ef70570d5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14979" + ], + "x-ms-correlation-request-id": [ + "65d9456d-16bf-41b0-95b5-e50e10294362" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003736Z:65d9456d-16bf-41b0-95b5-e50e10294362" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/executions?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01NjYyL2pvYkFnZW50cy9hZ2VudC9leGVjdXRpb25zP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ae889430-870e-4c47-a34e-037dca9905cc" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"jobVersion\": 1,\r\n \"jobExecutionId\": \"e01eea78-9f6d-4c07-bd57-6ccd94b3c733\",\r\n \"lifecycle\": \"Succeeded\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"createTime\": \"2018-05-22T00:37:05.48Z\",\r\n \"startTime\": \"2018-05-22T00:37:09.8409224Z\",\r\n \"endTime\": \"2018-05-22T00:37:25.9855884Z\",\r\n \"currentAttempts\": 0,\r\n \"lastMessage\": \"Job execution succeeded.\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/jobs/job1/executions/e01eea78-9f6d-4c07-bd57-6ccd94b3c733\",\r\n \"name\": \"e01eea78-9f6d-4c07-bd57-6ccd94b3c733\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/executions\"\r\n },\r\n {\r\n \"properties\": {\r\n \"jobVersion\": 1,\r\n \"jobExecutionId\": \"cfb04edc-faa1-4b00-b151-ebbd186a3896\",\r\n \"lifecycle\": \"Skipped\",\r\n \"provisioningState\": \"Canceled\",\r\n \"createTime\": \"2018-05-22T00:37:08.575142Z\",\r\n \"startTime\": \"2018-05-22T00:37:11.1065763Z\",\r\n \"endTime\": \"2018-05-22T00:37:24.6210857Z\",\r\n \"currentAttempts\": 0,\r\n \"lastMessage\": \"Job execution skipped.\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/jobs/job1/executions/cfb04edc-faa1-4b00-b151-ebbd186a3896\",\r\n \"name\": \"cfb04edc-faa1-4b00-b151-ebbd186a3896\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/executions\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:37:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "86fe44d7-140f-4a1c-8a41-580e5acf36e7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-correlation-request-id": [ + "a39cc03f-13f9-4c5a-aff9-f9c394cc5a05" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003736Z:a39cc03f-13f9-4c5a-aff9-f9c394cc5a05" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/jobs/job1/executions?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01NjYyL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvZXhlY3V0aW9ucz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e46d0ece-42eb-469a-9984-ba10b351070e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"jobVersion\": 1,\r\n \"jobExecutionId\": \"e01eea78-9f6d-4c07-bd57-6ccd94b3c733\",\r\n \"lifecycle\": \"Succeeded\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"createTime\": \"2018-05-22T00:37:05.48Z\",\r\n \"startTime\": \"2018-05-22T00:37:09.8409224Z\",\r\n \"endTime\": \"2018-05-22T00:37:25.9855884Z\",\r\n \"currentAttempts\": 0,\r\n \"lastMessage\": \"Job execution succeeded.\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/jobs/job1/executions/e01eea78-9f6d-4c07-bd57-6ccd94b3c733\",\r\n \"name\": \"e01eea78-9f6d-4c07-bd57-6ccd94b3c733\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/executions\"\r\n },\r\n {\r\n \"properties\": {\r\n \"jobVersion\": 1,\r\n \"jobExecutionId\": \"cfb04edc-faa1-4b00-b151-ebbd186a3896\",\r\n \"lifecycle\": \"Skipped\",\r\n \"provisioningState\": \"Canceled\",\r\n \"createTime\": \"2018-05-22T00:37:08.575142Z\",\r\n \"startTime\": \"2018-05-22T00:37:11.1065763Z\",\r\n \"endTime\": \"2018-05-22T00:37:24.6210857Z\",\r\n \"currentAttempts\": 0,\r\n \"lastMessage\": \"Job execution skipped.\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/jobs/job1/executions/cfb04edc-faa1-4b00-b151-ebbd186a3896\",\r\n \"name\": \"cfb04edc-faa1-4b00-b151-ebbd186a3896\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/executions\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:37:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "38c73067-f73f-423b-8da4-ad9cbc867518" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-correlation-request-id": [ + "0470d0e6-b1dd-4fe4-a21b-64570ad0ef02" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003736Z:0470d0e6-b1dd-4fe4-a21b-64570ad0ef02" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/jobs/job1/executions/e01eea78-9f6d-4c07-bd57-6ccd94b3c733/steps?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01NjYyL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvZXhlY3V0aW9ucy9lMDFlZWE3OC05ZjZkLTRjMDctYmQ1Ny02Y2NkOTRiM2M3MzMvc3RlcHM/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "374b35bf-5e38-4864-95e9-750d87ed677a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"jobVersion\": 1,\r\n \"stepName\": \"step1\",\r\n \"stepId\": 1,\r\n \"jobExecutionId\": \"e01eea78-9f6d-4c07-bd57-6ccd94b3c733\",\r\n \"lifecycle\": \"Succeeded\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"createTime\": \"2018-05-22T00:37:09.8409224Z\",\r\n \"startTime\": \"2018-05-22T00:37:11.0909488Z\",\r\n \"endTime\": \"2018-05-22T00:37:25.5497743Z\",\r\n \"currentAttempts\": 1,\r\n \"currentAttemptStartTime\": \"2018-05-22T00:37:19.418905Z\",\r\n \"lastMessage\": \"Step 1 succeeded.\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/jobs/job1/executions/e01eea78-9f6d-4c07-bd57-6ccd94b3c733/steps/step1\",\r\n \"name\": \"step1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/executions/steps\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:37:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "3ad96342-38c0-4a48-989d-842402131495" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14978" + ], + "x-ms-correlation-request-id": [ + "b56d1cab-7963-40fc-89ad-5ef41e9f8bb5" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003736Z:b56d1cab-7963-40fc-89ad-5ef41e9f8bb5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/jobs/job1/executions/e01eea78-9f6d-4c07-bd57-6ccd94b3c733/steps/step1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01NjYyL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvZXhlY3V0aW9ucy9lMDFlZWE3OC05ZjZkLTRjMDctYmQ1Ny02Y2NkOTRiM2M3MzMvc3RlcHMvc3RlcDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "62fadd18-d61a-441b-8d58-2011857a2952" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"jobVersion\": 1,\r\n \"stepName\": \"step1\",\r\n \"stepId\": 1,\r\n \"jobExecutionId\": \"e01eea78-9f6d-4c07-bd57-6ccd94b3c733\",\r\n \"lifecycle\": \"Succeeded\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"createTime\": \"2018-05-22T00:37:09.8409224Z\",\r\n \"startTime\": \"2018-05-22T00:37:11.0909488Z\",\r\n \"endTime\": \"2018-05-22T00:37:25.5497743Z\",\r\n \"currentAttempts\": 1,\r\n \"currentAttemptStartTime\": \"2018-05-22T00:37:19.418905Z\",\r\n \"lastMessage\": \"Step 1 succeeded.\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/jobs/job1/executions/e01eea78-9f6d-4c07-bd57-6ccd94b3c733/steps/step1\",\r\n \"name\": \"step1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/executions/steps\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:37:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "2f56244b-d271-4b6d-be2d-c57667d6eaad" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14977" + ], + "x-ms-correlation-request-id": [ + "805361b9-bae7-4d3c-9378-541dc7240968" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003736Z:805361b9-bae7-4d3c-9378-541dc7240968" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/jobs/job1/executions/e01eea78-9f6d-4c07-bd57-6ccd94b3c733/targets?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01NjYyL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvZXhlY3V0aW9ucy9lMDFlZWE3OC05ZjZkLTRjMDctYmQ1Ny02Y2NkOTRiM2M3MzMvdGFyZ2V0cz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "28224b59-8f36-4ae2-9a95-4b19606470fc" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"jobVersion\": 1,\r\n \"stepName\": \"step1\",\r\n \"stepId\": 1,\r\n \"jobExecutionId\": \"e01eea78-9f6d-4c07-bd57-6ccd94b3c733\",\r\n \"lifecycle\": \"Succeeded\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"createTime\": \"2018-05-22T00:37:20.4666667Z\",\r\n \"startTime\": \"2018-05-22T00:37:21.7157639Z\",\r\n \"endTime\": \"2018-05-22T00:37:25.254897Z\",\r\n \"currentAttempts\": 1,\r\n \"currentAttemptStartTime\": \"2018-05-22T00:37:21.747049Z\",\r\n \"lastMessage\": \"Step 1 succeeded execution on target (server 'sqlcrudtest-5662', database 'sqlcrudtest-729').\",\r\n \"target\": {\r\n \"type\": \"SqlDatabase\",\r\n \"serverName\": \"sqlcrudtest-5662\",\r\n \"databaseName\": \"sqlcrudtest-729\"\r\n }\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/jobs/job1/executions/e01eea78-9f6d-4c07-bd57-6ccd94b3c733/steps/step1/targets/d214f7ae-6353-44f1-92ce-a50b114f6eed\",\r\n \"name\": \"d214f7ae-6353-44f1-92ce-a50b114f6eed\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/executions/steps/targets\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:37:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "4052c751-172b-4063-a287-55b0f920608a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14976" + ], + "x-ms-correlation-request-id": [ + "a3fa9755-e90c-48ba-8755-c5b00687cbae" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003737Z:a3fa9755-e90c-48ba-8755-c5b00687cbae" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/jobs/job1/executions/e01eea78-9f6d-4c07-bd57-6ccd94b3c733/steps/step1/targets?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01NjYyL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvZXhlY3V0aW9ucy9lMDFlZWE3OC05ZjZkLTRjMDctYmQ1Ny02Y2NkOTRiM2M3MzMvc3RlcHMvc3RlcDEvdGFyZ2V0cz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7073068b-abf1-4b63-923a-aa94d5f134d2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"jobVersion\": 1,\r\n \"stepName\": \"step1\",\r\n \"stepId\": 1,\r\n \"jobExecutionId\": \"e01eea78-9f6d-4c07-bd57-6ccd94b3c733\",\r\n \"lifecycle\": \"Succeeded\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"createTime\": \"2018-05-22T00:37:20.4666667Z\",\r\n \"startTime\": \"2018-05-22T00:37:21.7157639Z\",\r\n \"endTime\": \"2018-05-22T00:37:25.254897Z\",\r\n \"currentAttempts\": 1,\r\n \"currentAttemptStartTime\": \"2018-05-22T00:37:21.747049Z\",\r\n \"lastMessage\": \"Step 1 succeeded execution on target (server 'sqlcrudtest-5662', database 'sqlcrudtest-729').\",\r\n \"target\": {\r\n \"type\": \"SqlDatabase\",\r\n \"serverName\": \"sqlcrudtest-5662\",\r\n \"databaseName\": \"sqlcrudtest-729\"\r\n }\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/jobs/job1/executions/e01eea78-9f6d-4c07-bd57-6ccd94b3c733/steps/step1/targets/d214f7ae-6353-44f1-92ce-a50b114f6eed\",\r\n \"name\": \"d214f7ae-6353-44f1-92ce-a50b114f6eed\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/executions/steps/targets\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:37:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "70b68dcb-3b89-47e9-97d6-51cc375cfe39" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14975" + ], + "x-ms-correlation-request-id": [ + "76c8bb6e-6dcb-406c-b70c-11380694b92f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003737Z:76c8bb6e-6dcb-406c-b70c-11380694b92f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/jobs/job1/executions/e01eea78-9f6d-4c07-bd57-6ccd94b3c733/steps/step1/targets/d214f7ae-6353-44f1-92ce-a50b114f6eed?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01NjYyL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvZXhlY3V0aW9ucy9lMDFlZWE3OC05ZjZkLTRjMDctYmQ1Ny02Y2NkOTRiM2M3MzMvc3RlcHMvc3RlcDEvdGFyZ2V0cy9kMjE0ZjdhZS02MzUzLTQ0ZjEtOTJjZS1hNTBiMTE0ZjZlZWQ/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b002124d-5b50-4f19-a3a1-1e6471db9b1e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"jobVersion\": 1,\r\n \"stepName\": \"step1\",\r\n \"stepId\": 1,\r\n \"jobExecutionId\": \"e01eea78-9f6d-4c07-bd57-6ccd94b3c733\",\r\n \"lifecycle\": \"Succeeded\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"createTime\": \"2018-05-22T00:37:20.4666667Z\",\r\n \"startTime\": \"2018-05-22T00:37:21.7157639Z\",\r\n \"endTime\": \"2018-05-22T00:37:25.254897Z\",\r\n \"currentAttempts\": 1,\r\n \"currentAttemptStartTime\": \"2018-05-22T00:37:21.747049Z\",\r\n \"lastMessage\": \"Step 1 succeeded execution on target (server 'sqlcrudtest-5662', database 'sqlcrudtest-729').\",\r\n \"target\": {\r\n \"type\": \"SqlDatabase\",\r\n \"serverName\": \"sqlcrudtest-5662\",\r\n \"databaseName\": \"sqlcrudtest-729\"\r\n }\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/jobs/job1/executions/e01eea78-9f6d-4c07-bd57-6ccd94b3c733/steps/step1/targets/d214f7ae-6353-44f1-92ce-a50b114f6eed\",\r\n \"name\": \"d214f7ae-6353-44f1-92ce-a50b114f6eed\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/executions/steps/targets\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:37:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f67df1d5-0ddd-4259-b3cf-51f71d979065" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14974" + ], + "x-ms-correlation-request-id": [ + "7525fa81-6d03-4263-ae5c-e38aae575ea1" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003737Z:7525fa81-6d03-4263-ae5c-e38aae575ea1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/jobs/job1/executions/e01eea78-9f6d-4c07-bd57-6ccd94b3c733/cancel?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTczNzcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01NjYyL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvZXhlY3V0aW9ucy9lMDFlZWE3OC05ZjZkLTRjMDctYmQ1Ny02Y2NkOTRiM2M3MzMvY2FuY2VsP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6d21c8b7-c72e-43cb-bcd2-84ed1557aa28" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:37:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7377/providers/Microsoft.Sql/servers/sqlcrudtest-5662/jobAgents/agent/jobs/job1/executions/e01eea78-9f6d-4c07-bd57-6ccd94b3c733?api-version=2017-03-01-preview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "2c06f114-7be3-4694-be73-facdecf33419" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1190" + ], + "x-ms-correlation-request-id": [ + "ba9c0c90-e44d-42ba-8ec6-47562440cbc3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003738Z:ba9c0c90-e44d-42ba-8ec6-47562440cbc3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-7377?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTczNzc/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "dbe89ac1-6665-4350-a7f2-1729ad6b3990" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:37:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDczNzctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "520ec097-a6a1-46f3-a0bb-bd5760e0746e" + ], + "x-ms-correlation-request-id": [ + "520ec097-a6a1-46f3-a0bb-bd5760e0746e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003738Z:520ec097-a6a1-46f3-a0bb-bd5760e0746e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-7377?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTczNzc/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e3ee19a7-7373-4dae-ba2b-b2b0ef6a9307" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 00:37:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDczNzctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14998" + ], + "x-ms-request-id": [ + "b392bc4b-de0b-4be0-9ca5-4183579ab29a" + ], + "x-ms-correlation-request-id": [ + "b392bc4b-de0b-4be0-9ca5-4183579ab29a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T003738Z:b392bc4b-de0b-4be0-9ca5-4183579ab29a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + } + ], + "Names": { + "CreateResourceGroup": [ + "sqlcrudtest-7377" + ], + "CreateServer": [ + "sqlcrudtest-5662" + ], + "TestStartStopGetJobExecution": [ + "sqlcrudtest-729" + ] + }, + "Variables": { + "DefaultLocation": "west us 2", + "SubscriptionId": "1b132fbc-df61-4dd8-bba0-71d7d4277eda" + } +} \ No newline at end of file diff --git a/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.SqlDatabaseAgentScenarioTests/TestCreateUpdateDropAgent.json b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.SqlDatabaseAgentScenarioTests/TestCreateUpdateDropAgent.json new file mode 100644 index 000000000000..5c7a6de253b4 --- /dev/null +++ b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.SqlDatabaseAgentScenarioTests/TestCreateUpdateDropAgent.json @@ -0,0 +1,1915 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-3225?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTMyMjU/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"west us 2\",\r\n \"tags\": {\r\n \"sqlcrudtest-3225\": \"2018-05-18 22:23:23Z\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "98" + ], + "x-ms-client-request-id": [ + "995c5157-3005-4585-812d-07c3701b6091" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225\",\r\n \"name\": \"sqlcrudtest-3225\",\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"sqlcrudtest-3225\": \"2018-05-18 22:23:23Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "237" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:23:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "04bcd53c-9184-419d-9e52-5f6f48a8d9bb" + ], + "x-ms-correlation-request-id": [ + "04bcd53c-9184-419d-9e52-5f6f48a8d9bb" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222324Z:04bcd53c-9184-419d-9e52-5f6f48a8d9bb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/servers/sqlcrudtest-1881?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTMyMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xODgxP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "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\": \"west us 2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "183" + ], + "x-ms-client-request-id": [ + "0a23740d-52ef-4db0-8ab6-a502a9e748b8" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertLogicalServer\",\r\n \"startTime\": \"2018-05-18T22:23:28.573Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "74" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:23:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/locations/westus2/serverOperationResults/107af3cf-1445-4ef4-9058-fbfc8c9c9f72?api-version=2015-05-01-preview" + ], + "Retry-After": [ + "1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/107af3cf-1445-4ef4-9058-fbfc8c9c9f72?api-version=2015-05-01-preview" + ], + "x-ms-request-id": [ + "107af3cf-1445-4ef4-9058-fbfc8c9c9f72" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "8322e13f-489c-49ce-89da-f51192303fc0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222328Z:8322e13f-489c-49ce-89da-f51192303fc0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/107af3cf-1445-4ef4-9058-fbfc8c9c9f72?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTMyMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi8xMDdhZjNjZi0xNDQ1LTRlZjQtOTA1OC1mYmZjOGM5YzlmNzI/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"107af3cf-1445-4ef4-9058-fbfc8c9c9f72\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:23:28.573Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:23:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "216e3fc2-2345-4948-8ed9-49084c75824f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "8f2dad78-a83f-455f-bdce-48dedee4b295" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222338Z:8f2dad78-a83f-455f-bdce-48dedee4b295" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/107af3cf-1445-4ef4-9058-fbfc8c9c9f72?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTMyMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi8xMDdhZjNjZi0xNDQ1LTRlZjQtOTA1OC1mYmZjOGM5YzlmNzI/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"107af3cf-1445-4ef4-9058-fbfc8c9c9f72\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:23:28.573Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:23:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b83dd2bb-268f-41bd-bb85-3a8c6e27a634" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "4b39a4ae-62df-404d-82a4-07ef5763a4ad" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222358Z:4b39a4ae-62df-404d-82a4-07ef5763a4ad" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/107af3cf-1445-4ef4-9058-fbfc8c9c9f72?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTMyMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi8xMDdhZjNjZi0xNDQ1LTRlZjQtOTA1OC1mYmZjOGM5YzlmNzI/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"107af3cf-1445-4ef4-9058-fbfc8c9c9f72\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-18T22:23:28.573Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:24:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7cc1e679-117c-48c1-8900-b825e9730961" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "8865f0d1-e68a-47c1-aa8d-a57d5a6d1064" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222418Z:8865f0d1-e68a-47c1-aa8d-a57d5a6d1064" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/servers/sqlcrudtest-1881?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTMyMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xODgxP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.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-1881.database.windows.net\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/servers/sqlcrudtest-1881\",\r\n \"name\": \"sqlcrudtest-1881\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:24:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9eb9b3eb-1960-4378-a85c-d2e1057a9c8e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "7d442e1e-08be-420f-94f8-20ae1ab05b91" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222419Z:7d442e1e-08be-420f-94f8-20ae1ab05b91" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/servers/sqlcrudtest-1881/databases/sqlcrudtest-5003?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTMyMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xODgxL2RhdGFiYXNlcy9zcWxjcnVkdGVzdC01MDAzP2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"westus2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "29" + ], + "x-ms-client-request-id": [ + "b2d00ce6-c9d5-4f0f-b51f-c83aa8d58b4b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"CreateLogicalDatabase\",\r\n \"startTime\": \"2018-05-18T22:24:19.44Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "75" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:24:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/locations/westus2/databaseOperationResults/02854337-7bde-4938-8bfe-6c96632302ca?api-version=2017-10-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/02854337-7bde-4938-8bfe-6c96632302ca?api-version=2017-10-01-preview" + ], + "x-ms-request-id": [ + "e4d6734f-fa36-427b-a658-4a1b1974862c" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "962422c1-8c23-4100-8f9b-5d4acc89bab6" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222419Z:962422c1-8c23-4100-8f9b-5d4acc89bab6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/02854337-7bde-4938-8bfe-6c96632302ca?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTMyMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uLzAyODU0MzM3LTdiZGUtNDkzOC04YmZlLTZjOTY2MzIzMDJjYT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"02854337-7bde-4938-8bfe-6c96632302ca\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:24:19.44Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:24:34 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "6ae0c043-c884-4c2e-8c0f-e3814e687c56" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "40738475-9ec7-49de-a596-1844b4426ed4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222434Z:40738475-9ec7-49de-a596-1844b4426ed4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/02854337-7bde-4938-8bfe-6c96632302ca?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTMyMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uLzAyODU0MzM3LTdiZGUtNDkzOC04YmZlLTZjOTY2MzIzMDJjYT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"02854337-7bde-4938-8bfe-6c96632302ca\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:24:19.44Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:24:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "5a3e7c2d-adf0-4bb2-a076-44138d0fa2d9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "b26a9500-3fa4-43db-8268-b656a84337ce" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222449Z:b26a9500-3fa4-43db-8268-b656a84337ce" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/02854337-7bde-4938-8bfe-6c96632302ca?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTMyMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uLzAyODU0MzM3LTdiZGUtNDkzOC04YmZlLTZjOTY2MzIzMDJjYT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"02854337-7bde-4938-8bfe-6c96632302ca\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:24:19.44Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:25:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ecf3da26-5939-4d7d-9782-b0a10c9e054f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "579808e1-08e2-4b51-aca5-8dd13f92da97" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222504Z:579808e1-08e2-4b51-aca5-8dd13f92da97" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/02854337-7bde-4938-8bfe-6c96632302ca?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTMyMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uLzAyODU0MzM3LTdiZGUtNDkzOC04YmZlLTZjOTY2MzIzMDJjYT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"02854337-7bde-4938-8bfe-6c96632302ca\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-18T22:24:19.44Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:25:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "bb94c5b8-8d50-4598-9224-9c27ae7c36d5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "f5fba5d4-fa38-4e11-a70f-d342152667df" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222519Z:f5fba5d4-fa38-4e11-a70f-d342152667df" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/servers/sqlcrudtest-1881/databases/sqlcrudtest-5003?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTMyMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xODgxL2RhdGFiYXNlcy9zcWxjcnVkdGVzdC01MDAzP2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 10\r\n },\r\n \"kind\": \"v12.0,user\",\r\n \"properties\": {\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": 268435456000,\r\n \"status\": \"Online\",\r\n \"databaseId\": \"40c23413-f2b8-4d17-ac08-4f8d2553dd44\",\r\n \"creationDate\": \"2018-05-18T22:24:20.203Z\",\r\n \"currentServiceObjectiveName\": \"S0\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"defaultSecondaryLocation\": \"West Central US\",\r\n \"catalogCollation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"zoneRedundant\": false,\r\n \"earliestRestoreDate\": \"2018-05-18T22:55:04.673Z\",\r\n \"readScale\": \"Disabled\",\r\n \"currentSku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 10\r\n }\r\n },\r\n \"location\": \"westus2\",\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/servers/sqlcrudtest-1881/databases/sqlcrudtest-5003\",\r\n \"name\": \"sqlcrudtest-5003\",\r\n \"type\": \"Microsoft.Sql/servers/databases\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:25:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e4f437c9-9af4-4a42-94f2-f9935481abb4" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "53c9ab91-1db6-44df-a0e5-003d56f40c2f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222519Z:53c9ab91-1db6-44df-a0e5-003d56f40c2f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/servers/sqlcrudtest-1881/jobAgents/agent1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTMyMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xODgxL2pvYkFnZW50cy9hZ2VudDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/servers/sqlcrudtest-1881/databases/sqlcrudtest-5003\"\r\n },\r\n \"location\": \"westus2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "235" + ], + "x-ms-client-request-id": [ + "7c562501-3633-414a-9b52-d79724dc1dee" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertJobAccount\",\r\n \"startTime\": \"2018-05-18T22:25:20.477Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "71" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:25:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/locations/westus2/jobAgentOperationResults/e77328a1-09ac-4d62-b154-3553e39a4511?api-version=2017-03-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/e77328a1-09ac-4d62-b154-3553e39a4511?api-version=2017-03-01-preview" + ], + "x-ms-request-id": [ + "c0c39577-0d57-4a0a-a0aa-447c11b89443" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "86c60fd5-ac79-49a0-a954-53e511fc6aed" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222520Z:86c60fd5-ac79-49a0-a954-53e511fc6aed" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/servers/sqlcrudtest-1881/jobAgents/agent1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTMyMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xODgxL2pvYkFnZW50cy9hZ2VudDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/servers/sqlcrudtest-1881/databases/sqlcrudtest-5003\"\r\n },\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"location\": \"westus2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "282" + ], + "x-ms-client-request-id": [ + "3ec5ccf9-c0b6-480d-97da-fa01033f6b5d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertJobAccount\",\r\n \"startTime\": \"2018-05-18T22:27:06.357Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "71" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:27:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/locations/westus2/jobAgentOperationResults/589c2307-9384-42a5-ac4f-697889d352e2?api-version=2017-03-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/589c2307-9384-42a5-ac4f-697889d352e2?api-version=2017-03-01-preview" + ], + "x-ms-request-id": [ + "91da4f50-49d3-4371-885f-8d2a55d04a6e" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "42985d0a-2985-4fd4-9d62-730f57508135" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222706Z:42985d0a-2985-4fd4-9d62-730f57508135" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/e77328a1-09ac-4d62-b154-3553e39a4511?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTMyMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2U3NzMyOGExLTA5YWMtNGQ2Mi1iMTU0LTM1NTNlMzlhNDUxMT9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"e77328a1-09ac-4d62-b154-3553e39a4511\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:25:20.477Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:25:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "98b82e11-a76d-48fb-9d0b-9d86c844ea9d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "62ad7316-35d5-4555-a09d-73df2efc0eb4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222535Z:62ad7316-35d5-4555-a09d-73df2efc0eb4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/e77328a1-09ac-4d62-b154-3553e39a4511?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTMyMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2U3NzMyOGExLTA5YWMtNGQ2Mi1iMTU0LTM1NTNlMzlhNDUxMT9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"e77328a1-09ac-4d62-b154-3553e39a4511\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:25:20.477Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:25:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7144a131-b544-4506-aa78-a8119468e23b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "e5bf3963-02ba-40c4-80b8-819d9ad98906" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222550Z:e5bf3963-02ba-40c4-80b8-819d9ad98906" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/e77328a1-09ac-4d62-b154-3553e39a4511?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTMyMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2U3NzMyOGExLTA5YWMtNGQ2Mi1iMTU0LTM1NTNlMzlhNDUxMT9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"e77328a1-09ac-4d62-b154-3553e39a4511\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:25:20.477Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:26:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "8e6f26a5-62f9-4c30-b589-8404cfdb60b4" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "a8fa9228-d1b9-4439-aa18-689cf689a326" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222605Z:a8fa9228-d1b9-4439-aa18-689cf689a326" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/e77328a1-09ac-4d62-b154-3553e39a4511?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTMyMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2U3NzMyOGExLTA5YWMtNGQ2Mi1iMTU0LTM1NTNlMzlhNDUxMT9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"e77328a1-09ac-4d62-b154-3553e39a4511\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:25:20.477Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:26:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "3ad1743b-1efa-4030-95b5-82d68ce9cda3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "a536ad42-f865-421e-8a5d-0f49b4ce2075" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222620Z:a536ad42-f865-421e-8a5d-0f49b4ce2075" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/e77328a1-09ac-4d62-b154-3553e39a4511?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTMyMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2U3NzMyOGExLTA5YWMtNGQ2Mi1iMTU0LTM1NTNlMzlhNDUxMT9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"e77328a1-09ac-4d62-b154-3553e39a4511\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:25:20.477Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:26:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "68994776-4d5e-4bff-84ac-cae10459b17d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "96dc20d2-f2aa-40f6-a70a-41de3a17d5ad" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222635Z:96dc20d2-f2aa-40f6-a70a-41de3a17d5ad" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/e77328a1-09ac-4d62-b154-3553e39a4511?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTMyMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2U3NzMyOGExLTA5YWMtNGQ2Mi1iMTU0LTM1NTNlMzlhNDUxMT9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"e77328a1-09ac-4d62-b154-3553e39a4511\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:25:20.477Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:26:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "bea0e1d6-043c-4413-9807-a7d8d688ac79" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "9a715303-53f5-4d9f-afca-7135017ac720" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222651Z:9a715303-53f5-4d9f-afca-7135017ac720" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/e77328a1-09ac-4d62-b154-3553e39a4511?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTMyMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2U3NzMyOGExLTA5YWMtNGQ2Mi1iMTU0LTM1NTNlMzlhNDUxMT9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"e77328a1-09ac-4d62-b154-3553e39a4511\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-18T22:25:20.477Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:27:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7c34e1e6-5320-42b9-972a-d8d8e1630ae6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "d6cec642-e3bc-45db-b60b-cd2e901e64cd" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222706Z:d6cec642-e3bc-45db-b60b-cd2e901e64cd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/servers/sqlcrudtest-1881/jobAgents/agent1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTMyMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xODgxL2pvYkFnZW50cy9hZ2VudDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Agent\",\r\n \"capacity\": 100\r\n },\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/servers/sqlcrudtest-1881/databases/sqlcrudtest-5003\",\r\n \"state\": \"Ready\"\r\n },\r\n \"location\": \"westus2\",\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/servers/sqlcrudtest-1881/jobAgents/agent1\",\r\n \"name\": \"agent1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:27:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b095716c-4aa0-4422-bb5c-aa568a00bb33" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "3fc1e8df-a3d2-4bbc-9f45-3448fa46aa5f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222706Z:3fc1e8df-a3d2-4bbc-9f45-3448fa46aa5f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/servers/sqlcrudtest-1881/jobAgents/agent1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTMyMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xODgxL2pvYkFnZW50cy9hZ2VudDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Agent\",\r\n \"capacity\": 100\r\n },\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/servers/sqlcrudtest-1881/databases/sqlcrudtest-5003\",\r\n \"state\": \"Ready\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/servers/sqlcrudtest-1881/jobAgents/agent1\",\r\n \"name\": \"agent1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:27:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f94e570c-d8e4-44ff-9f2c-a8b6cbb76483" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-correlation-request-id": [ + "11fe392c-292d-4005-a72c-e70d00fbe7bb" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222722Z:11fe392c-292d-4005-a72c-e70d00fbe7bb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/servers/sqlcrudtest-1881/jobAgents/agent1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTMyMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xODgxL2pvYkFnZW50cy9hZ2VudDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5216af80-7d91-422c-9865-1ecc3227f4e3" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Agent\",\r\n \"capacity\": 100\r\n },\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/servers/sqlcrudtest-1881/databases/sqlcrudtest-5003\",\r\n \"state\": \"Ready\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/servers/sqlcrudtest-1881/jobAgents/agent1\",\r\n \"name\": \"agent1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:27:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ffb6adbf-3136-41c7-9bef-d09570524cd1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-correlation-request-id": [ + "577f47c6-7009-4b0b-8e4b-1b8e39a8dafc" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222722Z:577f47c6-7009-4b0b-8e4b-1b8e39a8dafc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/589c2307-9384-42a5-ac4f-697889d352e2?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTMyMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzU4OWMyMzA3LTkzODQtNDJhNS1hYzRmLTY5Nzg4OWQzNTJlMj9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"589c2307-9384-42a5-ac4f-697889d352e2\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-18T22:27:06.357Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:27:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "6e9c5d2e-2858-4831-87fe-105033786a04" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "0913f8be-2af1-4c88-96b5-88f8587ead3b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222722Z:0913f8be-2af1-4c88-96b5-88f8587ead3b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/servers/sqlcrudtest-1881/jobAgents?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTMyMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xODgxL2pvYkFnZW50cz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "eac942c4-9eab-4845-9929-5c696253ed34" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"sku\": {\r\n \"name\": \"Agent\",\r\n \"capacity\": 100\r\n },\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/servers/sqlcrudtest-1881/databases/sqlcrudtest-5003\",\r\n \"state\": \"Ready\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/servers/sqlcrudtest-1881/jobAgents/agent1\",\r\n \"name\": \"agent1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:27:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "cb7bd375-7e43-4117-b3f6-3f3b91fad361" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14979" + ], + "x-ms-correlation-request-id": [ + "384a6d74-50ca-4d34-ba49-3de648ef5ec6" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222722Z:384a6d74-50ca-4d34-ba49-3de648ef5ec6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/servers/sqlcrudtest-1881/jobAgents/agent1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTMyMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xODgxL2pvYkFnZW50cy9hZ2VudDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "62b53c28-8080-4926-8e69-5fd49188983e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"DeleteJobAccount\",\r\n \"startTime\": \"2018-05-18T22:27:22.417Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "71" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:27:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/locations/westus2/jobAgentOperationResults/7feeb1e5-10cf-4a40-bb76-41768fcb3eff?api-version=2017-03-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/7feeb1e5-10cf-4a40-bb76-41768fcb3eff?api-version=2017-03-01-preview" + ], + "x-ms-request-id": [ + "5e0753d3-ee32-425d-9192-d9c15ec5746f" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "321d3a0f-b0e5-407d-9e3c-ec7f5a2362ba" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222723Z:321d3a0f-b0e5-407d-9e3c-ec7f5a2362ba" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-3225/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/7feeb1e5-10cf-4a40-bb76-41768fcb3eff?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTMyMjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzdmZWViMWU1LTEwY2YtNGE0MC1iYjc2LTQxNzY4ZmNiM2VmZj9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"7feeb1e5-10cf-4a40-bb76-41768fcb3eff\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-18T22:27:22.417Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:27:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "0193c5c4-bd7b-433d-b0d7-b6fb44b33ae5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14978" + ], + "x-ms-correlation-request-id": [ + "7aaf3f74-438e-41c8-ab3b-76cf8a9d7104" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222738Z:7aaf3f74-438e-41c8-ab3b-76cf8a9d7104" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-3225?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTMyMjU/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b26f3a66-1b2d-4eab-887b-ce670c8e3929" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:27:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDMyMjUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "d7258248-a081-434c-9562-a09dc8ab394a" + ], + "x-ms-correlation-request-id": [ + "d7258248-a081-434c-9562-a09dc8ab394a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222738Z:d7258248-a081-434c-9562-a09dc8ab394a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-3225?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTMyMjU/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4d8f2a13-455d-45a3-bfd1-4c439cf0af09" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:27:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDMyMjUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14998" + ], + "x-ms-request-id": [ + "c5fcfdbf-5b17-4c63-acee-f5627ff979b9" + ], + "x-ms-correlation-request-id": [ + "c5fcfdbf-5b17-4c63-acee-f5627ff979b9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222738Z:c5fcfdbf-5b17-4c63-acee-f5627ff979b9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + } + ], + "Names": { + "CreateResourceGroup": [ + "sqlcrudtest-3225" + ], + "CreateServer": [ + "sqlcrudtest-1881" + ], + "TestCreateUpdateDropAgent": [ + "sqlcrudtest-5003" + ] + }, + "Variables": { + "DefaultLocation": "west us 2", + "SubscriptionId": "1b132fbc-df61-4dd8-bba0-71d7d4277eda" + } +} \ No newline at end of file diff --git a/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.SqlDatabaseAgentScenarioTests/TestCreateUpdateDropJob.json b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.SqlDatabaseAgentScenarioTests/TestCreateUpdateDropJob.json new file mode 100644 index 000000000000..b0550be8fdaf --- /dev/null +++ b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.SqlDatabaseAgentScenarioTests/TestCreateUpdateDropJob.json @@ -0,0 +1,1659 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-8545?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTg1NDU/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"west us 2\",\r\n \"tags\": {\r\n \"sqlcrudtest-8545\": \"2018-05-18 22:09:53Z\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "98" + ], + "x-ms-client-request-id": [ + "b96b3f40-e8ec-473d-9b7c-6affb5ea5016" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545\",\r\n \"name\": \"sqlcrudtest-8545\",\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"sqlcrudtest-8545\": \"2018-05-18 22:09:53Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "237" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:09:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "c2e0a395-f91d-4754-a4a2-b74b461c9626" + ], + "x-ms-correlation-request-id": [ + "c2e0a395-f91d-4754-a4a2-b74b461c9626" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T220954Z:c2e0a395-f91d-4754-a4a2-b74b461c9626" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/servers/sqlcrudtest-54?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1NDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01ND9hcGktdmVyc2lvbj0yMDE1LTA1LTAxLXByZXZpZXc=", + "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\": \"west us 2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "183" + ], + "x-ms-client-request-id": [ + "f188d61a-02e0-48d7-99d8-04039b6aa224" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertLogicalServer\",\r\n \"startTime\": \"2018-05-18T22:09:59.323Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "74" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:09:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/locations/westus2/serverOperationResults/62c17ae0-39da-4d85-ab1b-5c76e47d6888?api-version=2015-05-01-preview" + ], + "Retry-After": [ + "1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/62c17ae0-39da-4d85-ab1b-5c76e47d6888?api-version=2015-05-01-preview" + ], + "x-ms-request-id": [ + "62c17ae0-39da-4d85-ab1b-5c76e47d6888" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "6de309ce-ab83-49eb-bde7-f42bffb4b117" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T220959Z:6de309ce-ab83-49eb-bde7-f42bffb4b117" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/62c17ae0-39da-4d85-ab1b-5c76e47d6888?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1NDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi82MmMxN2FlMC0zOWRhLTRkODUtYWIxYi01Yzc2ZTQ3ZDY4ODg/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"62c17ae0-39da-4d85-ab1b-5c76e47d6888\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:09:59.323Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:10:08 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e72fc65b-12f6-4127-88e1-41ab9a6eaddd" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "ee7bdde1-0fa0-4ae8-84a5-ccaa42a51661" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221009Z:ee7bdde1-0fa0-4ae8-84a5-ccaa42a51661" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/62c17ae0-39da-4d85-ab1b-5c76e47d6888?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1NDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi82MmMxN2FlMC0zOWRhLTRkODUtYWIxYi01Yzc2ZTQ3ZDY4ODg/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"62c17ae0-39da-4d85-ab1b-5c76e47d6888\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:09:59.323Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:10:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "5be3c216-d2e3-419d-9143-6687d81646c5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "27c43e7a-5ec9-4bf7-8bf2-12ce7f42c869" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221029Z:27c43e7a-5ec9-4bf7-8bf2-12ce7f42c869" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/62c17ae0-39da-4d85-ab1b-5c76e47d6888?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1NDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi82MmMxN2FlMC0zOWRhLTRkODUtYWIxYi01Yzc2ZTQ3ZDY4ODg/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"62c17ae0-39da-4d85-ab1b-5c76e47d6888\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-18T22:09:59.323Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:10:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "a1851417-59ee-456b-b2d0-9630d671e5dd" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "785fb732-4dd6-4bf7-b2cd-00bebccf5a2c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221049Z:785fb732-4dd6-4bf7-b2cd-00bebccf5a2c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/servers/sqlcrudtest-54?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1NDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01ND9hcGktdmVyc2lvbj0yMDE1LTA1LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.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-54.database.windows.net\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/servers/sqlcrudtest-54\",\r\n \"name\": \"sqlcrudtest-54\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:10:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f9915b59-acae-435f-b51a-a5ea5533cf04" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "aa216e95-446d-4fa1-a77b-2664253b4187" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221049Z:aa216e95-446d-4fa1-a77b-2664253b4187" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/servers/sqlcrudtest-54/databases/sqlcrudtest-4039?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1NDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01NC9kYXRhYmFzZXMvc3FsY3J1ZHRlc3QtNDAzOT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"westus2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "29" + ], + "x-ms-client-request-id": [ + "527a01b2-3aef-4668-84ee-dcf1a8559f7d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"CreateLogicalDatabase\",\r\n \"startTime\": \"2018-05-18T22:10:50.187Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "76" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:10:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/locations/westus2/databaseOperationResults/ce26c7cf-bf8f-41cc-af3f-df9ceb317808?api-version=2017-10-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/ce26c7cf-bf8f-41cc-af3f-df9ceb317808?api-version=2017-10-01-preview" + ], + "x-ms-request-id": [ + "bf5d3554-4c3e-407e-a96c-6b4203ac09c5" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "ab703c9e-df4d-4331-801a-74ead07c25ba" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221050Z:ab703c9e-df4d-4331-801a-74ead07c25ba" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/ce26c7cf-bf8f-41cc-af3f-df9ceb317808?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1NDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uL2NlMjZjN2NmLWJmOGYtNDFjYy1hZjNmLWRmOWNlYjMxNzgwOD9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"ce26c7cf-bf8f-41cc-af3f-df9ceb317808\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:10:50.187Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:11:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "1bfb4970-6e52-45aa-8afc-6f3e6fa7e930" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "855eed38-e247-4276-8c8a-f16a804e6304" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221105Z:855eed38-e247-4276-8c8a-f16a804e6304" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/ce26c7cf-bf8f-41cc-af3f-df9ceb317808?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1NDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uL2NlMjZjN2NmLWJmOGYtNDFjYy1hZjNmLWRmOWNlYjMxNzgwOD9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"ce26c7cf-bf8f-41cc-af3f-df9ceb317808\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:10:50.187Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:11:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "3cd959e0-c38a-420d-a589-dd60b7948820" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "61ea2520-6652-4e2f-bcd6-d4ab0b9cc3e1" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221120Z:61ea2520-6652-4e2f-bcd6-d4ab0b9cc3e1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/ce26c7cf-bf8f-41cc-af3f-df9ceb317808?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1NDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uL2NlMjZjN2NmLWJmOGYtNDFjYy1hZjNmLWRmOWNlYjMxNzgwOD9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"ce26c7cf-bf8f-41cc-af3f-df9ceb317808\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-18T22:10:50.187Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:11:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "dc3184f0-205e-4758-ad20-567eb989d65c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "fa560139-249a-4741-974d-803e92873bf4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221135Z:fa560139-249a-4741-974d-803e92873bf4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/servers/sqlcrudtest-54/databases/sqlcrudtest-4039?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1NDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01NC9kYXRhYmFzZXMvc3FsY3J1ZHRlc3QtNDAzOT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 10\r\n },\r\n \"kind\": \"v12.0,user\",\r\n \"properties\": {\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": 268435456000,\r\n \"status\": \"Online\",\r\n \"databaseId\": \"356e2680-2bed-4a3c-a033-4eea23fe794e\",\r\n \"creationDate\": \"2018-05-18T22:10:50.423Z\",\r\n \"currentServiceObjectiveName\": \"S0\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"defaultSecondaryLocation\": \"West Central US\",\r\n \"catalogCollation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"zoneRedundant\": false,\r\n \"earliestRestoreDate\": \"2018-05-18T22:41:20.777Z\",\r\n \"readScale\": \"Disabled\",\r\n \"currentSku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 10\r\n }\r\n },\r\n \"location\": \"westus2\",\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/servers/sqlcrudtest-54/databases/sqlcrudtest-4039\",\r\n \"name\": \"sqlcrudtest-4039\",\r\n \"type\": \"Microsoft.Sql/servers/databases\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:11:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "908c0112-85e8-41e1-b93e-a418abf5b8ac" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "1bdf1a97-1cd2-44be-b157-6db83cb275ff" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221135Z:1bdf1a97-1cd2-44be-b157-6db83cb275ff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/servers/sqlcrudtest-54/jobAgents/agent?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1NDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01NC9qb2JBZ2VudHMvYWdlbnQ/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/servers/sqlcrudtest-54/databases/sqlcrudtest-4039\"\r\n },\r\n \"location\": \"westus2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "233" + ], + "x-ms-client-request-id": [ + "0088fbac-d052-4dc9-a740-fdc53d69a9ff" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertJobAccount\",\r\n \"startTime\": \"2018-05-18T22:11:36.423Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "71" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:11:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/locations/westus2/jobAgentOperationResults/94ff4c19-7447-47c4-bc2a-fadf11841e41?api-version=2017-03-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/94ff4c19-7447-47c4-bc2a-fadf11841e41?api-version=2017-03-01-preview" + ], + "x-ms-request-id": [ + "a41174ba-82c1-4ebe-a56d-28e607679ca1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "84c3399b-5c2b-4a16-9fe7-ba9bbe57c198" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221136Z:84c3399b-5c2b-4a16-9fe7-ba9bbe57c198" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/94ff4c19-7447-47c4-bc2a-fadf11841e41?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1NDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzk0ZmY0YzE5LTc0NDctNDdjNC1iYzJhLWZhZGYxMTg0MWU0MT9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"94ff4c19-7447-47c4-bc2a-fadf11841e41\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:11:36.423Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:11:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7b3984d7-4091-4684-9a94-6ae3a39aa37e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "46e6168e-fc48-4301-9e5b-aefd29663ba5" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221151Z:46e6168e-fc48-4301-9e5b-aefd29663ba5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/94ff4c19-7447-47c4-bc2a-fadf11841e41?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1NDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzk0ZmY0YzE5LTc0NDctNDdjNC1iYzJhLWZhZGYxMTg0MWU0MT9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"94ff4c19-7447-47c4-bc2a-fadf11841e41\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:11:36.423Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:12:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "4c121c2f-5cd2-4204-ac7b-0c4d4fc99e16" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "56433595-ac1c-4d33-8136-4452cfa87145" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221206Z:56433595-ac1c-4d33-8136-4452cfa87145" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/94ff4c19-7447-47c4-bc2a-fadf11841e41?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1NDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzk0ZmY0YzE5LTc0NDctNDdjNC1iYzJhLWZhZGYxMTg0MWU0MT9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"94ff4c19-7447-47c4-bc2a-fadf11841e41\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:11:36.423Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:12:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7b180552-db73-4099-b560-6e8f75fa845c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "7a839cfb-ca41-43c5-b8ef-4b205814c4db" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221221Z:7a839cfb-ca41-43c5-b8ef-4b205814c4db" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/94ff4c19-7447-47c4-bc2a-fadf11841e41?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1NDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzk0ZmY0YzE5LTc0NDctNDdjNC1iYzJhLWZhZGYxMTg0MWU0MT9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"94ff4c19-7447-47c4-bc2a-fadf11841e41\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:11:36.423Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:12:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "0cd00a1a-dcd7-4e27-9a7e-26a5ce98ea84" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "7aa8c438-295a-4c17-a6cf-762c0d0d4058" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221236Z:7aa8c438-295a-4c17-a6cf-762c0d0d4058" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/94ff4c19-7447-47c4-bc2a-fadf11841e41?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1NDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzk0ZmY0YzE5LTc0NDctNDdjNC1iYzJhLWZhZGYxMTg0MWU0MT9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"94ff4c19-7447-47c4-bc2a-fadf11841e41\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:11:36.423Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:12:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f9f9d6b9-3988-4667-81ac-b67c8bd6d25b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "1b02c772-78b3-44a3-8e87-0e153623167f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221251Z:1b02c772-78b3-44a3-8e87-0e153623167f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/94ff4c19-7447-47c4-bc2a-fadf11841e41?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1NDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzk0ZmY0YzE5LTc0NDctNDdjNC1iYzJhLWZhZGYxMTg0MWU0MT9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"94ff4c19-7447-47c4-bc2a-fadf11841e41\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:11:36.423Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:13:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "4f63ca88-82b0-4a9c-9eca-08bcf83eb4ba" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "79de1446-594a-48e7-9188-17ed184b3d0e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221306Z:79de1446-594a-48e7-9188-17ed184b3d0e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/94ff4c19-7447-47c4-bc2a-fadf11841e41?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1NDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzk0ZmY0YzE5LTc0NDctNDdjNC1iYzJhLWZhZGYxMTg0MWU0MT9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"94ff4c19-7447-47c4-bc2a-fadf11841e41\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-18T22:11:36.423Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:13:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "08226d4f-621f-4a15-bd29-dcede5f68211" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "0705dc73-74e3-4547-beb2-d2802a817cff" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221322Z:0705dc73-74e3-4547-beb2-d2802a817cff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/servers/sqlcrudtest-54/jobAgents/agent?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1NDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01NC9qb2JBZ2VudHMvYWdlbnQ/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Agent\",\r\n \"capacity\": 100\r\n },\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/servers/sqlcrudtest-54/databases/sqlcrudtest-4039\",\r\n \"state\": \"Ready\"\r\n },\r\n \"location\": \"westus2\",\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/servers/sqlcrudtest-54/jobAgents/agent\",\r\n \"name\": \"agent\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:13:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "a192109d-8224-4cce-a654-82ac8fcd95d1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "c631a333-cc7d-4572-a397-1d9604cb1fcd" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221322Z:c631a333-cc7d-4572-a397-1d9604cb1fcd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/servers/sqlcrudtest-54/jobAgents/agent/jobs/job1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1NDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01NC9qb2JBZ2VudHMvYWdlbnQvam9icy9qb2IxP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"description\": \"Test description\",\r\n \"schedule\": {\r\n \"startTime\": \"0001-01-01T00:00:00Z\",\r\n \"endTime\": \"0001-01-02T00:00:00Z\",\r\n \"type\": \"Recurring\",\r\n \"enabled\": false,\r\n \"interval\": \"PT5M\"\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "259" + ], + "x-ms-client-request-id": [ + "7972db43-7d66-4ca0-a5b8-3ee47603b01b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"description\": \"Test description\",\r\n \"version\": 0,\r\n \"schedule\": {\r\n \"startTime\": \"0001-01-01T00:00:00Z\",\r\n \"endTime\": \"0001-01-02T00:00:00Z\",\r\n \"type\": \"Recurring\",\r\n \"enabled\": false,\r\n \"interval\": \"PT5M\"\r\n }\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/servers/sqlcrudtest-54/jobAgents/agent/jobs/job1\",\r\n \"name\": \"job1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "419" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:13:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "bad2b2f2-35f3-4327-a73b-e1abe4bbc2eb" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "595f0a69-0e91-4753-8b2e-ea6c0b13db8c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221323Z:595f0a69-0e91-4753-8b2e-ea6c0b13db8c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/servers/sqlcrudtest-54/jobAgents/agent/jobs/job1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1NDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01NC9qb2JBZ2VudHMvYWdlbnQvam9icy9qb2IxP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"description\": \"Test description\",\r\n \"schedule\": {\r\n \"type\": \"Once\",\r\n \"enabled\": true\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "140" + ], + "x-ms-client-request-id": [ + "88a942e8-a5a0-4031-8ed2-0cc2d68993ba" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"description\": \"Test description\",\r\n \"version\": 0,\r\n \"schedule\": {\r\n \"startTime\": \"0001-01-01T00:00:00Z\",\r\n \"endTime\": \"9999-12-31T11:59:59Z\",\r\n \"type\": \"Once\",\r\n \"enabled\": true\r\n }\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/servers/sqlcrudtest-54/jobAgents/agent/jobs/job1\",\r\n \"name\": \"job1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:13:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ed1247f0-805b-4b94-a308-1f19dadc1bf7" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "1fa660b7-2c39-4363-9580-ca1b3afad495" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221323Z:1fa660b7-2c39-4363-9580-ca1b3afad495" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/servers/sqlcrudtest-54/jobAgents/agent/jobs?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1NDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01NC9qb2JBZ2VudHMvYWdlbnQvam9icz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "97d9fd19-640f-4af1-b8b5-7aa24142f875" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"description\": \"Test description\",\r\n \"version\": 0,\r\n \"schedule\": {\r\n \"startTime\": \"0001-01-01T00:00:00Z\",\r\n \"endTime\": \"9999-12-31T11:59:59Z\",\r\n \"type\": \"Once\",\r\n \"enabled\": true\r\n }\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/servers/sqlcrudtest-54/jobAgents/agent/jobs/job1\",\r\n \"name\": \"job1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:13:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f4170242-5d87-4934-b4f0-2c0ddf63490a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "61942f0b-78a9-411e-b5fc-eecfc9b95eb6" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221323Z:61942f0b-78a9-411e-b5fc-eecfc9b95eb6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8545/providers/Microsoft.Sql/servers/sqlcrudtest-54/jobAgents/agent/jobs/job1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1NDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01NC9qb2JBZ2VudHMvYWdlbnQvam9icy9qb2IxP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e1e71549-4957-4ec5-8aac-d2049892b9fe" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:13:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "e4daa54c-ad18-4d9b-bd14-3c90c3c2e9a3" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "3840674d-0165-498a-952c-9c894a97c937" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221323Z:3840674d-0165-498a-952c-9c894a97c937" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-8545?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTg1NDU/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a44369ea-e942-473a-8dbc-ee37f6774dab" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:13:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDg1NDUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "6295f771-a55d-4556-bf7e-aa4f3653f65c" + ], + "x-ms-correlation-request-id": [ + "6295f771-a55d-4556-bf7e-aa4f3653f65c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221323Z:6295f771-a55d-4556-bf7e-aa4f3653f65c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-8545?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTg1NDU/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f0aa2c01-e0ce-44b6-9787-6f711d340f8f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:13:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDg1NDUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14998" + ], + "x-ms-request-id": [ + "9aad9f7c-540f-4a4b-bdce-7c5ab817b0e2" + ], + "x-ms-correlation-request-id": [ + "9aad9f7c-540f-4a4b-bdce-7c5ab817b0e2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221324Z:9aad9f7c-540f-4a4b-bdce-7c5ab817b0e2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + } + ], + "Names": { + "CreateResourceGroup": [ + "sqlcrudtest-8545" + ], + "CreateServer": [ + "sqlcrudtest-54" + ], + "TestCreateUpdateDropJob": [ + "sqlcrudtest-4039" + ] + }, + "Variables": { + "SubscriptionId": "1b132fbc-df61-4dd8-bba0-71d7d4277eda", + "DefaultLocation": "west us 2" + } +} \ No newline at end of file diff --git a/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.SqlDatabaseAgentScenarioTests/TestCreateUpdateDropJobCredential.json b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.SqlDatabaseAgentScenarioTests/TestCreateUpdateDropJobCredential.json new file mode 100644 index 000000000000..e4c04bfe5be4 --- /dev/null +++ b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.SqlDatabaseAgentScenarioTests/TestCreateUpdateDropJobCredential.json @@ -0,0 +1,1476 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-8527?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTg1Mjc/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"west us 2\",\r\n \"tags\": {\r\n \"sqlcrudtest-8527\": \"2018-05-18 22:16:58Z\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "98" + ], + "x-ms-client-request-id": [ + "b59d4672-67c7-4268-bcec-5809b13395ce" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527\",\r\n \"name\": \"sqlcrudtest-8527\",\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"sqlcrudtest-8527\": \"2018-05-18 22:16:58Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "237" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:16:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "05c93a75-e469-4e48-b536-da7ef7122814" + ], + "x-ms-correlation-request-id": [ + "05c93a75-e469-4e48-b536-da7ef7122814" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221659Z:05c93a75-e469-4e48-b536-da7ef7122814" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/servers/sqlcrudtest-5063?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1MjcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01MDYzP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "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\": \"west us 2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "183" + ], + "x-ms-client-request-id": [ + "6de6917b-4c66-4dba-8352-9f9c6e53cfe7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertLogicalServer\",\r\n \"startTime\": \"2018-05-18T22:17:04.24Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "73" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:17:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/locations/westus2/serverOperationResults/e4f8438e-b2e7-4acb-b934-79d385960f3f?api-version=2015-05-01-preview" + ], + "Retry-After": [ + "1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/e4f8438e-b2e7-4acb-b934-79d385960f3f?api-version=2015-05-01-preview" + ], + "x-ms-request-id": [ + "e4f8438e-b2e7-4acb-b934-79d385960f3f" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "edd2fb88-895e-498b-81e3-9f26363a24e8" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221704Z:edd2fb88-895e-498b-81e3-9f26363a24e8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/e4f8438e-b2e7-4acb-b934-79d385960f3f?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1MjcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi9lNGY4NDM4ZS1iMmU3LTRhY2ItYjkzNC03OWQzODU5NjBmM2Y/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"e4f8438e-b2e7-4acb-b934-79d385960f3f\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:17:04.24Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:17:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "8ff75072-5077-40ca-9c5a-b15bc7626912" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "eaa6178a-466c-4672-89d0-c35b5ff1ffda" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221714Z:eaa6178a-466c-4672-89d0-c35b5ff1ffda" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/e4f8438e-b2e7-4acb-b934-79d385960f3f?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1MjcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi9lNGY4NDM4ZS1iMmU3LTRhY2ItYjkzNC03OWQzODU5NjBmM2Y/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"e4f8438e-b2e7-4acb-b934-79d385960f3f\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:17:04.24Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:17:34 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7178f335-6b52-4a8d-b30e-64a47c2d654f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "ce0980e6-6940-43cf-b2fd-2349b8bfe9f2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221734Z:ce0980e6-6940-43cf-b2fd-2349b8bfe9f2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/e4f8438e-b2e7-4acb-b934-79d385960f3f?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1MjcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi9lNGY4NDM4ZS1iMmU3LTRhY2ItYjkzNC03OWQzODU5NjBmM2Y/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"e4f8438e-b2e7-4acb-b934-79d385960f3f\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-18T22:17:04.24Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:17:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b9f5695d-19f1-431a-be82-0015cbb50b2a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "b4de42d0-a59c-4125-bb7a-ff0b6c50aa91" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221754Z:b4de42d0-a59c-4125-bb7a-ff0b6c50aa91" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/servers/sqlcrudtest-5063?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1MjcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01MDYzP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.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-5063.database.windows.net\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/servers/sqlcrudtest-5063\",\r\n \"name\": \"sqlcrudtest-5063\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:17:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ab288386-cab7-4f9c-9510-29bd64afb4a3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "509dfb62-6ab9-4868-b509-37c3529c40f3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221754Z:509dfb62-6ab9-4868-b509-37c3529c40f3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/servers/sqlcrudtest-5063/databases/sqlcrudtest-140?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1MjcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01MDYzL2RhdGFiYXNlcy9zcWxjcnVkdGVzdC0xNDA/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"westus2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "29" + ], + "x-ms-client-request-id": [ + "076d4c84-cdd9-4d5c-8f75-a7a351d7802d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"CreateLogicalDatabase\",\r\n \"startTime\": \"2018-05-18T22:17:55.71Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "75" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:17:54 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/locations/westus2/databaseOperationResults/f2f3d5e4-6562-413f-b235-c5a478ebe13a?api-version=2017-10-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/f2f3d5e4-6562-413f-b235-c5a478ebe13a?api-version=2017-10-01-preview" + ], + "x-ms-request-id": [ + "eb39a50f-6d1a-44e2-ae6f-ff27268dca50" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "bc87622d-4f6b-46a9-bcb8-52745cc7c112" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221755Z:bc87622d-4f6b-46a9-bcb8-52745cc7c112" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/f2f3d5e4-6562-413f-b235-c5a478ebe13a?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1MjcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uL2YyZjNkNWU0LTY1NjItNDEzZi1iMjM1LWM1YTQ3OGViZTEzYT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"f2f3d5e4-6562-413f-b235-c5a478ebe13a\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:17:55.71Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:18:10 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "cb8c9e5f-08a0-4b0e-8a27-4745430b8078" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "c8857f07-35c1-4d8f-bcbc-5f98774f66c0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221810Z:c8857f07-35c1-4d8f-bcbc-5f98774f66c0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/f2f3d5e4-6562-413f-b235-c5a478ebe13a?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1MjcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uL2YyZjNkNWU0LTY1NjItNDEzZi1iMjM1LWM1YTQ3OGViZTEzYT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"f2f3d5e4-6562-413f-b235-c5a478ebe13a\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:17:55.71Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:18:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "3f14d09e-9df3-4965-b8bd-fbf162ce5540" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "097c7f1a-2e81-4cd6-b5f8-788098d18b14" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221825Z:097c7f1a-2e81-4cd6-b5f8-788098d18b14" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/f2f3d5e4-6562-413f-b235-c5a478ebe13a?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1MjcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uL2YyZjNkNWU0LTY1NjItNDEzZi1iMjM1LWM1YTQ3OGViZTEzYT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"f2f3d5e4-6562-413f-b235-c5a478ebe13a\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-18T22:17:55.71Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:18:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "3526c40e-63d4-4c6d-8742-59bcbc58f6ff" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "af51af27-52ff-474b-8c01-0860ba1e125b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221840Z:af51af27-52ff-474b-8c01-0860ba1e125b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/servers/sqlcrudtest-5063/databases/sqlcrudtest-140?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1MjcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01MDYzL2RhdGFiYXNlcy9zcWxjcnVkdGVzdC0xNDA/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 10\r\n },\r\n \"kind\": \"v12.0,user\",\r\n \"properties\": {\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": 268435456000,\r\n \"status\": \"Online\",\r\n \"databaseId\": \"42a0f8db-6fd7-4676-b565-fad2cc2e924e\",\r\n \"creationDate\": \"2018-05-18T22:17:56.15Z\",\r\n \"currentServiceObjectiveName\": \"S0\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"defaultSecondaryLocation\": \"West Central US\",\r\n \"catalogCollation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"zoneRedundant\": false,\r\n \"earliestRestoreDate\": \"2018-05-18T22:48:36.587Z\",\r\n \"readScale\": \"Disabled\",\r\n \"currentSku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 10\r\n }\r\n },\r\n \"location\": \"westus2\",\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/servers/sqlcrudtest-5063/databases/sqlcrudtest-140\",\r\n \"name\": \"sqlcrudtest-140\",\r\n \"type\": \"Microsoft.Sql/servers/databases\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:18:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "af3a7375-0eeb-4232-b3ed-27eb0f564e3c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "6f0c17ea-ea09-498e-82ce-7359367e4d2c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221841Z:6f0c17ea-ea09-498e-82ce-7359367e4d2c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/servers/sqlcrudtest-5063/jobAgents/agent?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1MjcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01MDYzL2pvYkFnZW50cy9hZ2VudD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/servers/sqlcrudtest-5063/databases/sqlcrudtest-140\"\r\n },\r\n \"location\": \"westus2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "234" + ], + "x-ms-client-request-id": [ + "03383fa9-fcf9-4489-b696-aa67c15d790d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertJobAccount\",\r\n \"startTime\": \"2018-05-18T22:18:41.403Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "71" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:18:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/locations/westus2/jobAgentOperationResults/bebbae8a-556a-49ff-a5b7-51b9be1f15e3?api-version=2017-03-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/bebbae8a-556a-49ff-a5b7-51b9be1f15e3?api-version=2017-03-01-preview" + ], + "x-ms-request-id": [ + "7ab511bb-c322-48a3-bc07-d3890dbee901" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "92303d3d-9092-4cd6-9d66-af7c3b8dc75d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221841Z:92303d3d-9092-4cd6-9d66-af7c3b8dc75d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/bebbae8a-556a-49ff-a5b7-51b9be1f15e3?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1MjcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2JlYmJhZThhLTU1NmEtNDlmZi1hNWI3LTUxYjliZTFmMTVlMz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"bebbae8a-556a-49ff-a5b7-51b9be1f15e3\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:18:41.403Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:18:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "caf1b90a-8371-4221-8323-64d32262a93e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "375c77a0-0b23-45af-b7d4-ceb3c149d078" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221856Z:375c77a0-0b23-45af-b7d4-ceb3c149d078" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/bebbae8a-556a-49ff-a5b7-51b9be1f15e3?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1MjcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2JlYmJhZThhLTU1NmEtNDlmZi1hNWI3LTUxYjliZTFmMTVlMz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"bebbae8a-556a-49ff-a5b7-51b9be1f15e3\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:18:41.403Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:19:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "93632b07-399b-435c-8198-2c56e13ce2b9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "27d1ed51-a297-466c-820e-b2b51fde1897" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221911Z:27d1ed51-a297-466c-820e-b2b51fde1897" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/bebbae8a-556a-49ff-a5b7-51b9be1f15e3?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1MjcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2JlYmJhZThhLTU1NmEtNDlmZi1hNWI3LTUxYjliZTFmMTVlMz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"bebbae8a-556a-49ff-a5b7-51b9be1f15e3\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:18:41.403Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:19:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "452c3894-0192-40bd-9828-9be9d4d92053" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "6273fa27-d804-4f39-9045-da7e67b93008" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221926Z:6273fa27-d804-4f39-9045-da7e67b93008" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/bebbae8a-556a-49ff-a5b7-51b9be1f15e3?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1MjcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2JlYmJhZThhLTU1NmEtNDlmZi1hNWI3LTUxYjliZTFmMTVlMz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"bebbae8a-556a-49ff-a5b7-51b9be1f15e3\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-18T22:18:41.403Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:19:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "06a606f1-e734-44b8-914c-1e8d83a4369c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "83f84d7f-7616-43b9-adec-b9edb22b3003" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221941Z:83f84d7f-7616-43b9-adec-b9edb22b3003" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/servers/sqlcrudtest-5063/jobAgents/agent?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1MjcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01MDYzL2pvYkFnZW50cy9hZ2VudD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Agent\",\r\n \"capacity\": 100\r\n },\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/servers/sqlcrudtest-5063/databases/sqlcrudtest-140\",\r\n \"state\": \"Ready\"\r\n },\r\n \"location\": \"westus2\",\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/servers/sqlcrudtest-5063/jobAgents/agent\",\r\n \"name\": \"agent\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:19:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "bf4de78f-3150-45e0-8b0f-3fab27d6cd7a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "e42d7cfb-5245-4df2-aa08-a80e162826d4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221941Z:e42d7cfb-5245-4df2-aa08-a80e162826d4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/servers/sqlcrudtest-5063/jobAgents/agent/credentials/dummylogin?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1MjcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01MDYzL2pvYkFnZW50cy9hZ2VudC9jcmVkZW50aWFscy9kdW1teWxvZ2luP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"username\": \"a\",\r\n \"password\": \"b!\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "72" + ], + "x-ms-client-request-id": [ + "097fba34-7b74-4402-9380-2ca0917629c0" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"username\": \"a\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/servers/sqlcrudtest-5063/jobAgents/agent/credentials/dummylogin\",\r\n \"name\": \"dummylogin\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/credentials\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "283" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:19:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "35442c74-0fcd-4fb6-9661-8fbc80b8e56f" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "090961c8-6080-4a72-b279-12c8899a5814" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221942Z:090961c8-6080-4a72-b279-12c8899a5814" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/servers/sqlcrudtest-5063/jobAgents/agent/credentials/dummylogin?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1MjcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01MDYzL2pvYkFnZW50cy9hZ2VudC9jcmVkZW50aWFscy9kdW1teWxvZ2luP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"username\": \"dummylogin\",\r\n \"password\": \"Un53cuRE!\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "88" + ], + "x-ms-client-request-id": [ + "331a1146-d32f-4bb6-a3dc-e481bee06e5c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"username\": \"dummylogin\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/servers/sqlcrudtest-5063/jobAgents/agent/credentials/dummylogin\",\r\n \"name\": \"dummylogin\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/credentials\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:19:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "d32c3d30-8087-4df8-afff-45e85a82a3e3" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "38769f62-7a06-411c-a1ab-20fca16c579d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221943Z:38769f62-7a06-411c-a1ab-20fca16c579d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/servers/sqlcrudtest-5063/jobAgents/agent/credentials?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1MjcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01MDYzL2pvYkFnZW50cy9hZ2VudC9jcmVkZW50aWFscz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3791d56b-3fe7-44a6-9ab8-aab73904075c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"username\": \"dummylogin\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/servers/sqlcrudtest-5063/jobAgents/agent/credentials/dummylogin\",\r\n \"name\": \"dummylogin\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/credentials\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:19:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "86755cae-6e99-42fe-a77e-988a0f2ac729" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "055a4fbe-2164-46f7-adcb-5ca7ee7712ce" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221943Z:055a4fbe-2164-46f7-adcb-5ca7ee7712ce" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8527/providers/Microsoft.Sql/servers/sqlcrudtest-5063/jobAgents/agent/credentials/dummylogin?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg1MjcvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01MDYzL2pvYkFnZW50cy9hZ2VudC9jcmVkZW50aWFscy9kdW1teWxvZ2luP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e797c625-9a66-4b09-bd9a-62975021d6d1" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:19:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "a747ebc1-a25b-4cda-b29b-97d0ec4cb56c" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "f6e6969f-b6f7-4676-a948-d6db0285c50b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221943Z:f6e6969f-b6f7-4676-a948-d6db0285c50b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-8527?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTg1Mjc/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "09a8b07f-dbaf-4199-a938-bc3ae52a4794" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:19:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDg1MjctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14998" + ], + "x-ms-request-id": [ + "6c8a2a9b-3d01-44de-93f8-458820cde4db" + ], + "x-ms-correlation-request-id": [ + "6c8a2a9b-3d01-44de-93f8-458820cde4db" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221943Z:6c8a2a9b-3d01-44de-93f8-458820cde4db" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-8527?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTg1Mjc/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "bd482cb7-7fc7-496a-870a-e8c4dbde4213" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:19:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDg1MjctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14997" + ], + "x-ms-request-id": [ + "d40a981d-1f72-4bde-8142-2b837f1c66e4" + ], + "x-ms-correlation-request-id": [ + "d40a981d-1f72-4bde-8142-2b837f1c66e4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221943Z:d40a981d-1f72-4bde-8142-2b837f1c66e4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + } + ], + "Names": { + "CreateResourceGroup": [ + "sqlcrudtest-8527" + ], + "CreateServer": [ + "sqlcrudtest-5063" + ], + "TestCreateUpdateDropJobCredential": [ + "sqlcrudtest-140" + ] + }, + "Variables": { + "DefaultLocation": "west us 2", + "SubscriptionId": "1b132fbc-df61-4dd8-bba0-71d7d4277eda" + } +} \ No newline at end of file diff --git a/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.SqlDatabaseAgentScenarioTests/TestCreateUpdateDropJobStep.json b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.SqlDatabaseAgentScenarioTests/TestCreateUpdateDropJobStep.json new file mode 100644 index 000000000000..cb108b449e7c --- /dev/null +++ b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.SqlDatabaseAgentScenarioTests/TestCreateUpdateDropJobStep.json @@ -0,0 +1,1860 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-1232?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTEyMzI/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"west us 2\",\r\n \"tags\": {\r\n \"sqlcrudtest-1232\": \"2018-05-18 22:13:26Z\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "98" + ], + "x-ms-client-request-id": [ + "7eab8b3d-2095-4eca-a5d8-72bed1b43df7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232\",\r\n \"name\": \"sqlcrudtest-1232\",\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"sqlcrudtest-1232\": \"2018-05-18 22:13:26Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "237" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:13:27 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "98f76e65-89f4-40ce-9c20-5768c0252af0" + ], + "x-ms-correlation-request-id": [ + "98f76e65-89f4-40ce-9c20-5768c0252af0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221327Z:98f76e65-89f4-40ce-9c20-5768c0252af0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTEyMzIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01MDk5P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "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\": \"west us 2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "183" + ], + "x-ms-client-request-id": [ + "0b7bc55a-6c90-4a8c-bbb4-21cfe581d1a5" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertLogicalServer\",\r\n \"startTime\": \"2018-05-18T22:13:29.94Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "73" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:13:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/locations/westus2/serverOperationResults/c69c47b5-fb6a-47ed-ab34-51b5d2471a9c?api-version=2015-05-01-preview" + ], + "Retry-After": [ + "1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/c69c47b5-fb6a-47ed-ab34-51b5d2471a9c?api-version=2015-05-01-preview" + ], + "x-ms-request-id": [ + "c69c47b5-fb6a-47ed-ab34-51b5d2471a9c" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "6460e47f-8bfb-4b24-891f-41d99c99d6f6" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221330Z:6460e47f-8bfb-4b24-891f-41d99c99d6f6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/c69c47b5-fb6a-47ed-ab34-51b5d2471a9c?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTEyMzIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi9jNjljNDdiNS1mYjZhLTQ3ZWQtYWIzNC01MWI1ZDI0NzFhOWM/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"c69c47b5-fb6a-47ed-ab34-51b5d2471a9c\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:13:29.94Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:13:39 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "2b74737a-c909-4f86-b9d1-379ef463f66e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "c6cc1c13-b1b2-4343-b588-3b4f718f0968" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221340Z:c6cc1c13-b1b2-4343-b588-3b4f718f0968" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/c69c47b5-fb6a-47ed-ab34-51b5d2471a9c?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTEyMzIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi9jNjljNDdiNS1mYjZhLTQ3ZWQtYWIzNC01MWI1ZDI0NzFhOWM/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"c69c47b5-fb6a-47ed-ab34-51b5d2471a9c\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:13:29.94Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:14:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "0575f045-e5f5-4775-986e-8cf57e1bedfd" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "e680f4f2-956a-4a18-a7bc-f7fa851e8aed" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221400Z:e680f4f2-956a-4a18-a7bc-f7fa851e8aed" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/c69c47b5-fb6a-47ed-ab34-51b5d2471a9c?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTEyMzIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi9jNjljNDdiNS1mYjZhLTQ3ZWQtYWIzNC01MWI1ZDI0NzFhOWM/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"c69c47b5-fb6a-47ed-ab34-51b5d2471a9c\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-18T22:13:29.94Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:14:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e62e486d-def0-4d15-98ea-d4e1fca9fcb4" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "7e675978-7c93-4e85-ba19-fcd8eb5d5920" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221420Z:7e675978-7c93-4e85-ba19-fcd8eb5d5920" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTEyMzIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01MDk5P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.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-5099.database.windows.net\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099\",\r\n \"name\": \"sqlcrudtest-5099\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:14:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "2ee3c571-a956-4afb-9e16-2eaa77067e3b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "d9391b75-fead-479e-8e95-75e246be3754" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221420Z:d9391b75-fead-479e-8e95-75e246be3754" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/databases/sqlcrudtest-1064?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTEyMzIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01MDk5L2RhdGFiYXNlcy9zcWxjcnVkdGVzdC0xMDY0P2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"westus2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "29" + ], + "x-ms-client-request-id": [ + "c5b0e33d-8efd-4828-8381-54a8530e917c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"CreateLogicalDatabase\",\r\n \"startTime\": \"2018-05-18T22:14:20.71Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "75" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:14:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/locations/westus2/databaseOperationResults/c3bd990f-560d-48b6-9282-7e24273b4f9d?api-version=2017-10-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/c3bd990f-560d-48b6-9282-7e24273b4f9d?api-version=2017-10-01-preview" + ], + "x-ms-request-id": [ + "4e98e78b-79b7-44ae-912f-7c456f3c6cac" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "f7df9094-1e27-48aa-bdbc-bacf67fae449" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221421Z:f7df9094-1e27-48aa-bdbc-bacf67fae449" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/c3bd990f-560d-48b6-9282-7e24273b4f9d?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTEyMzIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uL2MzYmQ5OTBmLTU2MGQtNDhiNi05MjgyLTdlMjQyNzNiNGY5ZD9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"c3bd990f-560d-48b6-9282-7e24273b4f9d\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:14:20.71Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:14:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e87a011f-8937-4d35-829d-f977bb7ebe0f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "dff9ef90-9f81-4f22-90bb-85cd0b10f5af" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221436Z:dff9ef90-9f81-4f22-90bb-85cd0b10f5af" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/c3bd990f-560d-48b6-9282-7e24273b4f9d?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTEyMzIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uL2MzYmQ5OTBmLTU2MGQtNDhiNi05MjgyLTdlMjQyNzNiNGY5ZD9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"c3bd990f-560d-48b6-9282-7e24273b4f9d\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:14:20.71Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:14:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "a7d96a72-e1fa-4d79-bab1-bda33da7223d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "79f2e0a3-17bd-4b78-90c8-241c3b0a9c5f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221451Z:79f2e0a3-17bd-4b78-90c8-241c3b0a9c5f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/c3bd990f-560d-48b6-9282-7e24273b4f9d?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTEyMzIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uL2MzYmQ5OTBmLTU2MGQtNDhiNi05MjgyLTdlMjQyNzNiNGY5ZD9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"c3bd990f-560d-48b6-9282-7e24273b4f9d\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-18T22:14:20.71Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:15:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ccaef9e7-a8a0-4cf9-af82-435bb17871a9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "6f7b612f-b7b5-4ecd-be91-ed5e8f1c4c71" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221506Z:6f7b612f-b7b5-4ecd-be91-ed5e8f1c4c71" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/databases/sqlcrudtest-1064?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTEyMzIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01MDk5L2RhdGFiYXNlcy9zcWxjcnVkdGVzdC0xMDY0P2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 10\r\n },\r\n \"kind\": \"v12.0,user\",\r\n \"properties\": {\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": 268435456000,\r\n \"status\": \"Online\",\r\n \"databaseId\": \"795e4c87-c085-44d9-94c2-9117ee2db9c4\",\r\n \"creationDate\": \"2018-05-18T22:14:21.13Z\",\r\n \"currentServiceObjectiveName\": \"S0\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"defaultSecondaryLocation\": \"West Central US\",\r\n \"catalogCollation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"zoneRedundant\": false,\r\n \"earliestRestoreDate\": \"2018-05-18T22:45:05.18Z\",\r\n \"readScale\": \"Disabled\",\r\n \"currentSku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 10\r\n }\r\n },\r\n \"location\": \"westus2\",\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/databases/sqlcrudtest-1064\",\r\n \"name\": \"sqlcrudtest-1064\",\r\n \"type\": \"Microsoft.Sql/servers/databases\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:15:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "fd931d3c-9f05-4c76-b2a2-795998ff7745" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "c1bd4de3-8269-480a-a0ab-698af8315e73" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221506Z:c1bd4de3-8269-480a-a0ab-698af8315e73" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTEyMzIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01MDk5L2pvYkFnZW50cy9hZ2VudD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/databases/sqlcrudtest-1064\"\r\n },\r\n \"location\": \"westus2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "235" + ], + "x-ms-client-request-id": [ + "73fb5ba7-4121-48ce-95cf-8f15e2470fb0" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertJobAccount\",\r\n \"startTime\": \"2018-05-18T22:15:06.637Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "71" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:15:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/locations/westus2/jobAgentOperationResults/93cb99be-aa76-443f-8ae4-62289bc27aa4?api-version=2017-03-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/93cb99be-aa76-443f-8ae4-62289bc27aa4?api-version=2017-03-01-preview" + ], + "x-ms-request-id": [ + "78ee70bb-cbbc-4f34-986d-a4c9c53833f4" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "596d3545-8b2f-4f7f-9b84-fc3575c30d17" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221506Z:596d3545-8b2f-4f7f-9b84-fc3575c30d17" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/93cb99be-aa76-443f-8ae4-62289bc27aa4?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTEyMzIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzkzY2I5OWJlLWFhNzYtNDQzZi04YWU0LTYyMjg5YmMyN2FhND9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"93cb99be-aa76-443f-8ae4-62289bc27aa4\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:15:06.637Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:15:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "3bdce320-c0ff-46c2-bbed-89fbf53e669b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "7b344021-4f24-47a1-865b-d4dff784a48b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221522Z:7b344021-4f24-47a1-865b-d4dff784a48b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/93cb99be-aa76-443f-8ae4-62289bc27aa4?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTEyMzIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzkzY2I5OWJlLWFhNzYtNDQzZi04YWU0LTYyMjg5YmMyN2FhND9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"93cb99be-aa76-443f-8ae4-62289bc27aa4\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:15:06.637Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:15:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "fddde452-5deb-4d63-afed-6a6c3767b76e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "afedb6b0-dfa5-4c09-9828-7f44e9a8db4e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221537Z:afedb6b0-dfa5-4c09-9828-7f44e9a8db4e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/93cb99be-aa76-443f-8ae4-62289bc27aa4?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTEyMzIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzkzY2I5OWJlLWFhNzYtNDQzZi04YWU0LTYyMjg5YmMyN2FhND9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"93cb99be-aa76-443f-8ae4-62289bc27aa4\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:15:06.637Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:15:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "3b590a0c-011c-489b-8ec7-7347fc5cf3fc" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "795259e7-68ae-484f-a9b3-b4549520f253" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221552Z:795259e7-68ae-484f-a9b3-b4549520f253" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/93cb99be-aa76-443f-8ae4-62289bc27aa4?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTEyMzIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzkzY2I5OWJlLWFhNzYtNDQzZi04YWU0LTYyMjg5YmMyN2FhND9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"93cb99be-aa76-443f-8ae4-62289bc27aa4\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:15:06.637Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:16:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b3aee032-7344-4157-8453-f656d40930ee" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "b2123ebd-61d2-46e4-a100-8a3a160cb65f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221607Z:b2123ebd-61d2-46e4-a100-8a3a160cb65f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/93cb99be-aa76-443f-8ae4-62289bc27aa4?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTEyMzIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzkzY2I5OWJlLWFhNzYtNDQzZi04YWU0LTYyMjg5YmMyN2FhND9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"93cb99be-aa76-443f-8ae4-62289bc27aa4\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:15:06.637Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:16:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "a72de13c-7e43-4397-a9cf-82906de68f0d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "a97f22bb-7e37-4291-87f0-ab1ed64ed36c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221622Z:a97f22bb-7e37-4291-87f0-ab1ed64ed36c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/93cb99be-aa76-443f-8ae4-62289bc27aa4?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTEyMzIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzkzY2I5OWJlLWFhNzYtNDQzZi04YWU0LTYyMjg5YmMyN2FhND9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"93cb99be-aa76-443f-8ae4-62289bc27aa4\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:15:06.637Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:16:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "97583406-c717-42e2-a2bb-6ba9f5cfb293" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "09f11254-9239-41cd-9f56-67a69cd0d2fd" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221637Z:09f11254-9239-41cd-9f56-67a69cd0d2fd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/93cb99be-aa76-443f-8ae4-62289bc27aa4?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTEyMzIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uLzkzY2I5OWJlLWFhNzYtNDQzZi04YWU0LTYyMjg5YmMyN2FhND9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"93cb99be-aa76-443f-8ae4-62289bc27aa4\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-18T22:15:06.637Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:16:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "4211301a-7bce-4d04-9193-b107f1161f81" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "5f593306-2f1b-4081-ae78-5a9a3c497278" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221652Z:5f593306-2f1b-4081-ae78-5a9a3c497278" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTEyMzIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01MDk5L2pvYkFnZW50cy9hZ2VudD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Agent\",\r\n \"capacity\": 100\r\n },\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/databases/sqlcrudtest-1064\",\r\n \"state\": \"Ready\"\r\n },\r\n \"location\": \"westus2\",\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent\",\r\n \"name\": \"agent\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:16:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ec5b7894-8864-420e-bfd9-33f6f8fc9ae6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "c22a4010-1bcd-4025-bcb9-3df3f1bbeb1b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221652Z:c22a4010-1bcd-4025-bcb9-3df3f1bbeb1b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent/credentials/dummylogin?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTEyMzIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01MDk5L2pvYkFnZW50cy9hZ2VudC9jcmVkZW50aWFscy9kdW1teWxvZ2luP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"username\": \"dummylogin\",\r\n \"password\": \"Un53cuRE!\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "88" + ], + "x-ms-client-request-id": [ + "bd8368fa-6868-42a5-81e1-24212075e592" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"username\": \"dummylogin\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent/credentials/dummylogin\",\r\n \"name\": \"dummylogin\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/credentials\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "292" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:16:52 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "a0014ae6-9676-41ee-a904-1127994d4842" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "f8664fc4-4870-4b79-966d-34fcf211a476" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221653Z:f8664fc4-4870-4b79-966d-34fcf211a476" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent/targetGroups/tg1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTEyMzIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01MDk5L2pvYkFnZW50cy9hZ2VudC90YXJnZXRHcm91cHMvdGcxP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"members\": [\r\n {\r\n \"membershipType\": \"Include\",\r\n \"type\": \"SqlServer\",\r\n \"serverName\": \"sqlcrudtest-5099\",\r\n \"refreshCredential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent/credentials/dummylogin\"\r\n }\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "386" + ], + "x-ms-client-request-id": [ + "58111fb3-58ac-4462-8ebd-e33d3696220b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"members\": [\r\n {\r\n \"membershipType\": \"Include\",\r\n \"type\": \"SqlServer\",\r\n \"serverName\": \"sqlcrudtest-5099\",\r\n \"refreshCredential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent/credentials/dummylogin\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent/targetGroups/tg1\",\r\n \"name\": \"tg1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/targetGroups\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "542" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:16:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "58a3a99b-1b01-4848-bcef-7edb26dba443" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "eb32c8a3-abe2-4e6c-9ce7-e8cd2abc08ca" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221654Z:eb32c8a3-abe2-4e6c-9ce7-e8cd2abc08ca" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent/jobs/job1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTEyMzIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01MDk5L2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"description\": \"Test description\",\r\n \"schedule\": {\r\n \"type\": \"Once\",\r\n \"enabled\": true\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "140" + ], + "x-ms-client-request-id": [ + "d178367b-d4d5-4769-916c-e12072c2a3d5" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"description\": \"Test description\",\r\n \"version\": 0,\r\n \"schedule\": {\r\n \"startTime\": \"0001-01-01T00:00:00Z\",\r\n \"endTime\": \"9999-12-31T11:59:59Z\",\r\n \"type\": \"Once\",\r\n \"enabled\": true\r\n }\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent/jobs/job1\",\r\n \"name\": \"job1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "397" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:16:54 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "07b5f81e-f477-4e01-9700-baa7e8c13cfa" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "cc5b0dbe-46d0-44e6-b1a8-f7156e757635" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221654Z:cc5b0dbe-46d0-44e6-b1a8-f7156e757635" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent/jobs/job1/steps/step1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTEyMzIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01MDk5L2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvc3RlcHMvc3RlcDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"targetGroup\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent/targetGroups/tg1\",\r\n \"credential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent/credentials/dummylogin\",\r\n \"action\": {\r\n \"value\": \"SELECT 1\"\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "462" + ], + "x-ms-client-request-id": [ + "bdaa09e6-8271-4bdc-b8a8-09eb600f78ee" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"stepId\": 1,\r\n \"targetGroup\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent/targetGroups/tg1\",\r\n \"credential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent/credentials/dummylogin\",\r\n \"action\": {\r\n \"type\": \"TSql\",\r\n \"source\": \"Inline\",\r\n \"value\": \"SELECT 1\"\r\n },\r\n \"executionOptions\": {\r\n \"timeoutSeconds\": 43200,\r\n \"retryAttempts\": 10,\r\n \"initialRetryIntervalSeconds\": 1,\r\n \"maximumRetryIntervalSeconds\": 120,\r\n \"retryIntervalBackoffMultiplier\": 2.0\r\n }\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent/jobs/job1/steps/step1\",\r\n \"name\": \"step1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/steps\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "869" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:16:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "3efe7c2e-d86a-4498-ba1f-c17846ec1e7f" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-correlation-request-id": [ + "575d9432-de42-4103-93d7-c959bbb1daab" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221655Z:575d9432-de42-4103-93d7-c959bbb1daab" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent/jobs/job1/steps/step1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTEyMzIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01MDk5L2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvc3RlcHMvc3RlcDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"targetGroup\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent/targetGroups/tg1\",\r\n \"credential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent/credentials/dummylogin\",\r\n \"action\": {\r\n \"type\": \"TSql\",\r\n \"source\": \"Inline\",\r\n \"value\": \"SELECT 1\"\r\n },\r\n \"output\": {\r\n \"type\": \"SqlDatabase\",\r\n \"subscriptionId\": \"00000000-0000-0000-0000-000000000000\",\r\n \"resourceGroupName\": \"rg1\",\r\n \"serverName\": \"s1\",\r\n \"databaseName\": \"db1\",\r\n \"schemaName\": \"dbo\",\r\n \"tableName\": \"tbl\",\r\n \"credential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent/credentials/dummylogin\"\r\n },\r\n \"executionOptions\": {\r\n \"timeoutSeconds\": 10000,\r\n \"retryAttempts\": 1000,\r\n \"initialRetryIntervalSeconds\": 100,\r\n \"maximumRetryIntervalSeconds\": 1000,\r\n \"retryIntervalBackoffMultiplier\": 1.5\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "1203" + ], + "x-ms-client-request-id": [ + "6e090100-9197-4218-a052-9c1072ddd40d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"stepId\": 1,\r\n \"targetGroup\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent/targetGroups/tg1\",\r\n \"credential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent/credentials/dummylogin\",\r\n \"action\": {\r\n \"type\": \"TSql\",\r\n \"source\": \"Inline\",\r\n \"value\": \"SELECT 1\"\r\n },\r\n \"output\": {\r\n \"type\": \"SqlDatabase\",\r\n \"resourceGroupName\": \"rg1\",\r\n \"serverName\": \"s1\",\r\n \"databaseName\": \"db1\",\r\n \"schemaName\": \"dbo\",\r\n \"tableName\": \"tbl\",\r\n \"credential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent/credentials/dummylogin\"\r\n },\r\n \"executionOptions\": {\r\n \"timeoutSeconds\": 10000,\r\n \"retryAttempts\": 1000,\r\n \"initialRetryIntervalSeconds\": 100,\r\n \"maximumRetryIntervalSeconds\": 1000,\r\n \"retryIntervalBackoffMultiplier\": 1.5\r\n }\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent/jobs/job1/steps/step1\",\r\n \"name\": \"step1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/steps\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:16:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9088ce27-1af7-4e4a-bddd-3d3a94bafd11" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1192" + ], + "x-ms-correlation-request-id": [ + "bbaf66e1-3ef8-452b-b9f7-6786156f20e0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221655Z:bbaf66e1-3ef8-452b-b9f7-6786156f20e0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent/jobs/job1/steps?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTEyMzIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01MDk5L2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvc3RlcHM/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "32b4536d-4b12-4010-aedd-e52a5236f2ce" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"stepId\": 1,\r\n \"targetGroup\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent/targetGroups/tg1\",\r\n \"credential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent/credentials/dummylogin\",\r\n \"action\": {\r\n \"type\": \"TSql\",\r\n \"source\": \"Inline\",\r\n \"value\": \"SELECT 1\"\r\n },\r\n \"output\": {\r\n \"type\": \"SqlDatabase\",\r\n \"resourceGroupName\": \"rg1\",\r\n \"serverName\": \"s1\",\r\n \"databaseName\": \"db1\",\r\n \"schemaName\": \"dbo\",\r\n \"tableName\": \"tbl\",\r\n \"credential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent/credentials/dummylogin\"\r\n },\r\n \"executionOptions\": {\r\n \"timeoutSeconds\": 10000,\r\n \"retryAttempts\": 1000,\r\n \"initialRetryIntervalSeconds\": 100,\r\n \"maximumRetryIntervalSeconds\": 1000,\r\n \"retryIntervalBackoffMultiplier\": 1.5\r\n }\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent/jobs/job1/steps/step1\",\r\n \"name\": \"step1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/steps\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:16:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9f5192ea-0cc7-492a-91f6-87e29c2b2ad1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "8f37669c-9558-4143-8388-25bdc0a1fc42" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221656Z:8f37669c-9558-4143-8388-25bdc0a1fc42" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-1232/providers/Microsoft.Sql/servers/sqlcrudtest-5099/jobAgents/agent/jobs/job1/steps/step1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTEyMzIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC01MDk5L2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvc3RlcHMvc3RlcDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e39c5795-3eae-4ff8-a236-61ac1b255a41" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:16:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "952413b5-175e-41fc-b429-05819c2d22a2" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "44cbb20d-a099-40c0-befa-3306cc8c8283" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221656Z:44cbb20d-a099-40c0-befa-3306cc8c8283" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-1232?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTEyMzI/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "bb34472a-c31c-4c16-9785-cd48da0fe7fb" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:16:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDEyMzItV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "5c994a0b-3134-438b-a282-2f21a4ddf099" + ], + "x-ms-correlation-request-id": [ + "5c994a0b-3134-438b-a282-2f21a4ddf099" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221656Z:5c994a0b-3134-438b-a282-2f21a4ddf099" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-1232?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTEyMzI/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b95c522b-0c09-4a23-8738-8586a943f06b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:16:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDEyMzItV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14998" + ], + "x-ms-request-id": [ + "6333310f-38fa-4229-82dd-c857b023e4a7" + ], + "x-ms-correlation-request-id": [ + "6333310f-38fa-4229-82dd-c857b023e4a7" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221657Z:6333310f-38fa-4229-82dd-c857b023e4a7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + } + ], + "Names": { + "CreateResourceGroup": [ + "sqlcrudtest-1232" + ], + "CreateServer": [ + "sqlcrudtest-5099" + ], + "TestCreateUpdateDropJobStep": [ + "sqlcrudtest-1064" + ] + }, + "Variables": { + "DefaultLocation": "west us 2", + "SubscriptionId": "1b132fbc-df61-4dd8-bba0-71d7d4277eda" + } +} \ No newline at end of file diff --git a/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.SqlDatabaseAgentScenarioTests/TestCreateUpdateDropTargetGroup.json b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.SqlDatabaseAgentScenarioTests/TestCreateUpdateDropTargetGroup.json new file mode 100644 index 000000000000..221e73153001 --- /dev/null +++ b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.SqlDatabaseAgentScenarioTests/TestCreateUpdateDropTargetGroup.json @@ -0,0 +1,1665 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-7726?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTc3MjY/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"west us 2\",\r\n \"tags\": {\r\n \"sqlcrudtest-7726\": \"2018-05-18 22:27:40Z\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "98" + ], + "x-ms-client-request-id": [ + "3e8aa359-2c5e-4eac-8419-ab5fc5857bb4" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726\",\r\n \"name\": \"sqlcrudtest-7726\",\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"sqlcrudtest-7726\": \"2018-05-18 22:27:40Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "237" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:27:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "109431f8-0fa9-4bf2-9c6a-412a2fd39bf7" + ], + "x-ms-correlation-request-id": [ + "109431f8-0fa9-4bf2-9c6a-412a2fd39bf7" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222741Z:109431f8-0fa9-4bf2-9c6a-412a2fd39bf7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTc3MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0yMzkwP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "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\": \"west us 2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "183" + ], + "x-ms-client-request-id": [ + "08cba42e-1123-4d84-b92d-6024dd00af0d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertLogicalServer\",\r\n \"startTime\": \"2018-05-18T22:27:44.25Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "73" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:27:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/locations/westus2/serverOperationResults/b861d9a0-388e-4681-b49c-7786e3e0d422?api-version=2015-05-01-preview" + ], + "Retry-After": [ + "1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/b861d9a0-388e-4681-b49c-7786e3e0d422?api-version=2015-05-01-preview" + ], + "x-ms-request-id": [ + "b861d9a0-388e-4681-b49c-7786e3e0d422" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "a2ff99ff-9cf2-440b-bfbb-f293482644e4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222744Z:a2ff99ff-9cf2-440b-bfbb-f293482644e4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/b861d9a0-388e-4681-b49c-7786e3e0d422?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTc3MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi9iODYxZDlhMC0zODhlLTQ2ODEtYjQ5Yy03Nzg2ZTNlMGQ0MjI/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"b861d9a0-388e-4681-b49c-7786e3e0d422\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:27:44.25Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:27:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e435f652-4173-4aff-9843-9eb151b30ef4" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "fc83678f-a7e4-462a-971f-72553b825bb1" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222754Z:fc83678f-a7e4-462a-971f-72553b825bb1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/b861d9a0-388e-4681-b49c-7786e3e0d422?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTc3MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi9iODYxZDlhMC0zODhlLTQ2ODEtYjQ5Yy03Nzg2ZTNlMGQ0MjI/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"b861d9a0-388e-4681-b49c-7786e3e0d422\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:27:44.25Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:28:14 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "66555da5-18c9-4cf0-a013-8660ca974e6b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "a5febb96-193e-42ce-a074-73e08e821c3b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222814Z:a5febb96-193e-42ce-a074-73e08e821c3b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/b861d9a0-388e-4681-b49c-7786e3e0d422?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTc3MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi9iODYxZDlhMC0zODhlLTQ2ODEtYjQ5Yy03Nzg2ZTNlMGQ0MjI/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"b861d9a0-388e-4681-b49c-7786e3e0d422\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-18T22:27:44.25Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:28:33 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "d40c519b-8a8e-4383-bb67-bc0e6035015c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "b21bf4fd-d5f8-4ac8-9b4f-c8c997270e91" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222834Z:b21bf4fd-d5f8-4ac8-9b4f-c8c997270e91" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTc3MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0yMzkwP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.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-2390.database.windows.net\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390\",\r\n \"name\": \"sqlcrudtest-2390\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:28:33 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "8848303e-ba16-448e-85de-4c2126bc8791" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "5cfe21f1-d008-4a45-a36c-88c89a430fbc" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222834Z:5cfe21f1-d008-4a45-a36c-88c89a430fbc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390/databases/sqlcrudtest-1124?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTc3MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0yMzkwL2RhdGFiYXNlcy9zcWxjcnVkdGVzdC0xMTI0P2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"westus2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "29" + ], + "x-ms-client-request-id": [ + "45e90c76-d3f7-42dc-b28e-ab466e4994c8" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"CreateLogicalDatabase\",\r\n \"startTime\": \"2018-05-18T22:28:34.753Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "76" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:28:34 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/locations/westus2/databaseOperationResults/3b091710-3064-4162-909e-4fdd9ea7da74?api-version=2017-10-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/3b091710-3064-4162-909e-4fdd9ea7da74?api-version=2017-10-01-preview" + ], + "x-ms-request-id": [ + "3f6f7736-7d94-4368-a223-583264861d5b" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "1fc9f6bd-d9f8-41e3-8737-91ecb679429d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222834Z:1fc9f6bd-d9f8-41e3-8737-91ecb679429d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/3b091710-3064-4162-909e-4fdd9ea7da74?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTc3MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uLzNiMDkxNzEwLTMwNjQtNDE2Mi05MDllLTRmZGQ5ZWE3ZGE3ND9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"3b091710-3064-4162-909e-4fdd9ea7da74\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:28:34.753Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:28:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9d251d99-e470-4e8f-89d7-c7894268676d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "754ab701-aa1e-4079-afe1-46b1576dae67" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222850Z:754ab701-aa1e-4079-afe1-46b1576dae67" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/3b091710-3064-4162-909e-4fdd9ea7da74?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTc3MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uLzNiMDkxNzEwLTMwNjQtNDE2Mi05MDllLTRmZGQ5ZWE3ZGE3ND9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"3b091710-3064-4162-909e-4fdd9ea7da74\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:28:34.753Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:29:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "76565de7-22e6-44a3-a361-9770e7aa0a83" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "ed23544b-82a4-440c-a7ad-aa8010205655" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222905Z:ed23544b-82a4-440c-a7ad-aa8010205655" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/3b091710-3064-4162-909e-4fdd9ea7da74?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTc3MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uLzNiMDkxNzEwLTMwNjQtNDE2Mi05MDllLTRmZGQ5ZWE3ZGE3ND9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"3b091710-3064-4162-909e-4fdd9ea7da74\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-18T22:28:34.753Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:29:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "3a6c8f0c-26f3-49ea-b328-4c8ca5978138" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "b4a072bb-2905-4106-8b7e-4a400ba1d508" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222920Z:b4a072bb-2905-4106-8b7e-4a400ba1d508" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390/databases/sqlcrudtest-1124?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTc3MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0yMzkwL2RhdGFiYXNlcy9zcWxjcnVkdGVzdC0xMTI0P2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 10\r\n },\r\n \"kind\": \"v12.0,user\",\r\n \"properties\": {\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": 268435456000,\r\n \"status\": \"Online\",\r\n \"databaseId\": \"c2911a00-fffc-4c03-8bec-2e31c5efa0f2\",\r\n \"creationDate\": \"2018-05-18T22:28:34.99Z\",\r\n \"currentServiceObjectiveName\": \"S0\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"defaultSecondaryLocation\": \"West Central US\",\r\n \"catalogCollation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"zoneRedundant\": false,\r\n \"earliestRestoreDate\": \"2018-05-18T22:59:13.73Z\",\r\n \"readScale\": \"Disabled\",\r\n \"currentSku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 10\r\n }\r\n },\r\n \"location\": \"westus2\",\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390/databases/sqlcrudtest-1124\",\r\n \"name\": \"sqlcrudtest-1124\",\r\n \"type\": \"Microsoft.Sql/servers/databases\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:29:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f1cffec2-5a8e-4330-b7d1-f33a024de380" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "1a1c1c89-d809-436e-b9e6-af79faa9d47a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222920Z:1a1c1c89-d809-436e-b9e6-af79faa9d47a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390/jobAgents/agent?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTc3MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0yMzkwL2pvYkFnZW50cy9hZ2VudD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390/databases/sqlcrudtest-1124\"\r\n },\r\n \"location\": \"westus2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "235" + ], + "x-ms-client-request-id": [ + "b605e732-818d-41c0-8598-0475c898bb2e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertJobAccount\",\r\n \"startTime\": \"2018-05-18T22:29:20.483Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "71" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:29:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/locations/westus2/jobAgentOperationResults/af76e76a-03c6-4774-94c8-5dfc68f3c3a1?api-version=2017-03-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/af76e76a-03c6-4774-94c8-5dfc68f3c3a1?api-version=2017-03-01-preview" + ], + "x-ms-request-id": [ + "1019aaa3-df78-41e5-aee0-31e79bf7526b" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "e49718a2-989c-4909-804e-ef0ca9d3efd6" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222920Z:e49718a2-989c-4909-804e-ef0ca9d3efd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/af76e76a-03c6-4774-94c8-5dfc68f3c3a1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTc3MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2FmNzZlNzZhLTAzYzYtNDc3NC05NGM4LTVkZmM2OGYzYzNhMT9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"af76e76a-03c6-4774-94c8-5dfc68f3c3a1\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:29:20.483Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:29:34 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "1affbb9c-8b4a-4386-aa62-fe48435464cb" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "e1c6a2c4-3dcf-4e26-ad32-afda00387529" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222935Z:e1c6a2c4-3dcf-4e26-ad32-afda00387529" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/af76e76a-03c6-4774-94c8-5dfc68f3c3a1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTc3MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2FmNzZlNzZhLTAzYzYtNDc3NC05NGM4LTVkZmM2OGYzYzNhMT9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"af76e76a-03c6-4774-94c8-5dfc68f3c3a1\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:29:20.483Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:29:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "c343098a-feb4-48ad-9d65-4d8ba9478cfc" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "174e12ee-a6e3-4039-b939-f71fc1188953" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222950Z:174e12ee-a6e3-4039-b939-f71fc1188953" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/af76e76a-03c6-4774-94c8-5dfc68f3c3a1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTc3MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2FmNzZlNzZhLTAzYzYtNDc3NC05NGM4LTVkZmM2OGYzYzNhMT9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"af76e76a-03c6-4774-94c8-5dfc68f3c3a1\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:29:20.483Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:30:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "25c31095-24b5-4fc1-afcf-6009dd5bcdbd" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "bfd363f6-5ea4-4890-a606-cf7bb6acc88d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T223005Z:bfd363f6-5ea4-4890-a606-cf7bb6acc88d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/af76e76a-03c6-4774-94c8-5dfc68f3c3a1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTc3MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2FmNzZlNzZhLTAzYzYtNDc3NC05NGM4LTVkZmM2OGYzYzNhMT9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"af76e76a-03c6-4774-94c8-5dfc68f3c3a1\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:29:20.483Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:30:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ee485bc1-3a7e-41b7-9ff7-c75db719065f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "9f8f0665-93ac-4250-95ef-6e366a3c1ed7" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T223020Z:9f8f0665-93ac-4250-95ef-6e366a3c1ed7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/af76e76a-03c6-4774-94c8-5dfc68f3c3a1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTc3MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2FmNzZlNzZhLTAzYzYtNDc3NC05NGM4LTVkZmM2OGYzYzNhMT9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"af76e76a-03c6-4774-94c8-5dfc68f3c3a1\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:29:20.483Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:30:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "369240f3-0ccc-4b5f-bc5a-763cc095b8cb" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "7caa05af-d07d-4686-9b25-8efc11f0859e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T223035Z:7caa05af-d07d-4686-9b25-8efc11f0859e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/af76e76a-03c6-4774-94c8-5dfc68f3c3a1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTc3MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2FmNzZlNzZhLTAzYzYtNDc3NC05NGM4LTVkZmM2OGYzYzNhMT9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"af76e76a-03c6-4774-94c8-5dfc68f3c3a1\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-18T22:29:20.483Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:30:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "eae5072a-834f-4776-9440-964a327d8314" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "e8582859-cd2c-414b-a4c9-32389f9d9b1b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T223050Z:e8582859-cd2c-414b-a4c9-32389f9d9b1b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390/jobAgents/agent?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTc3MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0yMzkwL2pvYkFnZW50cy9hZ2VudD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Agent\",\r\n \"capacity\": 100\r\n },\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390/databases/sqlcrudtest-1124\",\r\n \"state\": \"Ready\"\r\n },\r\n \"location\": \"westus2\",\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390/jobAgents/agent\",\r\n \"name\": \"agent\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:30:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "c31fb77d-324a-4877-9977-8e943b350bc0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "b38dd67c-31af-43af-8dcf-56a5765902b7" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T223050Z:b38dd67c-31af-43af-8dcf-56a5765902b7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390/jobAgents/agent/credentials/dummylogin?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTc3MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0yMzkwL2pvYkFnZW50cy9hZ2VudC9jcmVkZW50aWFscy9kdW1teWxvZ2luP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"username\": \"dummylogin\",\r\n \"password\": \"Un53cuRE!\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "88" + ], + "x-ms-client-request-id": [ + "7eea09f7-4ff7-4deb-8aa5-094ebd12830d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"username\": \"dummylogin\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390/jobAgents/agent/credentials/dummylogin\",\r\n \"name\": \"dummylogin\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/credentials\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "292" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:30:52 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "17a80222-82c3-4cb4-b70e-2562c86210e1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "1df31b27-2bde-4647-8536-af18b2185105" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T223052Z:1df31b27-2bde-4647-8536-af18b2185105" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390/jobAgents/agent/targetGroups/tg1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTc3MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0yMzkwL2pvYkFnZW50cy9hZ2VudC90YXJnZXRHcm91cHMvdGcxP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"members\": [\r\n {\r\n \"membershipType\": \"Include\",\r\n \"type\": \"SqlServer\",\r\n \"serverName\": \"s1\",\r\n \"refreshCredential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390/jobAgents/agent/credentials/dummylogin\"\r\n }\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "372" + ], + "x-ms-client-request-id": [ + "d0015844-6027-400f-aca3-84b82bec933f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"members\": [\r\n {\r\n \"membershipType\": \"Include\",\r\n \"type\": \"SqlServer\",\r\n \"serverName\": \"s1\",\r\n \"refreshCredential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390/jobAgents/agent/credentials/dummylogin\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390/jobAgents/agent/targetGroups/tg1\",\r\n \"name\": \"tg1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/targetGroups\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "528" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:30:52 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "f727da0f-3f9a-4e4d-98e1-3faf64dc93f1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "47fa54da-aac6-4c53-9cf5-54edcfb44b76" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T223053Z:47fa54da-aac6-4c53-9cf5-54edcfb44b76" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390/jobAgents/agent/targetGroups/tg1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTc3MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0yMzkwL2pvYkFnZW50cy9hZ2VudC90YXJnZXRHcm91cHMvdGcxP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"members\": [\r\n {\r\n \"membershipType\": \"Include\",\r\n \"type\": \"SqlServer\",\r\n \"serverName\": \"s1\",\r\n \"refreshCredential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390/jobAgents/agent/credentials/dummylogin\"\r\n },\r\n {\r\n \"membershipType\": \"Include\",\r\n \"type\": \"SqlDatabase\",\r\n \"serverName\": \"s1\",\r\n \"databaseName\": \"db1\"\r\n },\r\n {\r\n \"membershipType\": \"Exclude\",\r\n \"type\": \"SqlShardMap\",\r\n \"serverName\": \"s1\",\r\n \"databaseName\": \"db1\",\r\n \"shardMapName\": \"sm1\",\r\n \"refreshCredential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390/jobAgents/agent/credentials/dummylogin\"\r\n },\r\n {\r\n \"membershipType\": \"Exclude\",\r\n \"type\": \"SqlElasticPool\",\r\n \"serverName\": \"s1\",\r\n \"elasticPoolName\": \"ep1\",\r\n \"refreshCredential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390/jobAgents/agent/credentials/dummylogin\"\r\n }\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "1267" + ], + "x-ms-client-request-id": [ + "caeab0df-8e53-4a71-b35d-492ab9d7026c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"members\": [\r\n {\r\n \"membershipType\": \"Include\",\r\n \"type\": \"SqlServer\",\r\n \"serverName\": \"s1\",\r\n \"refreshCredential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390/jobAgents/agent/credentials/dummylogin\"\r\n },\r\n {\r\n \"membershipType\": \"Exclude\",\r\n \"type\": \"SqlShardMap\",\r\n \"serverName\": \"s1\",\r\n \"databaseName\": \"db1\",\r\n \"shardMapName\": \"sm1\",\r\n \"refreshCredential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390/jobAgents/agent/credentials/dummylogin\"\r\n },\r\n {\r\n \"membershipType\": \"Exclude\",\r\n \"type\": \"SqlElasticPool\",\r\n \"serverName\": \"s1\",\r\n \"elasticPoolName\": \"ep1\",\r\n \"refreshCredential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390/jobAgents/agent/credentials/dummylogin\"\r\n },\r\n {\r\n \"membershipType\": \"Include\",\r\n \"type\": \"SqlDatabase\",\r\n \"serverName\": \"s1\",\r\n \"databaseName\": \"db1\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390/jobAgents/agent/targetGroups/tg1\",\r\n \"name\": \"tg1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/targetGroups\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:30:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "522817c2-913c-43a0-8774-acfb1e9a1c1b" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "7f66ad3f-cd98-4a15-b94b-ee5a665b8196" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T223053Z:7f66ad3f-cd98-4a15-b94b-ee5a665b8196" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390/jobAgents/agent/targetGroups?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTc3MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0yMzkwL2pvYkFnZW50cy9hZ2VudC90YXJnZXRHcm91cHM/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "31ca6812-d9ac-44a1-9a64-24eed3f38382" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"members\": [\r\n {\r\n \"membershipType\": \"Include\",\r\n \"type\": \"SqlServer\",\r\n \"serverName\": \"s1\",\r\n \"refreshCredential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390/jobAgents/agent/credentials/dummylogin\"\r\n },\r\n {\r\n \"membershipType\": \"Exclude\",\r\n \"type\": \"SqlShardMap\",\r\n \"serverName\": \"s1\",\r\n \"databaseName\": \"db1\",\r\n \"shardMapName\": \"sm1\",\r\n \"refreshCredential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390/jobAgents/agent/credentials/dummylogin\"\r\n },\r\n {\r\n \"membershipType\": \"Exclude\",\r\n \"type\": \"SqlElasticPool\",\r\n \"serverName\": \"s1\",\r\n \"elasticPoolName\": \"ep1\",\r\n \"refreshCredential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390/jobAgents/agent/credentials/dummylogin\"\r\n },\r\n {\r\n \"membershipType\": \"Include\",\r\n \"type\": \"SqlDatabase\",\r\n \"serverName\": \"s1\",\r\n \"databaseName\": \"db1\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390/jobAgents/agent/targetGroups/tg1\",\r\n \"name\": \"tg1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/targetGroups\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:30:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "a7343daf-3fe2-443c-8b9a-fe00933f55d5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "0a9cfe9d-49f8-4d48-8798-796f4241aa0f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T223053Z:0a9cfe9d-49f8-4d48-8798-796f4241aa0f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-7726/providers/Microsoft.Sql/servers/sqlcrudtest-2390/jobAgents/agent/targetGroups/tg1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTc3MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0yMzkwL2pvYkFnZW50cy9hZ2VudC90YXJnZXRHcm91cHMvdGcxP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5f39d31c-4263-4249-95f3-73e1370a3440" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:30:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "d34ae65e-1d48-47dc-b605-dec2a22f43c3" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "5fdcb136-7ee5-4e5f-9945-5dfa26882501" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T223053Z:5fdcb136-7ee5-4e5f-9945-5dfa26882501" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-7726?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTc3MjY/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0257f392-882a-4488-b1da-fa42e3a7e3da" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:30:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDc3MjYtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14997" + ], + "x-ms-request-id": [ + "f1de9b95-ad8a-4a87-906d-2cfcca344d9d" + ], + "x-ms-correlation-request-id": [ + "f1de9b95-ad8a-4a87-906d-2cfcca344d9d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T223054Z:f1de9b95-ad8a-4a87-906d-2cfcca344d9d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-7726?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTc3MjY/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0b25737d-e827-4f1c-9723-ebfe6e8c043f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:30:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDc3MjYtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14996" + ], + "x-ms-request-id": [ + "d8d62667-98d6-45a7-9463-348962d3ccfa" + ], + "x-ms-correlation-request-id": [ + "d8d62667-98d6-45a7-9463-348962d3ccfa" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T223054Z:d8d62667-98d6-45a7-9463-348962d3ccfa" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + } + ], + "Names": { + "CreateResourceGroup": [ + "sqlcrudtest-7726" + ], + "CreateServer": [ + "sqlcrudtest-2390" + ], + "TestCreateUpdateDropTargetGroup": [ + "sqlcrudtest-1124" + ] + }, + "Variables": { + "DefaultLocation": "west us 2", + "SubscriptionId": "1b132fbc-df61-4dd8-bba0-71d7d4277eda" + } +} \ No newline at end of file diff --git a/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.SqlDatabaseAgentScenarioTests/TestStartStopGetJobExecution.json b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.SqlDatabaseAgentScenarioTests/TestStartStopGetJobExecution.json new file mode 100644 index 000000000000..d01d9f61b4db --- /dev/null +++ b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.SqlDatabaseAgentScenarioTests/TestStartStopGetJobExecution.json @@ -0,0 +1,2311 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-8293?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTgyOTM/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"west us 2\",\r\n \"tags\": {\r\n \"sqlcrudtest-8293\": \"2018-05-18 22:19:46Z\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "98" + ], + "x-ms-client-request-id": [ + "47e2afa8-82f2-49d1-a102-7c7340f07b70" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293\",\r\n \"name\": \"sqlcrudtest-8293\",\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"sqlcrudtest-8293\": \"2018-05-18 22:19:46Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "237" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:19:46 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "24ac1144-e5c6-4311-98c6-4ef3ea53bca2" + ], + "x-ms-correlation-request-id": [ + "24ac1144-e5c6-4311-98c6-4ef3ea53bca2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221946Z:24ac1144-e5c6-4311-98c6-4ef3ea53bca2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04ODAzP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "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\": \"west us 2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "183" + ], + "x-ms-client-request-id": [ + "f44574e6-8924-46e0-aa2e-f7bee0cbab44" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertLogicalServer\",\r\n \"startTime\": \"2018-05-18T22:19:48.753Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "74" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:19:48 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/locations/westus2/serverOperationResults/bf5a21a4-d6e5-40ee-98e4-81aefb003734?api-version=2015-05-01-preview" + ], + "Retry-After": [ + "1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/bf5a21a4-d6e5-40ee-98e4-81aefb003734?api-version=2015-05-01-preview" + ], + "x-ms-request-id": [ + "bf5a21a4-d6e5-40ee-98e4-81aefb003734" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "4f136595-be8e-441f-bcc9-2b04fd8a529a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221948Z:4f136595-be8e-441f-bcc9-2b04fd8a529a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/bf5a21a4-d6e5-40ee-98e4-81aefb003734?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi9iZjVhMjFhNC1kNmU1LTQwZWUtOThlNC04MWFlZmIwMDM3MzQ/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"bf5a21a4-d6e5-40ee-98e4-81aefb003734\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:19:48.753Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:19:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "784e99c1-5d78-459b-9052-c5d01f9d698a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "5cecbe38-0a7d-4387-a328-ff82e2586818" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T221959Z:5cecbe38-0a7d-4387-a328-ff82e2586818" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/bf5a21a4-d6e5-40ee-98e4-81aefb003734?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi9iZjVhMjFhNC1kNmU1LTQwZWUtOThlNC04MWFlZmIwMDM3MzQ/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"bf5a21a4-d6e5-40ee-98e4-81aefb003734\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:19:48.753Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:20:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "37c20d5c-bdb9-4b5e-9574-5a1ec6f46a72" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "7e8d627f-abb2-4b64-9e0a-adbad6d017e2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222019Z:7e8d627f-abb2-4b64-9e0a-adbad6d017e2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/locations/westus2/serverAzureAsyncOperation/bf5a21a4-d6e5-40ee-98e4-81aefb003734?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi9iZjVhMjFhNC1kNmU1LTQwZWUtOThlNC04MWFlZmIwMDM3MzQ/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"bf5a21a4-d6e5-40ee-98e4-81aefb003734\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-18T22:19:48.753Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:20:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "d7366b87-da33-4410-b95a-858f10f29e4c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "f95aa685-cdbf-47a0-a796-084f2fe01712" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222039Z:f95aa685-cdbf-47a0-a796-084f2fe01712" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04ODAzP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.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-8803.database.windows.net\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803\",\r\n \"name\": \"sqlcrudtest-8803\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:20:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "c46aa7dd-e3e6-4a6e-9276-525b2547214b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "58fd6d7e-bbcb-4197-abc9-9089ea4256b6" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222039Z:58fd6d7e-bbcb-4197-abc9-9089ea4256b6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/firewallRules/allowAll?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04ODAzL2ZpcmV3YWxsUnVsZXMvYWxsb3dBbGw/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"startIpAddress\": \"0.0.0.0\",\r\n \"endIpAddress\": \"255.255.255.255\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "101" + ], + "x-ms-client-request-id": [ + "ea32a00a-f15a-452b-8e8e-7852e199372e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/firewallRules/allowAll\",\r\n \"name\": \"allowAll\",\r\n \"type\": \"Microsoft.Sql/servers/firewallRules\",\r\n \"location\": \"West US 2\",\r\n \"kind\": \"v12.0\",\r\n \"properties\": {\r\n \"startIpAddress\": \"0.0.0.0\",\r\n \"endIpAddress\": \"255.255.255.255\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "340" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:20:39 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "6ac03957-5666-4401-bb34-570f08733728" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "2b659042-680e-4e08-b87c-34e20e6b22fa" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222040Z:2b659042-680e-4e08-b87c-34e20e6b22fa" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/databases/sqlcrudtest-6372?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04ODAzL2RhdGFiYXNlcy9zcWxjcnVkdGVzdC02MzcyP2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"westus2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "29" + ], + "x-ms-client-request-id": [ + "963ab102-6f01-431a-93c8-1f395b185a3d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"CreateLogicalDatabase\",\r\n \"startTime\": \"2018-05-18T22:20:40.553Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "76" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:20:39 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/locations/westus2/databaseOperationResults/6d2d7959-f860-47f4-a56d-473b0b676a2e?api-version=2017-10-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/6d2d7959-f860-47f4-a56d-473b0b676a2e?api-version=2017-10-01-preview" + ], + "x-ms-request-id": [ + "9bddcffd-e482-4df4-a3bb-38af9b060a75" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "4ebc4276-6035-4e58-a8ef-0a178d95b933" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222040Z:4ebc4276-6035-4e58-a8ef-0a178d95b933" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/6d2d7959-f860-47f4-a56d-473b0b676a2e?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uLzZkMmQ3OTU5LWY4NjAtNDdmNC1hNTZkLTQ3M2IwYjY3NmEyZT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"6d2d7959-f860-47f4-a56d-473b0b676a2e\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:20:40.553Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:20:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "daf612d1-410e-4626-a49c-e57f881dde18" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "aab0548a-a921-40fa-a126-fea908736cc9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222055Z:aab0548a-a921-40fa-a126-fea908736cc9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/6d2d7959-f860-47f4-a56d-473b0b676a2e?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uLzZkMmQ3OTU5LWY4NjAtNDdmNC1hNTZkLTQ3M2IwYjY3NmEyZT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"6d2d7959-f860-47f4-a56d-473b0b676a2e\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:20:40.553Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:21:10 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e0668c98-88f3-41ab-ae8a-9ce2d0192a4a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "5fca5ddd-5f36-4a26-9d59-848f0a6a098b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222110Z:5fca5ddd-5f36-4a26-9d59-848f0a6a098b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/locations/westus2/databaseAzureAsyncOperation/6d2d7959-f860-47f4-a56d-473b0b676a2e?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uLzZkMmQ3OTU5LWY4NjAtNDdmNC1hNTZkLTQ3M2IwYjY3NmEyZT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"6d2d7959-f860-47f4-a56d-473b0b676a2e\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-18T22:20:40.553Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:21:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "69b80b1c-d845-4fd5-aa1b-4a5d566e3ff7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "08b513c7-e70c-45d2-acc0-f686c369fb71" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222125Z:08b513c7-e70c-45d2-acc0-f686c369fb71" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/databases/sqlcrudtest-6372?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04ODAzL2RhdGFiYXNlcy9zcWxjcnVkdGVzdC02MzcyP2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 10\r\n },\r\n \"kind\": \"v12.0,user\",\r\n \"properties\": {\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": 268435456000,\r\n \"status\": \"Online\",\r\n \"databaseId\": \"a15c74f1-634d-4697-9ca3-241171f60d76\",\r\n \"creationDate\": \"2018-05-18T22:20:40.803Z\",\r\n \"currentServiceObjectiveName\": \"S0\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"defaultSecondaryLocation\": \"West Central US\",\r\n \"catalogCollation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"zoneRedundant\": false,\r\n \"earliestRestoreDate\": \"2018-05-18T22:51:23.547Z\",\r\n \"readScale\": \"Disabled\",\r\n \"currentSku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 10\r\n }\r\n },\r\n \"location\": \"westus2\",\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/databases/sqlcrudtest-6372\",\r\n \"name\": \"sqlcrudtest-6372\",\r\n \"type\": \"Microsoft.Sql/servers/databases\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:21:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b21d90ca-7406-4085-b34a-bee3b3c46f20" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "6ce97c27-b956-4d0f-b744-c514ceb76aa9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222125Z:6ce97c27-b956-4d0f-b744-c514ceb76aa9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04ODAzL2pvYkFnZW50cy9hZ2VudD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/databases/sqlcrudtest-6372\"\r\n },\r\n \"location\": \"westus2\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "235" + ], + "x-ms-client-request-id": [ + "bc73822a-4c92-451f-89ee-1bdd91511688" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertJobAccount\",\r\n \"startTime\": \"2018-05-18T22:21:26.25Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "70" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:21:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/locations/westus2/jobAgentOperationResults/bfd339ad-69e4-4338-8498-0018bf36508b?api-version=2017-03-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/bfd339ad-69e4-4338-8498-0018bf36508b?api-version=2017-03-01-preview" + ], + "x-ms-request-id": [ + "e4b32533-2520-412a-92be-4f06736ed04a" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "282fe5f7-52f3-46ad-ac5f-a79b0156060b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222126Z:282fe5f7-52f3-46ad-ac5f-a79b0156060b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/bfd339ad-69e4-4338-8498-0018bf36508b?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2JmZDMzOWFkLTY5ZTQtNDMzOC04NDk4LTAwMThiZjM2NTA4Yj9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"bfd339ad-69e4-4338-8498-0018bf36508b\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:21:26.25Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:21:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f007102c-4242-46c3-be09-e112b073d1ea" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "9b2c270f-61fd-4bae-b4a3-805243ef1dbf" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222141Z:9b2c270f-61fd-4bae-b4a3-805243ef1dbf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/bfd339ad-69e4-4338-8498-0018bf36508b?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2JmZDMzOWFkLTY5ZTQtNDMzOC04NDk4LTAwMThiZjM2NTA4Yj9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"bfd339ad-69e4-4338-8498-0018bf36508b\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:21:26.25Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:21:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "2bfcdec6-a3ef-44f3-b0af-f36fb75d4413" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "75afccab-6fea-4bc1-8883-16dedeee4ce0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222156Z:75afccab-6fea-4bc1-8883-16dedeee4ce0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/bfd339ad-69e4-4338-8498-0018bf36508b?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2JmZDMzOWFkLTY5ZTQtNDMzOC04NDk4LTAwMThiZjM2NTA4Yj9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"bfd339ad-69e4-4338-8498-0018bf36508b\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:21:26.25Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:22:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f8de40e9-8a2c-4a65-a686-f7822df230be" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "1e1fa240-7835-445e-9fc3-a4d9c90e2330" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222211Z:1e1fa240-7835-445e-9fc3-a4d9c90e2330" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/bfd339ad-69e4-4338-8498-0018bf36508b?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2JmZDMzOWFkLTY5ZTQtNDMzOC04NDk4LTAwMThiZjM2NTA4Yj9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"bfd339ad-69e4-4338-8498-0018bf36508b\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-18T22:21:26.25Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:22:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "2dfcfe9f-ea16-403b-8b7a-77cc2a6ac7da" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "b4c7dc17-a919-4f3d-8124-5a5edc715c68" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222226Z:b4c7dc17-a919-4f3d-8124-5a5edc715c68" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/locations/westus2/jobAgentAzureAsyncOperation/bfd339ad-69e4-4338-8498-0018bf36508b?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3R1czIvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2JmZDMzOWFkLTY5ZTQtNDMzOC04NDk4LTAwMThiZjM2NTA4Yj9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"bfd339ad-69e4-4338-8498-0018bf36508b\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-18T22:21:26.25Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:22:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7713f74f-7052-45b3-93c8-82158a628b4e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "61404afc-1844-4a65-9f33-27d36c034ff0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222241Z:61404afc-1844-4a65-9f33-27d36c034ff0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04ODAzL2pvYkFnZW50cy9hZ2VudD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Agent\",\r\n \"capacity\": 100\r\n },\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/databases/sqlcrudtest-6372\",\r\n \"state\": \"Ready\"\r\n },\r\n \"location\": \"westus2\",\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent\",\r\n \"name\": \"agent\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:22:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "dde07532-1a50-49fe-9332-e940a755a68e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "084f6b47-3a7a-4c37-ab4b-276cad45fb86" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222241Z:084f6b47-3a7a-4c37-ab4b-276cad45fb86" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/credentials/dummylogin?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04ODAzL2pvYkFnZW50cy9hZ2VudC9jcmVkZW50aWFscy9kdW1teWxvZ2luP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"username\": \"dummylogin\",\r\n \"password\": \"Un53cuRE!\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "88" + ], + "x-ms-client-request-id": [ + "d71ac929-c112-4350-ac5b-6f8c353a0004" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"username\": \"dummylogin\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/credentials/dummylogin\",\r\n \"name\": \"dummylogin\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/credentials\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "292" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:22:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "29f80257-4430-4e91-81d2-e9f4c33a4691" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "d4aadf3d-6940-4959-bb63-c186ca67ac86" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222242Z:d4aadf3d-6940-4959-bb63-c186ca67ac86" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/targetGroups/tg1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04ODAzL2pvYkFnZW50cy9hZ2VudC90YXJnZXRHcm91cHMvdGcxP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"members\": [\r\n {\r\n \"membershipType\": \"Include\",\r\n \"type\": \"SqlDatabase\",\r\n \"serverName\": \"sqlcrudtest-8803\",\r\n \"databaseName\": \"sqlcrudtest-6372\"\r\n }\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "228" + ], + "x-ms-client-request-id": [ + "f2827fa4-58a8-46c8-ac2f-c99016c8f6e0" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"members\": [\r\n {\r\n \"membershipType\": \"Include\",\r\n \"type\": \"SqlDatabase\",\r\n \"serverName\": \"sqlcrudtest-8803\",\r\n \"databaseName\": \"sqlcrudtest-6372\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/targetGroups/tg1\",\r\n \"name\": \"tg1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/targetGroups\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "384" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:22:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "29f3052d-a4a8-4b2b-b8b2-579122fa150d" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "5e1520f5-b162-42ff-8e76-8d02e0203094" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222243Z:5e1520f5-b162-42ff-8e76-8d02e0203094" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/jobs/job1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04ODAzL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"description\": \"Test description\",\r\n \"schedule\": {\r\n \"type\": \"Once\",\r\n \"enabled\": true\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "140" + ], + "x-ms-client-request-id": [ + "04346809-5837-4a72-9e07-749d121fb079" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"description\": \"Test description\",\r\n \"version\": 0,\r\n \"schedule\": {\r\n \"startTime\": \"0001-01-01T00:00:00Z\",\r\n \"endTime\": \"9999-12-31T11:59:59Z\",\r\n \"type\": \"Once\",\r\n \"enabled\": true\r\n }\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/jobs/job1\",\r\n \"name\": \"job1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "397" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:22:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "7d7ed0a3-655a-46c8-8daa-e0de9d06c54d" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-correlation-request-id": [ + "e12b902d-da18-46e6-8cc2-f08e44687455" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222243Z:e12b902d-da18-46e6-8cc2-f08e44687455" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/jobs/job1/steps/step1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04ODAzL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvc3RlcHMvc3RlcDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"targetGroup\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/targetGroups/tg1\",\r\n \"credential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/credentials/dummylogin\",\r\n \"action\": {\r\n \"value\": \"SELECT 1\"\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "462" + ], + "x-ms-client-request-id": [ + "a7004e37-3c89-4ebd-b307-cca8bd4cd001" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"stepId\": 1,\r\n \"targetGroup\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/targetGroups/tg1\",\r\n \"credential\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/credentials/dummylogin\",\r\n \"action\": {\r\n \"type\": \"TSql\",\r\n \"source\": \"Inline\",\r\n \"value\": \"SELECT 1\"\r\n },\r\n \"executionOptions\": {\r\n \"timeoutSeconds\": 43200,\r\n \"retryAttempts\": 10,\r\n \"initialRetryIntervalSeconds\": 1,\r\n \"maximumRetryIntervalSeconds\": 120,\r\n \"retryIntervalBackoffMultiplier\": 2.0\r\n }\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/jobs/job1/steps/step1\",\r\n \"name\": \"step1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/steps\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "869" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:22:44 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "c1462834-d922-4d63-91a4-b3035253877b" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1192" + ], + "x-ms-correlation-request-id": [ + "5c8df36e-ae44-453a-842d-4a7fa4501c64" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222244Z:5c8df36e-ae44-453a-842d-4a7fa4501c64" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/jobs/job1/start?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04ODAzL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvc3RhcnQ/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "bc5a0b89-907d-434e-a25d-3d66ced76e02" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"jobVersion\": 1,\r\n \"jobExecutionId\": \"69b8c85a-02fb-4c10-9741-8526d3c6cc1d\",\r\n \"lifecycle\": \"Created\",\r\n \"provisioningState\": \"Created\",\r\n \"createTime\": \"2018-05-18T22:22:45.2666667Z\",\r\n \"currentAttempts\": 0,\r\n \"lastMessage\": \"Job execution created.\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/jobs/job1/executions/69b8c85a-02fb-4c10-9741-8526d3c6cc1d\",\r\n \"name\": \"69b8c85a-02fb-4c10-9741-8526d3c6cc1d\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/executions\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:22:44 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/jobs/job1/executions/69b8c85a-02fb-4c10-9741-8526d3c6cc1d?api-version=2017-03-01-preview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "5337e672-46f0-48c5-8bb3-5ccdf0c25c05" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1191" + ], + "x-ms-correlation-request-id": [ + "57f7059c-1507-428f-b526-f74200f927d0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222245Z:57f7059c-1507-428f-b526-f74200f927d0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/jobs/job1/executions/69b8c85a-02fb-4c10-9741-8526d3c6cc1d?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04ODAzL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvZXhlY3V0aW9ucy82OWI4Yzg1YS0wMmZiLTRjMTAtOTc0MS04NTI2ZDNjNmNjMWQ/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"jobVersion\": 1,\r\n \"jobExecutionId\": \"69b8c85a-02fb-4c10-9741-8526d3c6cc1d\",\r\n \"lifecycle\": \"Succeeded\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"createTime\": \"2018-05-18T22:22:45.2666667Z\",\r\n \"startTime\": \"2018-05-18T22:22:49.3431923Z\",\r\n \"endTime\": \"2018-05-18T22:23:06.5464262Z\",\r\n \"currentAttempts\": 0,\r\n \"lastMessage\": \"Job execution succeeded.\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/jobs/job1/executions/69b8c85a-02fb-4c10-9741-8526d3c6cc1d\",\r\n \"name\": \"69b8c85a-02fb-4c10-9741-8526d3c6cc1d\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/executions\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:23:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ee1217d6-5892-486d-9727-f4c0c159ec02" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "a6eac165-6f53-4a3d-b43a-f0b5cd0da559" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222315Z:a6eac165-6f53-4a3d-b43a-f0b5cd0da559" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/jobs/job1/executions/69b8c85a-02fb-4c10-9741-8526d3c6cc1d?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04ODAzL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvZXhlY3V0aW9ucy82OWI4Yzg1YS0wMmZiLTRjMTAtOTc0MS04NTI2ZDNjNmNjMWQ/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "32a5f6e8-d685-4ffc-ac0c-83f657b25d2d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"jobVersion\": 1,\r\n \"jobExecutionId\": \"69b8c85a-02fb-4c10-9741-8526d3c6cc1d\",\r\n \"lifecycle\": \"Succeeded\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"createTime\": \"2018-05-18T22:22:45.2666667Z\",\r\n \"startTime\": \"2018-05-18T22:22:49.3431923Z\",\r\n \"endTime\": \"2018-05-18T22:23:06.5464262Z\",\r\n \"currentAttempts\": 0,\r\n \"lastMessage\": \"Job execution succeeded.\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/jobs/job1/executions/69b8c85a-02fb-4c10-9741-8526d3c6cc1d\",\r\n \"name\": \"69b8c85a-02fb-4c10-9741-8526d3c6cc1d\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/executions\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:23:16 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "1fd24332-305c-472c-801b-b355c2921d77" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "e170688c-0d4b-45c2-9976-99db9a7dd126" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222316Z:e170688c-0d4b-45c2-9976-99db9a7dd126" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/executions?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04ODAzL2pvYkFnZW50cy9hZ2VudC9leGVjdXRpb25zP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "35391ed2-ff8e-41c8-ba3c-d59ea515c858" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"jobVersion\": 1,\r\n \"jobExecutionId\": \"69b8c85a-02fb-4c10-9741-8526d3c6cc1d\",\r\n \"lifecycle\": \"Succeeded\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"createTime\": \"2018-05-18T22:22:45.2666667Z\",\r\n \"startTime\": \"2018-05-18T22:22:49.3431923Z\",\r\n \"endTime\": \"2018-05-18T22:23:06.5464262Z\",\r\n \"currentAttempts\": 0,\r\n \"lastMessage\": \"Job execution succeeded.\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/jobs/job1/executions/69b8c85a-02fb-4c10-9741-8526d3c6cc1d\",\r\n \"name\": \"69b8c85a-02fb-4c10-9741-8526d3c6cc1d\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/executions\"\r\n },\r\n {\r\n \"properties\": {\r\n \"jobVersion\": 1,\r\n \"jobExecutionId\": \"d2325e9e-4210-4974-aae0-3362b6a81376\",\r\n \"lifecycle\": \"Skipped\",\r\n \"provisioningState\": \"Canceled\",\r\n \"createTime\": \"2018-05-18T22:22:51.1088269Z\",\r\n \"startTime\": \"2018-05-18T22:22:54.0619692Z\",\r\n \"endTime\": \"2018-05-18T22:23:05.9214286Z\",\r\n \"currentAttempts\": 0,\r\n \"lastMessage\": \"Job execution skipped.\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/jobs/job1/executions/d2325e9e-4210-4974-aae0-3362b6a81376\",\r\n \"name\": \"d2325e9e-4210-4974-aae0-3362b6a81376\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/executions\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:23:16 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "04ba2546-1c56-4a86-8062-084e7806f0f0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "084160e5-5485-4a13-9c57-9fb99308019b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222316Z:084160e5-5485-4a13-9c57-9fb99308019b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/jobs/job1/executions?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04ODAzL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvZXhlY3V0aW9ucz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3129970c-eedc-4d77-8c3f-0c91314a1ff5" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"jobVersion\": 1,\r\n \"jobExecutionId\": \"69b8c85a-02fb-4c10-9741-8526d3c6cc1d\",\r\n \"lifecycle\": \"Succeeded\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"createTime\": \"2018-05-18T22:22:45.2666667Z\",\r\n \"startTime\": \"2018-05-18T22:22:49.3431923Z\",\r\n \"endTime\": \"2018-05-18T22:23:06.5464262Z\",\r\n \"currentAttempts\": 0,\r\n \"lastMessage\": \"Job execution succeeded.\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/jobs/job1/executions/69b8c85a-02fb-4c10-9741-8526d3c6cc1d\",\r\n \"name\": \"69b8c85a-02fb-4c10-9741-8526d3c6cc1d\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/executions\"\r\n },\r\n {\r\n \"properties\": {\r\n \"jobVersion\": 1,\r\n \"jobExecutionId\": \"d2325e9e-4210-4974-aae0-3362b6a81376\",\r\n \"lifecycle\": \"Skipped\",\r\n \"provisioningState\": \"Canceled\",\r\n \"createTime\": \"2018-05-18T22:22:51.1088269Z\",\r\n \"startTime\": \"2018-05-18T22:22:54.0619692Z\",\r\n \"endTime\": \"2018-05-18T22:23:05.9214286Z\",\r\n \"currentAttempts\": 0,\r\n \"lastMessage\": \"Job execution skipped.\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/jobs/job1/executions/d2325e9e-4210-4974-aae0-3362b6a81376\",\r\n \"name\": \"d2325e9e-4210-4974-aae0-3362b6a81376\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/executions\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:23:16 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "46857b71-28a9-418e-911f-3c70c8fca01e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "c5ce472f-ea9e-4713-b556-9c47f926c298" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222316Z:c5ce472f-ea9e-4713-b556-9c47f926c298" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/jobs/job1/executions/69b8c85a-02fb-4c10-9741-8526d3c6cc1d/steps?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04ODAzL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvZXhlY3V0aW9ucy82OWI4Yzg1YS0wMmZiLTRjMTAtOTc0MS04NTI2ZDNjNmNjMWQvc3RlcHM/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d8f88560-9efa-44ad-9f0e-2a010de7efe0" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"jobVersion\": 1,\r\n \"stepName\": \"step1\",\r\n \"stepId\": 1,\r\n \"jobExecutionId\": \"69b8c85a-02fb-4c10-9741-8526d3c6cc1d\",\r\n \"lifecycle\": \"Succeeded\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"createTime\": \"2018-05-18T22:22:49.3275915Z\",\r\n \"startTime\": \"2018-05-18T22:22:50.5932003Z\",\r\n \"endTime\": \"2018-05-18T22:23:05.9214286Z\",\r\n \"currentAttempts\": 1,\r\n \"currentAttemptStartTime\": \"2018-05-18T22:22:59.3588849Z\",\r\n \"lastMessage\": \"Step 1 succeeded.\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/jobs/job1/executions/69b8c85a-02fb-4c10-9741-8526d3c6cc1d/steps/step1\",\r\n \"name\": \"step1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/executions/steps\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:23:16 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7ee1d649-491e-4eb3-b8f1-4c2994b2243b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-correlation-request-id": [ + "e1925ece-2005-49aa-843e-640d41273aa9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222317Z:e1925ece-2005-49aa-843e-640d41273aa9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/jobs/job1/executions/69b8c85a-02fb-4c10-9741-8526d3c6cc1d/steps/step1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04ODAzL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvZXhlY3V0aW9ucy82OWI4Yzg1YS0wMmZiLTRjMTAtOTc0MS04NTI2ZDNjNmNjMWQvc3RlcHMvc3RlcDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1c6e3ade-791e-48d3-aeb6-06c0e9560cf8" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"jobVersion\": 1,\r\n \"stepName\": \"step1\",\r\n \"stepId\": 1,\r\n \"jobExecutionId\": \"69b8c85a-02fb-4c10-9741-8526d3c6cc1d\",\r\n \"lifecycle\": \"Succeeded\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"createTime\": \"2018-05-18T22:22:49.3275915Z\",\r\n \"startTime\": \"2018-05-18T22:22:50.5932003Z\",\r\n \"endTime\": \"2018-05-18T22:23:05.9214286Z\",\r\n \"currentAttempts\": 1,\r\n \"currentAttemptStartTime\": \"2018-05-18T22:22:59.3588849Z\",\r\n \"lastMessage\": \"Step 1 succeeded.\"\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/jobs/job1/executions/69b8c85a-02fb-4c10-9741-8526d3c6cc1d/steps/step1\",\r\n \"name\": \"step1\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/executions/steps\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:23:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "10cab792-4fac-40fc-83f0-d124f60c63cf" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-correlation-request-id": [ + "68ce3945-737f-45ed-aa72-b61e392ec8b3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222317Z:68ce3945-737f-45ed-aa72-b61e392ec8b3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/jobs/job1/executions/69b8c85a-02fb-4c10-9741-8526d3c6cc1d/targets?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04ODAzL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvZXhlY3V0aW9ucy82OWI4Yzg1YS0wMmZiLTRjMTAtOTc0MS04NTI2ZDNjNmNjMWQvdGFyZ2V0cz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e302e983-0aeb-4261-bb88-d4cdb1c38024" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"jobVersion\": 1,\r\n \"stepName\": \"step1\",\r\n \"stepId\": 1,\r\n \"jobExecutionId\": \"69b8c85a-02fb-4c10-9741-8526d3c6cc1d\",\r\n \"lifecycle\": \"Succeeded\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"createTime\": \"2018-05-18T22:22:59.3433333Z\",\r\n \"startTime\": \"2018-05-18T22:23:01.1089076Z\",\r\n \"endTime\": \"2018-05-18T22:23:05.3432933Z\",\r\n \"currentAttempts\": 1,\r\n \"currentAttemptStartTime\": \"2018-05-18T22:23:01.2651579Z\",\r\n \"lastMessage\": \"Step 1 succeeded execution on target (server 'sqlcrudtest-8803', database 'sqlcrudtest-6372').\",\r\n \"target\": {\r\n \"type\": \"SqlDatabase\",\r\n \"serverName\": \"sqlcrudtest-8803\",\r\n \"databaseName\": \"sqlcrudtest-6372\"\r\n }\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/jobs/job1/executions/69b8c85a-02fb-4c10-9741-8526d3c6cc1d/steps/step1/targets/d2e70491-02cb-41ec-8328-4234c108b02a\",\r\n \"name\": \"d2e70491-02cb-41ec-8328-4234c108b02a\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/executions/steps/targets\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:23:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ddaffe78-ea2f-4585-9346-90dfaa64711b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14979" + ], + "x-ms-correlation-request-id": [ + "c9bcf608-ce6d-4679-831d-10b6dec615e5" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222317Z:c9bcf608-ce6d-4679-831d-10b6dec615e5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/jobs/job1/executions/69b8c85a-02fb-4c10-9741-8526d3c6cc1d/steps/step1/targets?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04ODAzL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvZXhlY3V0aW9ucy82OWI4Yzg1YS0wMmZiLTRjMTAtOTc0MS04NTI2ZDNjNmNjMWQvc3RlcHMvc3RlcDEvdGFyZ2V0cz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6d76cb90-a5bb-4067-9373-8ea7c4281e2e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"jobVersion\": 1,\r\n \"stepName\": \"step1\",\r\n \"stepId\": 1,\r\n \"jobExecutionId\": \"69b8c85a-02fb-4c10-9741-8526d3c6cc1d\",\r\n \"lifecycle\": \"Succeeded\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"createTime\": \"2018-05-18T22:22:59.3433333Z\",\r\n \"startTime\": \"2018-05-18T22:23:01.1089076Z\",\r\n \"endTime\": \"2018-05-18T22:23:05.3432933Z\",\r\n \"currentAttempts\": 1,\r\n \"currentAttemptStartTime\": \"2018-05-18T22:23:01.2651579Z\",\r\n \"lastMessage\": \"Step 1 succeeded execution on target (server 'sqlcrudtest-8803', database 'sqlcrudtest-6372').\",\r\n \"target\": {\r\n \"type\": \"SqlDatabase\",\r\n \"serverName\": \"sqlcrudtest-8803\",\r\n \"databaseName\": \"sqlcrudtest-6372\"\r\n }\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/jobs/job1/executions/69b8c85a-02fb-4c10-9741-8526d3c6cc1d/steps/step1/targets/d2e70491-02cb-41ec-8328-4234c108b02a\",\r\n \"name\": \"d2e70491-02cb-41ec-8328-4234c108b02a\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/executions/steps/targets\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:23:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7a430ee4-d3fc-4e07-b809-7c46937a3fec" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14978" + ], + "x-ms-correlation-request-id": [ + "8b7c2367-37cd-4085-86a7-9aa898fed523" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222317Z:8b7c2367-37cd-4085-86a7-9aa898fed523" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/jobs/job1/executions/69b8c85a-02fb-4c10-9741-8526d3c6cc1d/steps/step1/targets/d2e70491-02cb-41ec-8328-4234c108b02a?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04ODAzL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvZXhlY3V0aW9ucy82OWI4Yzg1YS0wMmZiLTRjMTAtOTc0MS04NTI2ZDNjNmNjMWQvc3RlcHMvc3RlcDEvdGFyZ2V0cy9kMmU3MDQ5MS0wMmNiLTQxZWMtODMyOC00MjM0YzEwOGIwMmE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6baa1222-c73c-4ffa-bf6f-bab4b3047c55" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"jobVersion\": 1,\r\n \"stepName\": \"step1\",\r\n \"stepId\": 1,\r\n \"jobExecutionId\": \"69b8c85a-02fb-4c10-9741-8526d3c6cc1d\",\r\n \"lifecycle\": \"Succeeded\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"createTime\": \"2018-05-18T22:22:59.3433333Z\",\r\n \"startTime\": \"2018-05-18T22:23:01.1089076Z\",\r\n \"endTime\": \"2018-05-18T22:23:05.3432933Z\",\r\n \"currentAttempts\": 1,\r\n \"currentAttemptStartTime\": \"2018-05-18T22:23:01.2651579Z\",\r\n \"lastMessage\": \"Step 1 succeeded execution on target (server 'sqlcrudtest-8803', database 'sqlcrudtest-6372').\",\r\n \"target\": {\r\n \"type\": \"SqlDatabase\",\r\n \"serverName\": \"sqlcrudtest-8803\",\r\n \"databaseName\": \"sqlcrudtest-6372\"\r\n }\r\n },\r\n \"id\": \"/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/jobs/job1/executions/69b8c85a-02fb-4c10-9741-8526d3c6cc1d/steps/step1/targets/d2e70491-02cb-41ec-8328-4234c108b02a\",\r\n \"name\": \"d2e70491-02cb-41ec-8328-4234c108b02a\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/executions/steps/targets\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:23:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7291913b-93c7-4a91-9e51-b9574561134f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14977" + ], + "x-ms-correlation-request-id": [ + "ee2e1de8-126a-4b46-8300-0e0817c90a56" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222317Z:ee2e1de8-126a-4b46-8300-0e0817c90a56" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/jobs/job1/executions/69b8c85a-02fb-4c10-9741-8526d3c6cc1d/cancel?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgyOTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04ODAzL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvZXhlY3V0aW9ucy82OWI4Yzg1YS0wMmZiLTRjMTAtOTc0MS04NTI2ZDNjNmNjMWQvY2FuY2VsP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6e9f7ec1-1026-40b0-a9c7-53bb925f81d8" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:23:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourceGroups/sqlcrudtest-8293/providers/Microsoft.Sql/servers/sqlcrudtest-8803/jobAgents/agent/jobs/job1/executions/69b8c85a-02fb-4c10-9741-8526d3c6cc1d?api-version=2017-03-01-preview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "768ea278-a645-4b24-a5a7-52108e5fbe42" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1190" + ], + "x-ms-correlation-request-id": [ + "a7cde73c-635b-4f79-9aee-8d405cabe3e5" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222318Z:a7cde73c-635b-4f79-9aee-8d405cabe3e5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-8293?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTgyOTM/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "330ffd29-919b-4f12-acff-548f3662f8dc" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:23:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDgyOTMtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "b1406337-5b11-4ff5-a450-4c3c506355e8" + ], + "x-ms-correlation-request-id": [ + "b1406337-5b11-4ff5-a450-4c3c506355e8" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222318Z:b1406337-5b11-4ff5-a450-4c3c506355e8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/resourcegroups/sqlcrudtest-8293?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWIxMzJmYmMtZGY2MS00ZGQ4LWJiYTAtNzFkN2Q0Mjc3ZWRhL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTgyOTM/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "acdc6560-55f2-4166-950d-945839c2db5d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 18 May 2018 22:23:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1b132fbc-df61-4dd8-bba0-71d7d4277eda/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDgyOTMtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14998" + ], + "x-ms-request-id": [ + "af2aa569-b3e8-4e78-833f-841e19a91d81" + ], + "x-ms-correlation-request-id": [ + "af2aa569-b3e8-4e78-833f-841e19a91d81" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180518T222318Z:af2aa569-b3e8-4e78-833f-841e19a91d81" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + } + ], + "Names": { + "CreateResourceGroup": [ + "sqlcrudtest-8293" + ], + "CreateServer": [ + "sqlcrudtest-8803" + ], + "TestStartStopGetJobExecution": [ + "sqlcrudtest-6372" + ] + }, + "Variables": { + "DefaultLocation": "west us 2", + "SubscriptionId": "1b132fbc-df61-4dd8-bba0-71d7d4277eda" + } +} \ No newline at end of file diff --git a/src/SDKs/SqlManagement/Sql.Tests/Sql.Tests.csproj b/src/SDKs/SqlManagement/Sql.Tests/Sql.Tests.csproj index 5941ef96d589..e278f2814205 100644 --- a/src/SDKs/SqlManagement/Sql.Tests/Sql.Tests.csproj +++ b/src/SDKs/SqlManagement/Sql.Tests/Sql.Tests.csproj @@ -23,7 +23,7 @@ - + diff --git a/src/SDKs/SqlManagement/Sql.Tests/Utilities/SqlManagementTestContext.cs b/src/SDKs/SqlManagement/Sql.Tests/Utilities/SqlManagementTestContext.cs index b2957616c3b0..a64607df0ba1 100644 --- a/src/SDKs/SqlManagement/Sql.Tests/Utilities/SqlManagementTestContext.cs +++ b/src/SDKs/SqlManagement/Sql.Tests/Utilities/SqlManagementTestContext.cs @@ -66,6 +66,12 @@ public ResourceGroup CreateResourceGroup(string location) return resourceGroup; } + public void DeleteResourceGroup(string resourceGroupName) + { + ResourceManagementClient resourceClient = GetClient(); + resourceClient.ResourceGroups.BeginDelete(resourceGroupName); + } + public Server CreateServer(ResourceGroup resourceGroup) { return CreateServer(resourceGroup, TestEnvironmentUtilities.DefaultLocation); diff --git a/src/SDKs/_metadata/sql_resource-manager.txt b/src/SDKs/_metadata/sql_resource-manager.txt index b5a6936ab9c6..aae4168d9c80 100644 --- a/src/SDKs/_metadata/sql_resource-manager.txt +++ b/src/SDKs/_metadata/sql_resource-manager.txt @@ -1,11 +1,14 @@ -2018-04-18 23:35:28 UTC + +Type dsc to start/install the DS Consolidated Console + +2018-05-21 20:53:08 UTC 1) azure-rest-api-specs repository information -GitHub user: jugeorge +GitHub user: Azure Branch: master -Commit: d08c7f54a125819caaa8c5f553206d1adbae60f9 +Commit: c6fea13a449c7e60d515759d687f18c9079c8522 2) AutoRest information Requested version: latest -Bootstrapper version: C:\Users\jugeorge\AppData\Roaming\npm `-- autorest@2.0.4262 +Bootstrapper version: C:\Users\joke\AppData\Roaming\npm `-- autorest@2.0.4262 Latest installed version: