diff --git a/src/SDKs/SqlManagement/Management.Sql/Generated/BackupShortTermRetentionPoliciesOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/BackupShortTermRetentionPoliciesOperations.cs new file mode 100644 index 0000000000000..d7cc0c2b4d329 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/BackupShortTermRetentionPoliciesOperations.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; + + /// + /// BackupShortTermRetentionPoliciesOperations operations. + /// + internal partial class BackupShortTermRetentionPoliciesOperations : IServiceOperations, IBackupShortTermRetentionPoliciesOperations + { + /// + /// Initializes a new instance of the BackupShortTermRetentionPoliciesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal BackupShortTermRetentionPoliciesOperations(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, BackupShortTermRetentionPolicy 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, BackupShortTermRetentionPolicy 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, BackupShortTermRetentionPolicy 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, BackupShortTermRetentionPolicy 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/BackupShortTermRetentionPoliciesOperationsExtensions.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/BackupShortTermRetentionPoliciesOperationsExtensions.cs new file mode 100644 index 0000000000000..332dd5baa09ff --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/BackupShortTermRetentionPoliciesOperationsExtensions.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 BackupShortTermRetentionPoliciesOperations. + /// + public static partial class BackupShortTermRetentionPoliciesOperationsExtensions + { + /// + /// 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 BackupShortTermRetentionPolicy Get(this IBackupShortTermRetentionPoliciesOperations 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 IBackupShortTermRetentionPoliciesOperations 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 BackupShortTermRetentionPolicy CreateOrUpdate(this IBackupShortTermRetentionPoliciesOperations operations, string resourceGroupName, string serverName, string databaseName, BackupShortTermRetentionPolicy 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 IBackupShortTermRetentionPoliciesOperations operations, string resourceGroupName, string serverName, string databaseName, BackupShortTermRetentionPolicy 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 BackupShortTermRetentionPolicy Update(this IBackupShortTermRetentionPoliciesOperations operations, string resourceGroupName, string serverName, string databaseName, BackupShortTermRetentionPolicy 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 IBackupShortTermRetentionPoliciesOperations operations, string resourceGroupName, string serverName, string databaseName, BackupShortTermRetentionPolicy 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 BackupShortTermRetentionPolicy BeginCreateOrUpdate(this IBackupShortTermRetentionPoliciesOperations operations, string resourceGroupName, string serverName, string databaseName, BackupShortTermRetentionPolicy 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 IBackupShortTermRetentionPoliciesOperations operations, string resourceGroupName, string serverName, string databaseName, BackupShortTermRetentionPolicy 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 BackupShortTermRetentionPolicy BeginUpdate(this IBackupShortTermRetentionPoliciesOperations operations, string resourceGroupName, string serverName, string databaseName, BackupShortTermRetentionPolicy 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 IBackupShortTermRetentionPoliciesOperations operations, string resourceGroupName, string serverName, string databaseName, BackupShortTermRetentionPolicy 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/DatabaseVulnerabilityAssessmentRuleBaselinesOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/DatabaseVulnerabilityAssessmentRuleBaselinesOperations.cs new file mode 100644 index 0000000000000..24c1350e069b5 --- /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 0000000000000..2056fb20b9603 --- /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 0000000000000..45b2f76d7d3be --- /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 InitiateScanWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string scanId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginInitiateScanWithHttpMessagesAsync(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 BeginInitiateScanWithHttpMessagesAsync(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, "BeginInitiateScan", 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 0000000000000..381d5182556c4 --- /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 InitiateScan(this IDatabaseVulnerabilityAssessmentScansOperations operations, string resourceGroupName, string serverName, string databaseName, string scanId) + { + operations.InitiateScanAsync(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 InitiateScanAsync(this IDatabaseVulnerabilityAssessmentScansOperations operations, string resourceGroupName, string serverName, string databaseName, string scanId, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.InitiateScanWithHttpMessagesAsync(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 BeginInitiateScan(this IDatabaseVulnerabilityAssessmentScansOperations operations, string resourceGroupName, string serverName, string databaseName, string scanId) + { + operations.BeginInitiateScanAsync(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 BeginInitiateScanAsync(this IDatabaseVulnerabilityAssessmentScansOperations operations, string resourceGroupName, string serverName, string databaseName, string scanId, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginInitiateScanWithHttpMessagesAsync(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 0000000000000..836e27f47309d --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/DatabaseVulnerabilityAssessmentsOperations.cs @@ -0,0 +1,690 @@ +// +// 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 (parameters != null) + { + parameters.Validate(); + } + 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 0000000000000..264fd66ee33cc --- /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/IBackupShortTermRetentionPoliciesOperations.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/IBackupShortTermRetentionPoliciesOperations.cs new file mode 100644 index 0000000000000..bcf00894ab31c --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/IBackupShortTermRetentionPoliciesOperations.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; + + /// + /// BackupShortTermRetentionPoliciesOperations operations. + /// + public partial interface IBackupShortTermRetentionPoliciesOperations + { + /// + /// 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, BackupShortTermRetentionPolicy 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, BackupShortTermRetentionPolicy 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, BackupShortTermRetentionPolicy 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, BackupShortTermRetentionPolicy parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} 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 0000000000000..a91d62d5fb85d --- /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 0000000000000..478f2e565823e --- /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 InitiateScanWithHttpMessagesAsync(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 BeginInitiateScanWithHttpMessagesAsync(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 0000000000000..1e4aa09b2be5b --- /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 0000000000000..dc06028b44716 --- /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 0000000000000..2c411e4e4ba6c --- /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 0000000000000..caeaf4fdba60d --- /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 0000000000000..ba6472843910f --- /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 0000000000000..e2f428fa8e210 --- /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 0000000000000..fcc85a2daf87f --- /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 0000000000000..8fab528c6e990 --- /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 0000000000000..4b64755044aed --- /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 0000000000000..cd52372c7049d --- /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/ISqlManagementClient.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/ISqlManagementClient.cs index 6d60f338a605e..26f19bd85d499 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 IBackupShortTermRetentionPoliciesOperations. + /// + IBackupShortTermRetentionPoliciesOperations BackupShortTermRetentionPolicies { 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 0000000000000..1dd2de8a01872 --- /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 0000000000000..df77f9f2c4c01 --- /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 0000000000000..e030fd0a02274 --- /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 0000000000000..201d80b3efada --- /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 0000000000000..f357a5b98afa4 --- /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 0000000000000..11e6982fb1535 --- /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 0000000000000..9af657b8e1468 --- /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 0000000000000..57c38c69f208d --- /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 0000000000000..1bc81f5513c00 --- /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 0000000000000..1da13d7365d4a --- /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 0000000000000..d4817fd08a08e --- /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 0000000000000..98b6476e61998 --- /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 0000000000000..38240af52680c --- /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 0000000000000..21cc86013942c --- /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 0000000000000..95c25514ce534 --- /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 0000000000000..c43416b642a1d --- /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 0000000000000..c332ef3b62aec --- /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 0000000000000..2382754e9beaa --- /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/BackupShortTermRetentionPolicy.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/BackupShortTermRetentionPolicy.cs new file mode 100644 index 0000000000000..a3666f867d332 --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/BackupShortTermRetentionPolicy.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 short term retention policy. + /// + [Rest.Serialization.JsonTransformation] + public partial class BackupShortTermRetentionPolicy : ProxyResource + { + /// + /// Initializes a new instance of the BackupShortTermRetentionPolicy + /// class. + /// + public BackupShortTermRetentionPolicy() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the BackupShortTermRetentionPolicy + /// 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 BackupShortTermRetentionPolicy(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/DatabaseVulnerabilityAssessment.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/DatabaseVulnerabilityAssessment.cs new file mode 100644 index 0000000000000..df47c1ca9637e --- /dev/null +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/DatabaseVulnerabilityAssessment.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.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. + /// + /// 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. + /// Resource ID. + /// Resource name. + /// Resource type. + /// The recurring scans settings + public DatabaseVulnerabilityAssessment(string storageContainerPath, string storageContainerSasKey, string id = default(string), string name = default(string), string type = 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; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (StorageContainerPath == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "StorageContainerPath"); + } + if (StorageContainerSasKey == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "StorageContainerSasKey"); + } + } + } +} 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 0000000000000..c986ecdc847f5 --- /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 0000000000000..0b771e41c74bd --- /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 0000000000000..3079732cb63cd --- /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 0000000000000..f8308d23d0844 --- /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 0000000000000..fe6f269eab8ab --- /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 0000000000000..b8897f53cb79c --- /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 0000000000000..f0a908f10564d --- /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 0000000000000..5d91d4bddf993 --- /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 0000000000000..39c3e70baf2c6 --- /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 0000000000000..37ead7ce7ff5c --- /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 0000000000000..6b7e1dff02e8a --- /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 0000000000000..c108f887dbb1c --- /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 0000000000000..502616c442b8c --- /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 0000000000000..3388af5880931 --- /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 0000000000000..51941a3104060 --- /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 0000000000000..2f96d3a39604e --- /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 0000000000000..6dda291ff3212 --- /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 0000000000000..bfc1c11a276ad --- /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 0000000000000..cdd0db7bec057 --- /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 0000000000000..bb86c81266576 --- /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 0000000000000..7d03cc175e67e --- /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 0000000000000..3269ee0c6e4f0 --- /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 0000000000000..91069e0c32048 --- /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 0000000000000..bf3921ce5ec0d --- /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 0000000000000..0ce703009296d --- /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 0000000000000..86dff5006da9d --- /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/VulnerabilityAssessmentRecurringScansProperties.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/Models/VulnerabilityAssessmentRecurringScansProperties.cs new file mode 100644 index 0000000000000..94b0e00b39ab4 --- /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 0000000000000..d381ce53ff141 --- /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 0000000000000..298f1c24a1f83 --- /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 0000000000000..503c61895227f --- /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 0000000000000..252a76bff40a2 --- /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 be91333074968..368b403552656 100644 --- a/src/SDKs/SqlManagement/Management.Sql/Generated/SdkInfo_SqlManagementClient.cs +++ b/src/SDKs/SqlManagement/Management.Sql/Generated/SdkInfo_SqlManagementClient.cs @@ -1,17 +1,26 @@ -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", "BackupShortTermRetentionPolicies", "2017-10-01-preview"), new Tuple("Sql", "Capabilities", "2017-10-01-preview"), new Tuple("Sql", "DataMaskingPolicies", "2014-04-01"), new Tuple("Sql", "DataMaskingRules", "2014-04-01"), @@ -20,6 +29,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 +44,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"), @@ -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/SqlManagementClient.cs b/src/SDKs/SqlManagement/Management.Sql/Generated/SqlManagementClient.cs index de51d7d21b0c7..453f9ef3aff11 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 IBackupShortTermRetentionPoliciesOperations. + /// + public virtual IBackupShortTermRetentionPoliciesOperations BackupShortTermRetentionPolicies { 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); + BackupShortTermRetentionPolicies = new BackupShortTermRetentionPoliciesOperations(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 472a64da17da2..05845a1cdf409 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,14 @@ 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 fe4eb9a8d972b..b3ef7f2979b69 100644 --- a/src/SDKs/SqlManagement/Management.Sql/Properties/AssemblyInfo.cs +++ b/src/SDKs/SqlManagement/Management.Sql/Properties/AssemblyInfo.cs @@ -22,8 +22,5 @@ [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")] diff --git a/src/SDKs/SqlManagement/Sql.Tests/DatabaseRestoreScenarioTests.cs b/src/SDKs/SqlManagement/Sql.Tests/DatabaseRestoreScenarioTests.cs index abf569d06aeb3..faff1686f1c1e 100644 --- a/src/SDKs/SqlManagement/Sql.Tests/DatabaseRestoreScenarioTests.cs +++ b/src/SDKs/SqlManagement/Sql.Tests/DatabaseRestoreScenarioTests.cs @@ -221,6 +221,75 @@ public void TestLongTermRetentionV2Backups() } } + + [Fact] + public void TestShortTermRetentionPolicyOnPremium() + { + using (SqlManagementTestContext context = new SqlManagementTestContext(this)) + { + // Create a Premium DB so it defaults to 35 days retention. + ResourceGroup resourceGroup = context.CreateResourceGroup(); + Server server = context.CreateServer(resourceGroup); + SqlManagementClient sqlClient = context.GetClient(); + Database database = sqlClient.Databases.CreateOrUpdate( + resourceGroup.Name, server.Name, SqlManagementTestUtilities.GenerateName(), + new Database + { + Location = server.Location, + Sku = new Microsoft.Azure.Management.Sql.Models.Sku(ServiceObjectiveName.P1) + }); + + // Decrease retention period to 8 days and verfiy that it was updated. + BackupShortTermRetentionPolicy parameters = new BackupShortTermRetentionPolicy(retentionDays: 8); + sqlClient.BackupShortTermRetentionPolicies.CreateOrUpdateWithHttpMessagesAsync(resourceGroup.Name, server.Name, database.Name, parameters); + Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities.Wait(TimeSpan.FromSeconds(3)); + BackupShortTermRetentionPolicy policy = sqlClient.BackupShortTermRetentionPolicies.Get(resourceGroup.Name, server.Name, database.Name); + Assert.Equal(parameters.RetentionDays, policy.RetentionDays); + + // Increase retention period to 35 days again and verfiy that it was updated. + parameters = new BackupShortTermRetentionPolicy(retentionDays: 35); + sqlClient.BackupShortTermRetentionPolicies.CreateOrUpdateWithHttpMessagesAsync(resourceGroup.Name, server.Name, database.Name, parameters); + Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities.Wait(TimeSpan.FromSeconds(3)); + policy = sqlClient.BackupShortTermRetentionPolicies.Get(resourceGroup.Name, server.Name, database.Name); + Assert.Equal(parameters.RetentionDays, policy.RetentionDays); + } + } + + [Fact] + public void TestShortTermRetentionPolicyOnBasic() + { + using (SqlManagementTestContext context = new SqlManagementTestContext(this)) + { + int basicRetention = 7; + + // Create a Basic DB so it defaults to 7 days retention. + ResourceGroup resourceGroup = context.CreateResourceGroup(); + Server server = context.CreateServer(resourceGroup); + SqlManagementClient sqlClient = context.GetClient(); + Database database = sqlClient.Databases.CreateOrUpdate( + resourceGroup.Name, server.Name, SqlManagementTestUtilities.GenerateName(), + new Database + { + Location = server.Location, + Sku = new Microsoft.Azure.Management.Sql.Models.Sku(ServiceObjectiveName.Basic) + }); + + // Attempt to increase retention period to 8 days and verfiy that the operation fails. + BackupShortTermRetentionPolicy parameters = new BackupShortTermRetentionPolicy(retentionDays: 8); + sqlClient.BackupShortTermRetentionPolicies.CreateOrUpdateWithHttpMessagesAsync(resourceGroup.Name, server.Name, database.Name, parameters); + Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities.Wait(TimeSpan.FromSeconds(3)); + BackupShortTermRetentionPolicy policy = sqlClient.BackupShortTermRetentionPolicies.Get(resourceGroup.Name, server.Name, database.Name); + Assert.Equal(basicRetention, policy.RetentionDays); + + // Attempt to dncrease retention period to 3 days and verify operation failure. + parameters = new BackupShortTermRetentionPolicy(retentionDays: 3); + sqlClient.BackupShortTermRetentionPolicies.CreateOrUpdateWithHttpMessagesAsync(resourceGroup.Name, server.Name, database.Name, parameters); + Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities.Wait(TimeSpan.FromSeconds(3)); + policy = sqlClient.BackupShortTermRetentionPolicies.Get(resourceGroup.Name, server.Name, database.Name); + Assert.Equal(basicRetention, policy.RetentionDays); + } + } + [Fact(Skip = "Manual test due to long setup time required (over 18 hours).")] public void TestLongTermRetentionV2Crud() { @@ -321,7 +390,7 @@ public void TestDatabaseGeoRecovery() SqlManagementClient sqlClient = context.GetClient(); // List geo recoverable database backups - IEnumerable recoverableDatabases = + IEnumerable recoverableDatabases = sqlClient.RecoverableDatabases.ListByServer(resourceGroupName, serverName); Assert.True(recoverableDatabases.Any(), "No recoverable databases found."); diff --git a/src/SDKs/SqlManagement/Sql.Tests/DatabaseVulnerabilityAssessmentScenarioTests.cs b/src/SDKs/SqlManagement/Sql.Tests/DatabaseVulnerabilityAssessmentScenarioTests.cs new file mode 100644 index 0000000000000..23c81329de2b9 --- /dev/null +++ b/src/SDKs/SqlManagement/Sql.Tests/DatabaseVulnerabilityAssessmentScenarioTests.cs @@ -0,0 +1,316 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System.Collections.Generic; +using System.Linq; +using Microsoft.Azure.Management.Sql.Models; +using Microsoft.Azure.Management.ResourceManager; +using Microsoft.Azure.Management.ResourceManager.Models; +using Microsoft.Azure.Management.Sql; +using Xunit; +using System; +using Microsoft.Rest.Azure; +using System.Threading.Tasks; +using Microsoft.Azure.Management.Storage; +using Microsoft.Azure.Management.Storage.Models; +using Microsoft.WindowsAzure.Storage.Blob; +using Microsoft.Azure.Test.HttpRecorder; +using Microsoft.WindowsAzure.Storage; + +namespace Sql.Tests +{ + public class DatabaseVulnerabilityAssessmentScenarioTests + { + [Fact] + public async void TestCreateUpdateGetDatabaseVulnerabilityAssessments() + { + string testPrefix = "sqlvulnerabilityassessmentcrudtest-"; + using (SqlManagementTestContext context = new SqlManagementTestContext(this)) + { + ResourceGroup resourceGroup = context.CreateResourceGroup(); + SqlManagementClient sqlClient = context.GetClient(); + Server server = context.CreateServer(resourceGroup); + + // Create database + // + string dbName = SqlManagementTestUtilities.GenerateName(testPrefix); + var db1 = sqlClient.Databases.CreateOrUpdate(resourceGroup.Name, server.Name, dbName, new Database() + { + Location = server.Location, + }); + Assert.NotNull(db1); + + // Turn ON database threat detection as a preprequite to use VA + DatabaseSecurityAlertPolicy updatedDatabasePolicy = new DatabaseSecurityAlertPolicy + { + State = SecurityAlertPolicyState.Enabled, + EmailAccountAdmins = SecurityAlertPolicyEmailAccountAdmins.Enabled + }; + sqlClient.DatabaseThreatDetectionPolicies.CreateOrUpdate(resourceGroup.Name, server.Name, dbName, updatedDatabasePolicy); + + // Verify Policy is empty to begin with + DatabaseVulnerabilityAssessment policyThatWasReceived = sqlClient.DatabaseVulnerabilityAssessments.Get(resourceGroup.Name, server.Name, dbName); + Assert.Null(policyThatWasReceived.StorageContainerPath); + Assert.Null(policyThatWasReceived.StorageContainerSasKey); + Assert.False(policyThatWasReceived.RecurringScans.IsEnabled); + + // Set policy and then get policy and verify correctness + DatabaseVulnerabilityAssessment policyThatWasSet = await SetPolicy(context, sqlClient, resourceGroup, server, dbName); + + policyThatWasReceived = sqlClient.DatabaseVulnerabilityAssessments.Get(resourceGroup.Name, server.Name, dbName); + Assert.Equal(policyThatWasSet.StorageContainerPath, policyThatWasReceived.StorageContainerPath); + Assert.Null(policyThatWasSet.StorageContainerSasKey); + Assert.Equal(policyThatWasSet.RecurringScans.IsEnabled, policyThatWasReceived.RecurringScans.IsEnabled); + SqlManagementTestUtilities.AssertCollection(policyThatWasSet.RecurringScans.Emails, policyThatWasReceived.RecurringScans.Emails); + Assert.Equal(policyThatWasSet.RecurringScans.EmailSubscriptionAdmins, policyThatWasReceived.RecurringScans.EmailSubscriptionAdmins); + + // Delete policy and then get policy and verify correctness + sqlClient.DatabaseVulnerabilityAssessments.Delete(resourceGroup.Name, server.Name, dbName); + + // Get policy after deletion + policyThatWasReceived = sqlClient.DatabaseVulnerabilityAssessments.Get(resourceGroup.Name, server.Name, dbName); + Assert.Null(policyThatWasReceived.StorageContainerPath); + Assert.Null(policyThatWasReceived.StorageContainerSasKey); + Assert.False(policyThatWasReceived.RecurringScans.IsEnabled); + }; + } + + [Fact] + public async void TestCreateUpdateGetDeleteDatabaseVulnerabilityAssessmentBaselines() + { + using (SqlManagementTestContext context = new SqlManagementTestContext(this)) + { + string testPrefix = "sqlvulnerabilityassessmentbaselinetest-"; + + ResourceGroup resourceGroup = context.CreateResourceGroup(); + SqlManagementClient sqlClient = context.GetClient(); + Server server = context.CreateServer(resourceGroup); + + // Create database + // + string dbName = SqlManagementTestUtilities.GenerateName(testPrefix); + var db1 = sqlClient.Databases.CreateOrUpdate(resourceGroup.Name, server.Name, dbName, new Database() + { + Location = server.Location, + }); + Assert.NotNull(db1); + + // Turn ON database threat detection as a preprequite to use VA + DatabaseSecurityAlertPolicy updatedDatabasePolicy = new DatabaseSecurityAlertPolicy + { + State = SecurityAlertPolicyState.Enabled, + EmailAccountAdmins = SecurityAlertPolicyEmailAccountAdmins.Enabled + }; + sqlClient.DatabaseThreatDetectionPolicies.CreateOrUpdate(resourceGroup.Name, server.Name, dbName, updatedDatabasePolicy); + + // Set policy + await SetPolicy(context, sqlClient, resourceGroup, server, dbName); + + // Set baseline + string testRuleId = "VA2031"; + var ruleBaselineToSet = new DatabaseVulnerabilityAssessmentRuleBaseline( + new List() + { + new DatabaseVulnerabilityAssessmentRuleBaselineItem() + { + Result = new string[] { "userA", "SELECT" } + }, + new DatabaseVulnerabilityAssessmentRuleBaselineItem() + { + Result = new string[] { "userB", "SELECT" } + } + }); + + sqlClient.DatabaseVulnerabilityAssessmentRuleBaselines.CreateOrUpdate(resourceGroup.Name, server.Name, dbName, testRuleId, ruleBaselineToSet); + + // Get baseline + DatabaseVulnerabilityAssessmentRuleBaseline actualBaseline = sqlClient.DatabaseVulnerabilityAssessmentRuleBaselines.Get(resourceGroup.Name, server.Name, dbName, testRuleId); + + Assert.Equal(ruleBaselineToSet.BaselineResults.Count(), actualBaseline.BaselineResults.Count()); + SqlManagementTestUtilities.AssertCollection(ruleBaselineToSet.BaselineResults[0].Result, actualBaseline.BaselineResults[0].Result); + SqlManagementTestUtilities.AssertCollection(ruleBaselineToSet.BaselineResults[1].Result, actualBaseline.BaselineResults[1].Result); + + // Delete baseline + sqlClient.DatabaseVulnerabilityAssessmentRuleBaselines.Delete(resourceGroup.Name, server.Name, dbName, testRuleId); + + // Get baseline should fail after deleting the baseline + Assert.Throws(() => + sqlClient.DatabaseVulnerabilityAssessmentRuleBaselines.Get(resourceGroup.Name, server.Name, dbName, testRuleId)); + } + } + + [Fact] + public async void TestExecuteGetListDatabaseVulnerabilityAssessmentScans() + { + using (SqlManagementTestContext context = new SqlManagementTestContext(this)) + { + string testPrefix = "sqlvulnerabilityassessmentscantest-"; + + ResourceGroup resourceGroup = context.CreateResourceGroup(); + SqlManagementClient sqlClient = context.GetClient(); + Server server = context.CreateServer(resourceGroup); + + // Create database + // + string dbName = SqlManagementTestUtilities.GenerateName(testPrefix); + var db1 = sqlClient.Databases.CreateOrUpdate(resourceGroup.Name, server.Name, dbName, new Database() + { + Location = server.Location, + }); + Assert.NotNull(db1); + + // Turn ON database threat detection as a preprequite to use VA + DatabaseSecurityAlertPolicy updatedDatabasePolicy = new DatabaseSecurityAlertPolicy + { + State = SecurityAlertPolicyState.Enabled, + EmailAccountAdmins = SecurityAlertPolicyEmailAccountAdmins.Enabled + }; + sqlClient.DatabaseThreatDetectionPolicies.CreateOrUpdate(resourceGroup.Name, server.Name, dbName, updatedDatabasePolicy); + + // Set policy + await SetPolicy(context, sqlClient, resourceGroup, server, dbName); + + // Run some scans + string scanId = string.Format("scantest1_{0}", testPrefix); + sqlClient.DatabaseVulnerabilityAssessmentScans.InitiateScan(resourceGroup.Name, server.Name, dbName, scanId); + + string scanId1 = string.Format("scantest2_{0}", testPrefix); + sqlClient.DatabaseVulnerabilityAssessmentScans.InitiateScan(resourceGroup.Name, server.Name, dbName, scanId1); + + // Verify get scan and list scans + VulnerabilityAssessmentScanRecord scanRecord = sqlClient.DatabaseVulnerabilityAssessmentScans.Get(resourceGroup.Name, server.Name, dbName, scanId); + Assert.Equal(scanId, scanRecord.ScanId); + + IPage scanRecords = sqlClient.DatabaseVulnerabilityAssessmentScans.ListByDatabase(resourceGroup.Name, server.Name, dbName); + Assert.Equal(2, scanRecords.ToList().Count); + Assert.Contains(scanRecords.ToList(), item => item.ScanId == scanId); + Assert.Contains(scanRecords.ToList(), item => item.ScanId == scanId1); + + VulnerabilityAssessmentScanRecord scanId1Record = sqlClient.DatabaseVulnerabilityAssessmentScans.Get(resourceGroup.Name, server.Name, dbName, scanId1); + VulnerabilityAssessmentScanRecord scanId1RecordFromList = scanRecords.FirstOrDefault(item => item.ScanId == scanId1); + Assert.Equal(scanId1Record.ScanId, scanId1RecordFromList.ScanId); + Assert.Equal(scanId1Record.TriggerType, scanId1RecordFromList.TriggerType); + Assert.Equal(scanId1Record.State, scanId1RecordFromList.State); + Assert.Equal(scanId1Record.StartTime, scanId1RecordFromList.StartTime); + Assert.Equal(scanId1Record.EndTime, scanId1RecordFromList.EndTime); + Assert.Equal(scanId1Record.Errors, scanId1RecordFromList.Errors); + Assert.Equal(scanId1Record.StorageContainerPath, scanId1RecordFromList.StorageContainerPath); + Assert.Equal(scanId1Record.NumberOfFailedSecurityChecks, scanId1RecordFromList.NumberOfFailedSecurityChecks); + } + } + + [Fact] + public async void TestExportDatabaseVulnerabilityAssessmentScans() + { + using (SqlManagementTestContext context = new SqlManagementTestContext(this)) + { + string testPrefix = "sqlvulnerabilityassessmentexportscantest-"; + + ResourceGroup resourceGroup = context.CreateResourceGroup(); + SqlManagementClient sqlClient = context.GetClient(); + Server server = context.CreateServer(resourceGroup); + + // Create database + // + string dbName = SqlManagementTestUtilities.GenerateName(testPrefix); + var db1 = sqlClient.Databases.CreateOrUpdate(resourceGroup.Name, server.Name, dbName, new Database() + { + Location = server.Location, + }); + Assert.NotNull(db1); + + // Turn ON database threat detection as a preprequite to use VA + DatabaseSecurityAlertPolicy updatedDatabasePolicy = new DatabaseSecurityAlertPolicy + { + State = SecurityAlertPolicyState.Enabled, + EmailAccountAdmins = SecurityAlertPolicyEmailAccountAdmins.Enabled + }; + sqlClient.DatabaseThreatDetectionPolicies.CreateOrUpdate(resourceGroup.Name, server.Name, dbName, updatedDatabasePolicy); + + // Set policy + await SetPolicy(context, sqlClient, resourceGroup, server, dbName); + + // Run some scans + string scanId = string.Format("scan1_{0}", testPrefix); + sqlClient.DatabaseVulnerabilityAssessmentScans.InitiateScan(resourceGroup.Name, server.Name, dbName, scanId); + sqlClient.DatabaseVulnerabilityAssessmentScans.Export(resourceGroup.Name, server.Name, dbName, scanId); + } + } + + private async Task SetPolicy(SqlManagementTestContext context, SqlManagementClient sqlClient, ResourceGroup resourceGroup, + Server server, string dbName) + { + StorageContainerInfo StorageContainerInfo = await CreateStorageContainer(context, resourceGroup); + DatabaseVulnerabilityAssessment policy = new DatabaseVulnerabilityAssessment() + { + StorageContainerPath = StorageContainerInfo.StorageContainerPath.ToString(), + StorageContainerSasKey = StorageContainerInfo.StorageAccountSasKey, + RecurringScans = new VulnerabilityAssessmentRecurringScansProperties() + { + IsEnabled = false, + Emails = new List() { "fakemail1@mail.com", "fakemail2@mail.com" }, + EmailSubscriptionAdmins = true + } + }; + + return sqlClient.DatabaseVulnerabilityAssessments.CreateOrUpdate(resourceGroup.Name, server.Name, dbName, policy); + } + + private struct StorageContainerInfo + { + public string StorageAccountSasKey; + public Uri StorageContainerPath; + } + + private async Task CreateStorageContainer(SqlManagementTestContext context, ResourceGroup resourceGroup) + { + StorageManagementClient storageClient = context.GetClient(); + StorageAccount storageAccount = await storageClient.StorageAccounts.CreateAsync( + resourceGroup.Name, + accountName: SqlManagementTestUtilities.GenerateName(prefix: "sqlvatest"), + parameters: new StorageAccountCreateParameters( + new Microsoft.Azure.Management.Storage.Models.Sku(SkuName.StandardLRS, SkuTier.Standard), + Kind.BlobStorage, + resourceGroup.Location, + accessTier: AccessTier.Cool)); + + StorageAccountListKeysResult keys = + storageClient.StorageAccounts.ListKeys(resourceGroup.Name, storageAccount.Name); + string key = keys.Keys.First().Value; + + string containerName = "vulnerability-assessment"; + var sasToken = string.Empty; + + // Create container + // Since this is a data-plane client and not an ARM client it's harder to inject + // HttpMockServer into it to record/playback, but that's fine because we don't need + // any of the response data to continue with the test. + if (HttpMockServer.Mode == HttpRecorderMode.Record) + { + CloudStorageAccount storageAccountClient = new CloudStorageAccount( + new Microsoft.WindowsAzure.Storage.Auth.StorageCredentials( + storageAccount.Name, + key), + useHttps: true); + CloudBlobClient blobClient = storageAccountClient.CreateCloudBlobClient(); + CloudBlobContainer containerReference = blobClient.GetContainerReference(containerName); + await containerReference.CreateIfNotExistsAsync(); + + SharedAccessBlobPolicy sharedAccessPolicy = new SharedAccessBlobPolicy + { + SharedAccessExpiryTime = new DateTimeOffset(DateTime.UtcNow.Add(TimeSpan.FromHours(1))), + Permissions = SharedAccessBlobPermissions.Write | SharedAccessBlobPermissions.Read | SharedAccessBlobPermissions.List + }; + + // Generate the SAS Token + sasToken = containerReference.GetSharedAccessSignature(sharedAccessPolicy); + } + + return new StorageContainerInfo + { + StorageAccountSasKey = sasToken, + StorageContainerPath = new Uri(storageAccount.PrimaryEndpoints.Blob + containerName) + }; + } + } +} diff --git a/src/SDKs/SqlManagement/Sql.Tests/ElasticJobAgentScenarioTests.cs b/src/SDKs/SqlManagement/Sql.Tests/ElasticJobAgentScenarioTests.cs new file mode 100644 index 0000000000000..af3f10024336c --- /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.DatabaseRestoreScenarioTests/TestShortTermRetentionPolicyOnBasic.json b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.DatabaseRestoreScenarioTests/TestShortTermRetentionPolicyOnBasic.json new file mode 100644 index 0000000000000..246a9636ebb94 --- /dev/null +++ b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.DatabaseRestoreScenarioTests/TestShortTermRetentionPolicyOnBasic.json @@ -0,0 +1,967 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-2354?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTIzNTQ/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"north central us\",\r\n \"tags\": {\r\n \"sqlcrudtest-2354\": \"2018-05-22 17:08:17Z\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "105" + ], + "x-ms-client-request-id": [ + "fe733bb5-9d73-4da3-8615-85e2822662b5" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2354\",\r\n \"name\": \"sqlcrudtest-2354\",\r\n \"location\": \"northcentralus\",\r\n \"tags\": {\r\n \"sqlcrudtest-2354\": \"2018-05-22 17:08:17Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "244" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 17:08:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "60f0ab85-744f-4877-acc6-20e061936bde" + ], + "x-ms-correlation-request-id": [ + "60f0ab85-744f-4877-acc6-20e061936bde" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T170819Z:60f0ab85-744f-4877-acc6-20e061936bde" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2354/providers/Microsoft.Sql/servers/sqlcrudtest-9401?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIzNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05NDAxP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "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\": \"north central us\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "190" + ], + "x-ms-client-request-id": [ + "94c22b90-4eb5-465c-9979-77843e58a303" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.15.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertLogicalServer\",\r\n \"startTime\": \"2018-05-22T17:08:21.21Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "73" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 17:08:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2354/providers/Microsoft.Sql/locations/northcentralus/serverOperationResults/187368d7-9c01-42f7-8634-7a80cc67e44b?api-version=2015-05-01-preview" + ], + "Retry-After": [ + "1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2354/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/187368d7-9c01-42f7-8634-7a80cc67e44b?api-version=2015-05-01-preview" + ], + "x-ms-request-id": [ + "187368d7-9c01-42f7-8634-7a80cc67e44b" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "d61116ce-c4e6-45da-9462-212dcc623e50" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T170821Z:d61116ce-c4e6-45da-9462-212dcc623e50" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2354/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/187368d7-9c01-42f7-8634-7a80cc67e44b?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIzNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vMTg3MzY4ZDctOWMwMS00MmY3LTg2MzQtN2E4MGNjNjdlNDRiP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.15.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"187368d7-9c01-42f7-8634-7a80cc67e44b\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T17:08:21.21Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 17:08:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "41d8cba5-19e2-495d-8a55-71fed69825a5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "ef5f5e86-b20c-42cf-931f-2d12db936f40" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T170831Z:ef5f5e86-b20c-42cf-931f-2d12db936f40" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2354/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/187368d7-9c01-42f7-8634-7a80cc67e44b?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIzNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vMTg3MzY4ZDctOWMwMS00MmY3LTg2MzQtN2E4MGNjNjdlNDRiP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.15.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"187368d7-9c01-42f7-8634-7a80cc67e44b\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T17:08:21.21Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 17:08:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e491f2ca-b920-45f4-936a-dd501f7380c6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "c6815f0e-d412-4536-a574-c29bf6901c70" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T170851Z:c6815f0e-d412-4536-a574-c29bf6901c70" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2354/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/187368d7-9c01-42f7-8634-7a80cc67e44b?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIzNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vMTg3MzY4ZDctOWMwMS00MmY3LTg2MzQtN2E4MGNjNjdlNDRiP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.15.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"187368d7-9c01-42f7-8634-7a80cc67e44b\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T17:08:21.21Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 17:09:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "c18abb3f-d8a6-4218-bdd9-1894dd2250c3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "7a3b46da-a5b6-4052-a23a-bd38daf2a28b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T170911Z:7a3b46da-a5b6-4052-a23a-bd38daf2a28b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2354/providers/Microsoft.Sql/servers/sqlcrudtest-9401?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIzNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05NDAxP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.15.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-9401.database.windows.net\"\r\n },\r\n \"location\": \"northcentralus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2354/providers/Microsoft.Sql/servers/sqlcrudtest-9401\",\r\n \"name\": \"sqlcrudtest-9401\",\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 17:09:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "4d34b323-f473-4c97-858a-2a94a4fa20aa" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "233dd418-0917-44ff-8657-a84bdeefde59" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T170912Z:233dd418-0917-44ff-8657-a84bdeefde59" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2354/providers/Microsoft.Sql/servers/sqlcrudtest-9401/databases/sqlcrudtest-1410?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIzNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05NDAxL2RhdGFiYXNlcy9zcWxjcnVkdGVzdC0xNDEwP2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Basic\"\r\n },\r\n \"location\": \"northcentralus\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "75" + ], + "x-ms-client-request-id": [ + "288d6acb-7793-49a1-a42e-0131e81be134" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.15.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"CreateLogicalDatabase\",\r\n \"startTime\": \"2018-05-22T17:09:13.073Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "76" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 17:09:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2354/providers/Microsoft.Sql/locations/northcentralus/databaseOperationResults/682e0d0d-a771-42cf-aef3-a7b667d33153?api-version=2017-10-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2354/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/682e0d0d-a771-42cf-aef3-a7b667d33153?api-version=2017-10-01-preview" + ], + "x-ms-request-id": [ + "ec91c564-f608-4877-ae33-2247f96c4382" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "52b51965-cacd-49ef-9045-03045243b28e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T170913Z:52b51965-cacd-49ef-9045-03045243b28e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2354/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/682e0d0d-a771-42cf-aef3-a7b667d33153?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIzNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi82ODJlMGQwZC1hNzcxLTQyY2YtYWVmMy1hN2I2NjdkMzMxNTM/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.15.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"682e0d0d-a771-42cf-aef3-a7b667d33153\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T17:09:13.073Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 17:09:27 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "2957c5a9-b48b-44af-bbb3-876da128f218" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "543429ad-724e-4529-a908-498ccc6113f4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T170928Z:543429ad-724e-4529-a908-498ccc6113f4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2354/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/682e0d0d-a771-42cf-aef3-a7b667d33153?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIzNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi82ODJlMGQwZC1hNzcxLTQyY2YtYWVmMy1hN2I2NjdkMzMxNTM/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.15.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"682e0d0d-a771-42cf-aef3-a7b667d33153\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T17:09:13.073Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 17:09:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "47ec8120-af23-4fc7-9c32-4edb0ffebd71" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "c8a6d316-b644-46b0-bf16-e6ea43796f25" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T170943Z:c8a6d316-b644-46b0-bf16-e6ea43796f25" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2354/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/682e0d0d-a771-42cf-aef3-a7b667d33153?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIzNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi82ODJlMGQwZC1hNzcxLTQyY2YtYWVmMy1hN2I2NjdkMzMxNTM/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.15.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"682e0d0d-a771-42cf-aef3-a7b667d33153\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T17:09:13.073Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 17:09:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "57e58d78-08e5-4536-aa4b-1302278e3af6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "f77b1c1e-1146-47f7-a858-c970551d54e2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T170958Z:f77b1c1e-1146-47f7-a858-c970551d54e2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2354/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/682e0d0d-a771-42cf-aef3-a7b667d33153?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIzNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi82ODJlMGQwZC1hNzcxLTQyY2YtYWVmMy1hN2I2NjdkMzMxNTM/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.15.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"682e0d0d-a771-42cf-aef3-a7b667d33153\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T17:09:13.073Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 17:10:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "553d2462-59e4-41d5-ac74-94fe0517a909" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "b60cf8cb-c30a-44eb-a103-781aea9dee8f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T171013Z:b60cf8cb-c30a-44eb-a103-781aea9dee8f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2354/providers/Microsoft.Sql/servers/sqlcrudtest-9401/databases/sqlcrudtest-1410?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIzNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05NDAxL2RhdGFiYXNlcy9zcWxjcnVkdGVzdC0xNDEwP2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.15.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"tier\": \"Basic\",\r\n \"capacity\": 5\r\n },\r\n \"kind\": \"v12.0,user\",\r\n \"properties\": {\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": 2147483648,\r\n \"status\": \"Online\",\r\n \"databaseId\": \"93938abb-a514-4532-b9d1-d3d4c774617a\",\r\n \"creationDate\": \"2018-05-22T17:09:13.383Z\",\r\n \"currentServiceObjectiveName\": \"Basic\",\r\n \"requestedServiceObjectiveName\": \"Basic\",\r\n \"defaultSecondaryLocation\": \"South Central US\",\r\n \"catalogCollation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"zoneRedundant\": false,\r\n \"earliestRestoreDate\": \"2018-05-22T17:39:59.013Z\",\r\n \"readScale\": \"Disabled\",\r\n \"currentSku\": {\r\n \"name\": \"Basic\",\r\n \"tier\": \"Basic\",\r\n \"capacity\": 5\r\n }\r\n },\r\n \"location\": \"northcentralus\",\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2354/providers/Microsoft.Sql/servers/sqlcrudtest-9401/databases/sqlcrudtest-1410\",\r\n \"name\": \"sqlcrudtest-1410\",\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 17:10:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "781ad651-8924-4444-bafe-5247b4f7b9dc" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "ba6bff32-a246-4ace-b117-ec74cbff6baa" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T171014Z:ba6bff32-a246-4ace-b117-ec74cbff6baa" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2354/providers/Microsoft.Sql/servers/sqlcrudtest-9401/databases/sqlcrudtest-1410/backupShortTermRetentionPolicies/default?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIzNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05NDAxL2RhdGFiYXNlcy9zcWxjcnVkdGVzdC0xNDEwL2JhY2t1cFNob3J0VGVybVJldGVudGlvblBvbGljaWVzL2RlZmF1bHQ/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "8a68d59d-c440-47e3-84ce-6458fa8fb110" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.15.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"retentionDays\": 7\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2354/providers/Microsoft.Sql/servers/sqlcrudtest-9401/databases/sqlcrudtest-1410/backupShortTermRetentionPolicies/default\",\r\n \"name\": \"default\",\r\n \"type\": \"Microsoft.Sql/servers/databases/backupShortTermRetentionPolicies\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 17:10:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "19992745-9d5a-4a34-beb9-8940d27ef18e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "08add996-a9ff-4343-9da0-3c9401afc701" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T171017Z:08add996-a9ff-4343-9da0-3c9401afc701" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2354/providers/Microsoft.Sql/servers/sqlcrudtest-9401/databases/sqlcrudtest-1410/backupShortTermRetentionPolicies/default?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIzNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05NDAxL2RhdGFiYXNlcy9zcWxjcnVkdGVzdC0xNDEwL2JhY2t1cFNob3J0VGVybVJldGVudGlvblBvbGljaWVzL2RlZmF1bHQ/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e5e3bcde-fa89-43e5-8878-331dab59d67b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.15.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"retentionDays\": 7\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2354/providers/Microsoft.Sql/servers/sqlcrudtest-9401/databases/sqlcrudtest-1410/backupShortTermRetentionPolicies/default\",\r\n \"name\": \"default\",\r\n \"type\": \"Microsoft.Sql/servers/databases/backupShortTermRetentionPolicies\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 17:10:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "4cf18ac2-46eb-4861-85ef-b3a2080404d4" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "10319c55-1811-4953-b3b9-e9fcb1e99019" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T171021Z:10319c55-1811-4953-b3b9-e9fcb1e99019" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-2354?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTIzNTQ/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "949d987c-9db8-4f25-93f1-c16ea7897c89" + ], + "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 17:10:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDIzNTQtTk9SVEhDRU5UUkFMVVMiLCJqb2JMb2NhdGlvbiI6Im5vcnRoY2VudHJhbHVzIn0?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "d3bc0d73-b200-4b3d-8431-d7a7d75cb1da" + ], + "x-ms-correlation-request-id": [ + "d3bc0d73-b200-4b3d-8431-d7a7d75cb1da" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T171023Z:d3bc0d73-b200-4b3d-8431-d7a7d75cb1da" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + } + ], + "Names": { + "CreateResourceGroup": [ + "sqlcrudtest-2354" + ], + "CreateServer": [ + "sqlcrudtest-9401" + ], + "TestShortTermRetentionPolicyOnBasic": [ + "sqlcrudtest-1410" + ] + }, + "Variables": { + "DefaultLocation": "north central us", + "SubscriptionId": "f28872d6-4a93-4bb1-84b9-aecb02b6af4c" + } +} \ No newline at end of file diff --git a/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.DatabaseRestoreScenarioTests/TestShortTermRetentionPolicyOnPremium.json b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.DatabaseRestoreScenarioTests/TestShortTermRetentionPolicyOnPremium.json new file mode 100644 index 0000000000000..5a2ddc4935425 --- /dev/null +++ b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.DatabaseRestoreScenarioTests/TestShortTermRetentionPolicyOnPremium.json @@ -0,0 +1,1180 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-2568?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTI1Njg/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"north central us\",\r\n \"tags\": {\r\n \"sqlcrudtest-2568\": \"2018-05-22 17:05:56Z\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "105" + ], + "x-ms-client-request-id": [ + "d90e2b75-bec3-486b-a7a1-5809aeb33018" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2568\",\r\n \"name\": \"sqlcrudtest-2568\",\r\n \"location\": \"northcentralus\",\r\n \"tags\": {\r\n \"sqlcrudtest-2568\": \"2018-05-22 17:05:56Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "244" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 17:05:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "edea87b8-7d43-4cea-bd26-e96b92036819" + ], + "x-ms-correlation-request-id": [ + "edea87b8-7d43-4cea-bd26-e96b92036819" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T170558Z:edea87b8-7d43-4cea-bd26-e96b92036819" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2568/providers/Microsoft.Sql/servers/sqlcrudtest-4090?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1NjgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MDkwP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "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\": \"north central us\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "190" + ], + "x-ms-client-request-id": [ + "cc0de792-2c1d-41c2-889c-540051ded4dc" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.15.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertLogicalServer\",\r\n \"startTime\": \"2018-05-22T17:06:00.217Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "74" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 17:05:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2568/providers/Microsoft.Sql/locations/northcentralus/serverOperationResults/b11643b4-7170-4d1a-bf9c-a05343400a1f?api-version=2015-05-01-preview" + ], + "Retry-After": [ + "1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2568/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/b11643b4-7170-4d1a-bf9c-a05343400a1f?api-version=2015-05-01-preview" + ], + "x-ms-request-id": [ + "b11643b4-7170-4d1a-bf9c-a05343400a1f" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "026b4490-13e5-4a9c-bb1a-17d0159f1eae" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T170600Z:026b4490-13e5-4a9c-bb1a-17d0159f1eae" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2568/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/b11643b4-7170-4d1a-bf9c-a05343400a1f?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1NjgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vYjExNjQzYjQtNzE3MC00ZDFhLWJmOWMtYTA1MzQzNDAwYTFmP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.15.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"b11643b4-7170-4d1a-bf9c-a05343400a1f\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T17:06:00.217Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 17:06:09 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b055b7eb-4ebd-44fc-9ee1-065aef6b1325" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "ce6a2762-6654-41c9-a27e-c841b6fdf7fd" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T170610Z:ce6a2762-6654-41c9-a27e-c841b6fdf7fd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2568/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/b11643b4-7170-4d1a-bf9c-a05343400a1f?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1NjgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vYjExNjQzYjQtNzE3MC00ZDFhLWJmOWMtYTA1MzQzNDAwYTFmP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.15.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"b11643b4-7170-4d1a-bf9c-a05343400a1f\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T17:06:00.217Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 17:06:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "58af4375-3196-4b93-83b4-eec8545827bf" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "2daff725-ac99-4179-86f8-854fb1fb3b07" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T170630Z:2daff725-ac99-4179-86f8-854fb1fb3b07" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2568/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/b11643b4-7170-4d1a-bf9c-a05343400a1f?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1NjgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vYjExNjQzYjQtNzE3MC00ZDFhLWJmOWMtYTA1MzQzNDAwYTFmP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.15.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"b11643b4-7170-4d1a-bf9c-a05343400a1f\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T17:06:00.217Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 17:06:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "5ae312a3-f43c-4cc3-a077-f894064affaa" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "fb20bb46-ba59-4766-bdec-bbc885411fb4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T170650Z:fb20bb46-ba59-4766-bdec-bbc885411fb4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2568/providers/Microsoft.Sql/servers/sqlcrudtest-4090?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1NjgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MDkwP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.15.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-4090.database.windows.net\"\r\n },\r\n \"location\": \"northcentralus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2568/providers/Microsoft.Sql/servers/sqlcrudtest-4090\",\r\n \"name\": \"sqlcrudtest-4090\",\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 17:06:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "4b0affec-f97b-46a4-bd5b-20642aef9dc1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "86e2db8a-e4bf-4af4-ba57-4dd00c836612" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T170651Z:86e2db8a-e4bf-4af4-ba57-4dd00c836612" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2568/providers/Microsoft.Sql/servers/sqlcrudtest-4090/databases/sqlcrudtest-272?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1NjgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MDkwL2RhdGFiYXNlcy9zcWxjcnVkdGVzdC0yNzI/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"P1\"\r\n },\r\n \"location\": \"northcentralus\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "72" + ], + "x-ms-client-request-id": [ + "30a13f3f-4628-4131-a246-6fc7bc9cc17c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.15.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"CreateLogicalDatabase\",\r\n \"startTime\": \"2018-05-22T17:06:52.05Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "75" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 17:06:52 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2568/providers/Microsoft.Sql/locations/northcentralus/databaseOperationResults/6f756b77-8e97-4131-a881-2af4a59a8bf2?api-version=2017-10-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2568/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/6f756b77-8e97-4131-a881-2af4a59a8bf2?api-version=2017-10-01-preview" + ], + "x-ms-request-id": [ + "d2da7011-a15a-4e2b-b302-a8fd527d9b8c" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "1fb68d3d-af47-46e7-93e8-5c9782cb2873" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T170652Z:1fb68d3d-af47-46e7-93e8-5c9782cb2873" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2568/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/6f756b77-8e97-4131-a881-2af4a59a8bf2?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1NjgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi82Zjc1NmI3Ny04ZTk3LTQxMzEtYTg4MS0yYWY0YTU5YThiZjI/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.15.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"6f756b77-8e97-4131-a881-2af4a59a8bf2\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T17:06:52.05Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 17:07:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "03a76a44-5e74-4f08-b397-2a160f46d4ca" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "ac2cfdfe-9afb-4535-8f94-7e2bcc1d38a1" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T170707Z:ac2cfdfe-9afb-4535-8f94-7e2bcc1d38a1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2568/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/6f756b77-8e97-4131-a881-2af4a59a8bf2?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1NjgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi82Zjc1NmI3Ny04ZTk3LTQxMzEtYTg4MS0yYWY0YTU5YThiZjI/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.15.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"6f756b77-8e97-4131-a881-2af4a59a8bf2\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T17:06:52.05Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 17:07:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "6809c340-f568-4a9a-a2bb-c3ca07126210" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "2a0051ad-be2e-49c7-9f4c-9812682675d9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T170722Z:2a0051ad-be2e-49c7-9f4c-9812682675d9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2568/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/6f756b77-8e97-4131-a881-2af4a59a8bf2?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1NjgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi82Zjc1NmI3Ny04ZTk3LTQxMzEtYTg4MS0yYWY0YTU5YThiZjI/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.15.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"6f756b77-8e97-4131-a881-2af4a59a8bf2\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T17:06:52.05Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 17:07:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "0307daca-bcf0-43b9-85a4-f4cdf54e7367" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "b7db0c01-bbfa-4e95-8abb-18aab1fd1933" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T170737Z:b7db0c01-bbfa-4e95-8abb-18aab1fd1933" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2568/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/6f756b77-8e97-4131-a881-2af4a59a8bf2?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1NjgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi82Zjc1NmI3Ny04ZTk3LTQxMzEtYTg4MS0yYWY0YTU5YThiZjI/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.15.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"6f756b77-8e97-4131-a881-2af4a59a8bf2\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T17:06:52.05Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 17:07:52 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "5953ed56-dc52-4085-baf8-3866feb88aa0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "71593817-886c-42a9-9af9-e3afe237e4c6" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T170752Z:71593817-886c-42a9-9af9-e3afe237e4c6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2568/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/6f756b77-8e97-4131-a881-2af4a59a8bf2?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1NjgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi82Zjc1NmI3Ny04ZTk3LTQxMzEtYTg4MS0yYWY0YTU5YThiZjI/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.15.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"6f756b77-8e97-4131-a881-2af4a59a8bf2\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T17:06:52.05Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 17:08:07 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "31646228-8499-43c6-b4f3-10200919538e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "13155223-2c1c-4608-9af1-38160f3dbb00" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T170808Z:13155223-2c1c-4608-9af1-38160f3dbb00" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2568/providers/Microsoft.Sql/servers/sqlcrudtest-4090/databases/sqlcrudtest-272?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1NjgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MDkwL2RhdGFiYXNlcy9zcWxjcnVkdGVzdC0yNzI/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.15.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Premium\",\r\n \"tier\": \"Premium\",\r\n \"capacity\": 125\r\n },\r\n \"kind\": \"v12.0,user\",\r\n \"properties\": {\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": 536870912000,\r\n \"status\": \"Online\",\r\n \"databaseId\": \"50846838-39b4-4b59-ad1c-54f04a8e092e\",\r\n \"creationDate\": \"2018-05-22T17:06:52.347Z\",\r\n \"currentServiceObjectiveName\": \"P1\",\r\n \"requestedServiceObjectiveName\": \"P1\",\r\n \"defaultSecondaryLocation\": \"South Central US\",\r\n \"catalogCollation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"zoneRedundant\": false,\r\n \"earliestRestoreDate\": \"2018-05-22T17:38:04.727Z\",\r\n \"readScale\": \"Disabled\",\r\n \"currentSku\": {\r\n \"name\": \"Premium\",\r\n \"tier\": \"Premium\",\r\n \"capacity\": 125\r\n }\r\n },\r\n \"location\": \"northcentralus\",\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2568/providers/Microsoft.Sql/servers/sqlcrudtest-4090/databases/sqlcrudtest-272\",\r\n \"name\": \"sqlcrudtest-272\",\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 17:08:08 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "fc5246a4-80a1-4d1c-b1a6-61ab4cc63741" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "61d6d803-60ea-40db-94d3-01d14d77d1ed" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T170808Z:61d6d803-60ea-40db-94d3-01d14d77d1ed" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2568/providers/Microsoft.Sql/servers/sqlcrudtest-4090/databases/sqlcrudtest-272/backupShortTermRetentionPolicies/default?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1NjgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MDkwL2RhdGFiYXNlcy9zcWxjcnVkdGVzdC0yNzIvYmFja3VwU2hvcnRUZXJtUmV0ZW50aW9uUG9saWNpZXMvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"retentionDays\": 8\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "52" + ], + "x-ms-client-request-id": [ + "244021c2-ed22-45d0-9a9f-d7e23260a46e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.15.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpdateLogicalDatabase\",\r\n \"startTime\": \"2018-05-22T17:08:08.9Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "74" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 17:08:08 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2568/providers/Microsoft.Sql/locations/northcentralus/shortTermRetentionPolicyOperationResults/d7ee162d-8b6e-4536-8b0f-9f41ab0e5d22?api-version=2017-10-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2568/providers/Microsoft.Sql/locations/northcentralus/shortTermRetentionPolicyAzureAsyncOperation/d7ee162d-8b6e-4536-8b0f-9f41ab0e5d22?api-version=2017-10-01-preview" + ], + "x-ms-request-id": [ + "1a64ccec-4e50-4ffa-80e4-567513c192ee" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "7ca00455-4eda-4015-97be-ce990c2e1329" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T170808Z:7ca00455-4eda-4015-97be-ce990c2e1329" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2568/providers/Microsoft.Sql/servers/sqlcrudtest-4090/databases/sqlcrudtest-272/backupShortTermRetentionPolicies/default?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1NjgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MDkwL2RhdGFiYXNlcy9zcWxjcnVkdGVzdC0yNzIvYmFja3VwU2hvcnRUZXJtUmV0ZW50aW9uUG9saWNpZXMvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"retentionDays\": 35\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "53" + ], + "x-ms-client-request-id": [ + "ab581fb5-9cc7-441b-b1fa-dc2cced4e7e6" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.15.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpdateLogicalDatabase\",\r\n \"startTime\": \"2018-05-22T17:08:11.45Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "75" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 17:08:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2568/providers/Microsoft.Sql/locations/northcentralus/shortTermRetentionPolicyOperationResults/fdaf939e-146d-47f0-aebd-1778d8f7aa0c?api-version=2017-10-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2568/providers/Microsoft.Sql/locations/northcentralus/shortTermRetentionPolicyAzureAsyncOperation/fdaf939e-146d-47f0-aebd-1778d8f7aa0c?api-version=2017-10-01-preview" + ], + "x-ms-request-id": [ + "1a1a792a-e332-416a-81f2-e0ccbe8abe9a" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "063664fb-255c-4fd8-ba39-6278e717bf46" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T170811Z:063664fb-255c-4fd8-ba39-6278e717bf46" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2568/providers/Microsoft.Sql/servers/sqlcrudtest-4090/databases/sqlcrudtest-272/backupShortTermRetentionPolicies/default?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1NjgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MDkwL2RhdGFiYXNlcy9zcWxjcnVkdGVzdC0yNzIvYmFja3VwU2hvcnRUZXJtUmV0ZW50aW9uUG9saWNpZXMvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7df3b580-bd73-4349-951d-76789bf1b95f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.15.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"retentionDays\": 8\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2568/providers/Microsoft.Sql/servers/sqlcrudtest-4090/databases/sqlcrudtest-272/backupShortTermRetentionPolicies/default\",\r\n \"name\": \"default\",\r\n \"type\": \"Microsoft.Sql/servers/databases/backupShortTermRetentionPolicies\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 17:08:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "376379a6-6b0e-4a87-8989-77976aeeb810" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "a5a1eda9-de30-4fd0-a858-29cca2e29fe3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T170811Z:a5a1eda9-de30-4fd0-a858-29cca2e29fe3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2568/providers/Microsoft.Sql/servers/sqlcrudtest-4090/databases/sqlcrudtest-272/backupShortTermRetentionPolicies/default?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1NjgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MDkwL2RhdGFiYXNlcy9zcWxjcnVkdGVzdC0yNzIvYmFja3VwU2hvcnRUZXJtUmV0ZW50aW9uUG9saWNpZXMvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1c8d9928-937f-49ac-966d-96db00f8a17f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.15.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"retentionDays\": 35\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2568/providers/Microsoft.Sql/servers/sqlcrudtest-4090/databases/sqlcrudtest-272/backupShortTermRetentionPolicies/default\",\r\n \"name\": \"default\",\r\n \"type\": \"Microsoft.Sql/servers/databases/backupShortTermRetentionPolicies\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 17:08:14 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "d42a9505-3cd3-4d27-bbe2-a20ca1cb4ba5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "22b5ea35-7583-469a-9604-45f722fc3b0c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T170814Z:22b5ea35-7583-469a-9604-45f722fc3b0c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-2568?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTI1Njg/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7d473ddb-d46c-4ad6-afaa-f3c73aaba920" + ], + "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 17:08:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDI1NjgtTk9SVEhDRU5UUkFMVVMiLCJqb2JMb2NhdGlvbiI6Im5vcnRoY2VudHJhbHVzIn0?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "89dcf169-1c49-42c5-9ef2-f364a5887707" + ], + "x-ms-correlation-request-id": [ + "89dcf169-1c49-42c5-9ef2-f364a5887707" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T170816Z:89dcf169-1c49-42c5-9ef2-f364a5887707" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + } + ], + "Names": { + "CreateResourceGroup": [ + "sqlcrudtest-2568" + ], + "CreateServer": [ + "sqlcrudtest-4090" + ], + "TestShortTermRetentionPolicyOnPremium": [ + "sqlcrudtest-272" + ] + }, + "Variables": { + "SubscriptionId": "f28872d6-4a93-4bb1-84b9-aecb02b6af4c", + "DefaultLocation": "north central us" + } +} \ No newline at end of file diff --git a/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.DatabaseVulnerabilityAssessmentScenarioTests/TestCreateUpdateGetDatabaseVulnerabilityAssessments.json b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.DatabaseVulnerabilityAssessmentScenarioTests/TestCreateUpdateGetDatabaseVulnerabilityAssessments.json new file mode 100644 index 0000000000000..51d219ecabe4c --- /dev/null +++ b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.DatabaseVulnerabilityAssessmentScenarioTests/TestCreateUpdateGetDatabaseVulnerabilityAssessments.json @@ -0,0 +1,1427 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-3680?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTM2ODA/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"north central us\",\r\n \"tags\": {\r\n \"sqlcrudtest-3680\": \"2018-05-23 21:20:35Z\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "105" + ], + "x-ms-client-request-id": [ + "96aa28aa-e9e7-445e-ae0a-76ffec7d4962" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680\",\r\n \"name\": \"sqlcrudtest-3680\",\r\n \"location\": \"northcentralus\",\r\n \"tags\": {\r\n \"sqlcrudtest-3680\": \"2018-05-23 21:20:35Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "244" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:20:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "9d354114-8fd6-40b0-9abe-0e4f4944b180" + ], + "x-ms-correlation-request-id": [ + "9d354114-8fd6-40b0-9abe-0e4f4944b180" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212036Z:9d354114-8fd6-40b0-9abe-0e4f4944b180" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Sql/servers/sqlcrudtest-9756?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05NzU2P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "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\": \"north central us\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "190" + ], + "x-ms-client-request-id": [ + "1abeac1d-5edf-4970-ae9f-344dcfc91294" + ], + "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-23T21:20:37.697Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "74" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:20:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Sql/locations/northcentralus/serverOperationResults/405cdb33-20ae-46d8-b3fb-c2d24188c14a?api-version=2015-05-01-preview" + ], + "Retry-After": [ + "1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/405cdb33-20ae-46d8-b3fb-c2d24188c14a?api-version=2015-05-01-preview" + ], + "x-ms-request-id": [ + "405cdb33-20ae-46d8-b3fb-c2d24188c14a" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "7124b0b9-6ccf-4615-87cf-437b886aa986" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212037Z:7124b0b9-6ccf-4615-87cf-437b886aa986" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/405cdb33-20ae-46d8-b3fb-c2d24188c14a?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vNDA1Y2RiMzMtMjBhZS00NmQ4LWIzZmItYzJkMjQxODhjMTRhP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"405cdb33-20ae-46d8-b3fb-c2d24188c14a\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-23T21:20:37.697Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:20:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9ea76e15-6816-4abd-bc4e-ffbdb6a49999" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "b3c08015-8adb-43ef-a6eb-4931b23ff7cb" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212047Z:b3c08015-8adb-43ef-a6eb-4931b23ff7cb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/405cdb33-20ae-46d8-b3fb-c2d24188c14a?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vNDA1Y2RiMzMtMjBhZS00NmQ4LWIzZmItYzJkMjQxODhjMTRhP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"405cdb33-20ae-46d8-b3fb-c2d24188c14a\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-23T21:20:37.697Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:21:07 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ed85a1f6-1e7f-4c5d-bc89-bf3832f72e12" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "6eeb25a6-5c8c-497b-887e-83c9aba1fdd9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212108Z:6eeb25a6-5c8c-497b-887e-83c9aba1fdd9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/405cdb33-20ae-46d8-b3fb-c2d24188c14a?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vNDA1Y2RiMzMtMjBhZS00NmQ4LWIzZmItYzJkMjQxODhjMTRhP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"405cdb33-20ae-46d8-b3fb-c2d24188c14a\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-23T21:20:37.697Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:21:27 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "5fe668c9-63b0-4a91-bfef-3b0c4072b615" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "57e55b9a-e615-46f4-b1f3-76f4869aca47" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212128Z:57e55b9a-e615-46f4-b1f3-76f4869aca47" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Sql/servers/sqlcrudtest-9756?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05NzU2P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "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-9756.database.windows.net\"\r\n },\r\n \"location\": \"northcentralus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Sql/servers/sqlcrudtest-9756\",\r\n \"name\": \"sqlcrudtest-9756\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:21:27 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "150150e6-40f9-4a68-ab50-496ec0a55932" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "087b822e-6c1f-45d4-a0ff-049f2ae2d265" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212128Z:087b822e-6c1f-45d4-a0ff-049f2ae2d265" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Sql/servers/sqlcrudtest-9756/databases/sqlvulnerabilityassessmentcrudtest-762?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05NzU2L2RhdGFiYXNlcy9zcWx2dWxuZXJhYmlsaXR5YXNzZXNzbWVudGNydWR0ZXN0LTc2Mj9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"northcentralus\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "36" + ], + "x-ms-client-request-id": [ + "da77eaad-4ece-4895-976e-ef73a2b67a85" + ], + "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-23T21:21:29.31Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "75" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:21:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Sql/locations/northcentralus/databaseOperationResults/36c0ca6d-1af4-4801-b916-bbc03bc9ff47?api-version=2017-10-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/36c0ca6d-1af4-4801-b916-bbc03bc9ff47?api-version=2017-10-01-preview" + ], + "x-ms-request-id": [ + "21b99879-a25c-451c-b42d-ef966cf070c7" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "9f8c6a37-8ca9-4d5d-a571-d133484e0a0a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212129Z:9f8c6a37-8ca9-4d5d-a571-d133484e0a0a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/36c0ca6d-1af4-4801-b916-bbc03bc9ff47?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi8zNmMwY2E2ZC0xYWY0LTQ4MDEtYjkxNi1iYmMwM2JjOWZmNDc/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"36c0ca6d-1af4-4801-b916-bbc03bc9ff47\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-23T21:21:29.31Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:21:44 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "0e915bcd-f0bf-47ff-80dc-76c3d65194a2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "5aec0241-cb18-492c-aa1e-289962390316" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212144Z:5aec0241-cb18-492c-aa1e-289962390316" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/36c0ca6d-1af4-4801-b916-bbc03bc9ff47?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi8zNmMwY2E2ZC0xYWY0LTQ4MDEtYjkxNi1iYmMwM2JjOWZmNDc/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"36c0ca6d-1af4-4801-b916-bbc03bc9ff47\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-23T21:21:29.31Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:22:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "c705bda4-8756-49c8-9bef-ce5879822ba8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "17e71acc-dada-4d41-8e6c-43c019895339" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212200Z:17e71acc-dada-4d41-8e6c-43c019895339" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/36c0ca6d-1af4-4801-b916-bbc03bc9ff47?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi8zNmMwY2E2ZC0xYWY0LTQ4MDEtYjkxNi1iYmMwM2JjOWZmNDc/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"36c0ca6d-1af4-4801-b916-bbc03bc9ff47\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-23T21:21:29.31Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:22:14 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "a8c4cc04-4837-4690-af8d-a7cd0a8635ac" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "4330ebd6-b9f9-49c2-a8f2-23cd42505873" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212215Z:4330ebd6-b9f9-49c2-a8f2-23cd42505873" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/36c0ca6d-1af4-4801-b916-bbc03bc9ff47?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi8zNmMwY2E2ZC0xYWY0LTQ4MDEtYjkxNi1iYmMwM2JjOWZmNDc/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"36c0ca6d-1af4-4801-b916-bbc03bc9ff47\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-23T21:21:29.31Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:22:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "1ed8fd0a-e323-41fd-b1ee-6dd7ca08deee" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "b57393b0-d233-464b-8970-48df8043a7ce" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212230Z:b57393b0-d233-464b-8970-48df8043a7ce" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Sql/servers/sqlcrudtest-9756/databases/sqlvulnerabilityassessmentcrudtest-762?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05NzU2L2RhdGFiYXNlcy9zcWx2dWxuZXJhYmlsaXR5YXNzZXNzbWVudGNydWR0ZXN0LTc2Mj9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "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\": \"b189744a-acea-4664-94e0-419b9e26fea9\",\r\n \"creationDate\": \"2018-05-23T21:21:29.623Z\",\r\n \"currentServiceObjectiveName\": \"S0\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"defaultSecondaryLocation\": \"South Central US\",\r\n \"catalogCollation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"zoneRedundant\": false,\r\n \"earliestRestoreDate\": \"2018-05-23T21:52:15.703Z\",\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\": \"northcentralus\",\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Sql/servers/sqlcrudtest-9756/databases/sqlvulnerabilityassessmentcrudtest-762\",\r\n \"name\": \"sqlvulnerabilityassessmentcrudtest-762\",\r\n \"type\": \"Microsoft.Sql/servers/databases\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:22:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "2706a8d6-053b-4444-aead-2401f9605a73" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "f0181c22-eb4d-471e-bf4c-b25d287052b6" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212230Z:f0181c22-eb4d-471e-bf4c-b25d287052b6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Sql/servers/sqlcrudtest-9756/databases/sqlvulnerabilityassessmentcrudtest-762/securityAlertPolicies/default?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05NzU2L2RhdGFiYXNlcy9zcWx2dWxuZXJhYmlsaXR5YXNzZXNzbWVudGNydWR0ZXN0LTc2Mi9zZWN1cml0eUFsZXJ0UG9saWNpZXMvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"state\": \"Enabled\",\r\n \"emailAccountAdmins\": \"Enabled\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "90" + ], + "x-ms-client-request-id": [ + "af993ca2-e725-4aa9-b69e-4825431be525" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Sql/servers/sqlcrudtest-9756/databases/sqlvulnerabilityassessmentcrudtest-762/securityAlertPolicies/default\",\r\n \"name\": \"default\",\r\n \"type\": \"Microsoft.Sql/servers/databases/securityAlertPolicies\",\r\n \"location\": null,\r\n \"kind\": null,\r\n \"properties\": {\r\n \"useServerDefault\": null,\r\n \"state\": \"Enabled\",\r\n \"disabledAlerts\": null,\r\n \"emailAddresses\": null,\r\n \"emailAccountAdmins\": \"Enabled\",\r\n \"storageEndpoint\": null,\r\n \"storageAccountAccessKey\": null,\r\n \"retentionDays\": 0\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:22:32 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e895d2a8-ecf9-49d0-8dab-de0d30fdbea0" + ], + "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": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "cc2b4fb5-d9b9-4894-bbc5-f0a4782742a1" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212232Z:cc2b4fb5-d9b9-4894-bbc5-f0a4782742a1" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Sql/servers/sqlcrudtest-9756/databases/sqlvulnerabilityassessmentcrudtest-762/vulnerabilityAssessments/default?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05NzU2L2RhdGFiYXNlcy9zcWx2dWxuZXJhYmlsaXR5YXNzZXNzbWVudGNydWR0ZXN0LTc2Mi92dWxuZXJhYmlsaXR5QXNzZXNzbWVudHMvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6919ef49-b82c-4fa5-a83a-b1ef6a1f47d2" + ], + "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 \"recurringScans\": {\r\n \"isEnabled\": false,\r\n \"emailSubscriptionAdmins\": false\r\n }\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Sql/servers/sqlcrudtest-9756/databases/sqlvulnerabilityassessmentcrudtest-762/vulnerabilityAssessments/Default\",\r\n \"name\": \"Default\",\r\n \"type\": \"Microsoft.Sql/servers/databases/vulnerabilityAssessments\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:22:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "6ab53195-6348-4d61-87ea-04712a749101" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "61f45c80-8694-4529-8c7e-c7f77885ab5b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212233Z:61f45c80-8694-4529-8c7e-c7f77885ab5b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Sql/servers/sqlcrudtest-9756/databases/sqlvulnerabilityassessmentcrudtest-762/vulnerabilityAssessments/default?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05NzU2L2RhdGFiYXNlcy9zcWx2dWxuZXJhYmlsaXR5YXNzZXNzbWVudGNydWR0ZXN0LTc2Mi92dWxuZXJhYmlsaXR5QXNzZXNzbWVudHMvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "aa35a9ed-9e45-4d79-a740-0f40603565f8" + ], + "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 \"storageContainerPath\": \"https://sqlvatest2547.blob.core.windows.net/vulnerability-assessment/\",\r\n \"recurringScans\": {\r\n \"isEnabled\": false,\r\n \"emailSubscriptionAdmins\": true,\r\n \"emails\": [\r\n \"fakemail1@mail.com\",\r\n \"fakemail2@mail.com\"\r\n ]\r\n }\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Sql/servers/sqlcrudtest-9756/databases/sqlvulnerabilityassessmentcrudtest-762/vulnerabilityAssessments/Default\",\r\n \"name\": \"Default\",\r\n \"type\": \"Microsoft.Sql/servers/databases/vulnerabilityAssessments\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:23:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "0e513b38-6475-4e8c-86b4-8ce0aba2c1e0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "8007f12d-e6ab-4933-a5a9-a938773899a9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212301Z:8007f12d-e6ab-4933-a5a9-a938773899a9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Sql/servers/sqlcrudtest-9756/databases/sqlvulnerabilityassessmentcrudtest-762/vulnerabilityAssessments/default?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05NzU2L2RhdGFiYXNlcy9zcWx2dWxuZXJhYmlsaXR5YXNzZXNzbWVudGNydWR0ZXN0LTc2Mi92dWxuZXJhYmlsaXR5QXNzZXNzbWVudHMvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f88754b1-bfbe-4194-bb09-8f36ed1e4e31" + ], + "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 \"recurringScans\": {\r\n \"isEnabled\": false,\r\n \"emailSubscriptionAdmins\": false\r\n }\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Sql/servers/sqlcrudtest-9756/databases/sqlvulnerabilityassessmentcrudtest-762/vulnerabilityAssessments/Default\",\r\n \"name\": \"Default\",\r\n \"type\": \"Microsoft.Sql/servers/databases/vulnerabilityAssessments\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:23:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f30f6139-b00e-4b3c-90cb-1b92aef4b6dc" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "6787f37b-8143-4fef-9c32-4752a847f786" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212302Z:6787f37b-8143-4fef-9c32-4752a847f786" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Storage/storageAccounts/sqlvatest2547?api-version=2017-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9zcWx2YXRlc3QyNTQ3P2FwaS12ZXJzaW9uPTIwMTctMDYtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_LRS\"\r\n },\r\n \"kind\": \"BlobStorage\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"accessTier\": \"Cool\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "159" + ], + "x-ms-client-request-id": [ + "523892ca-8d48-465a-9066-d459c608b863" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Storage.StorageManagementClient/6.5.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Content-Type": [ + "text/plain; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:22:34 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/providers/Microsoft.Storage/locations/northcentralus/asyncoperations/7c430a40-05ea-48ea-b624-676fa1862bc1?monitor=true&api-version=2017-06-01" + ], + "Retry-After": [ + "17" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "7c430a40-05ea-48ea-b624-676fa1862bc1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "18051a81-d2e7-4b56-bd94-e466279afeeb" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212234Z:18051a81-d2e7-4b56-bd94-e466279afeeb" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/providers/Microsoft.Storage/locations/northcentralus/asyncoperations/7c430a40-05ea-48ea-b624-676fa1862bc1?monitor=true&api-version=2017-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Byb3ZpZGVycy9NaWNyb3NvZnQuU3RvcmFnZS9sb2NhdGlvbnMvbm9ydGhjZW50cmFsdXMvYXN5bmNvcGVyYXRpb25zLzdjNDMwYTQwLTA1ZWEtNDhlYS1iNjI0LTY3NmZhMTg2MmJjMT9tb25pdG9yPXRydWUmYXBpLXZlcnNpb249MjAxNy0wNi0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Storage.StorageManagementClient/6.5.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_LRS\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"kind\": \"BlobStorage\",\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Storage/storageAccounts/sqlvatest2547\",\r\n \"name\": \"sqlvatest2547\",\r\n \"type\": \"Microsoft.Storage/storageAccounts\",\r\n \"location\": \"northcentralus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"networkAcls\": {\r\n \"bypass\": \"AzureServices\",\r\n \"virtualNetworkRules\": [],\r\n \"ipRules\": [],\r\n \"defaultAction\": \"Allow\"\r\n },\r\n \"trustedDirectories\": [\r\n \"4c8f1d26-c1d3-40f7-a12b-4d72de2a6d3c\"\r\n ],\r\n \"supportsHttpsTrafficOnly\": false,\r\n \"encryption\": {\r\n \"services\": {\r\n \"file\": {\r\n \"enabled\": true,\r\n \"lastEnabledTime\": \"2018-05-23T21:22:34.6187906Z\"\r\n },\r\n \"blob\": {\r\n \"enabled\": true,\r\n \"lastEnabledTime\": \"2018-05-23T21:22:34.6187906Z\"\r\n }\r\n },\r\n \"keySource\": \"Microsoft.Storage\"\r\n },\r\n \"accessTier\": \"Cool\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"2018-05-23T21:22:34.5563402Z\",\r\n \"primaryEndpoints\": {\r\n \"blob\": \"https://sqlvatest2547.blob.core.windows.net/\",\r\n \"table\": \"https://sqlvatest2547.table.core.windows.net/\"\r\n },\r\n \"primaryLocation\": \"northcentralus\",\r\n \"statusOfPrimary\": \"available\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:22:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f64de535-7fcc-4487-bf1b-c695585e3d00" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "903a7155-2b05-4c7e-84f1-6f225d8106f4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212252Z:903a7155-2b05-4c7e-84f1-6f225d8106f4" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Storage/storageAccounts/sqlvatest2547/listKeys?api-version=2017-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9zcWx2YXRlc3QyNTQ3L2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTctMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4652b8bf-46cd-4772-8da0-7631e5037364" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Storage.StorageManagementClient/6.5.0.0" + ] + }, + "ResponseBody": "{\r\n \"keys\": [\r\n {\r\n \"keyName\": \"key1\",\r\n \"value\": \"6abnQpE5nNmyd6ClAIi68a0qcBuOa3u6yu9xQMARsAEZlLbOf3/zva3Pd0EzBUTb8keWX9S6X5wZdzNDiZTjOg==\",\r\n \"permissions\": \"FULL\"\r\n },\r\n {\r\n \"keyName\": \"key2\",\r\n \"value\": \"f5Y057ify0urMIYK8YqlkK+Wp//K9vRRq8dSwPxnxl8F/TE1jegCC9H5mNbegyWhk8kbmOdljBRaLSSvxIaUFA==\",\r\n \"permissions\": \"FULL\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:22:52 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "63842716-0bef-4b95-b75c-313bc99be735" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "aa337d66-d067-40c9-94b9-294ab5136d25" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212252Z:aa337d66-d067-40c9-94b9-294ab5136d25" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Sql/servers/sqlcrudtest-9756/databases/sqlvulnerabilityassessmentcrudtest-762/vulnerabilityAssessments/default?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05NzU2L2RhdGFiYXNlcy9zcWx2dWxuZXJhYmlsaXR5YXNzZXNzbWVudGNydWR0ZXN0LTc2Mi92dWxuZXJhYmlsaXR5QXNzZXNzbWVudHMvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"storageContainerPath\": \"https://sqlvatest2547.blob.core.windows.net/vulnerability-assessment\",\r\n \"storageContainerSasKey\": \"?sv=2016-05-31&sr=c&sig=gZGeD%2FHmhxkMUl3jPNX%2FrpX88xcurHc8tFnkK3BeE4M%3D&se=2018-05-23T22%3A22%3A52Z&sp=rwl\",\r\n \"recurringScans\": {\r\n \"isEnabled\": false,\r\n \"emailSubscriptionAdmins\": true,\r\n \"emails\": [\r\n \"fakemail1@mail.com\",\r\n \"fakemail2@mail.com\"\r\n ]\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "461" + ], + "x-ms-client-request-id": [ + "5786c91e-66a6-4837-9dab-72683a0b38ae" + ], + "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 \"storageContainerPath\": \"https://sqlvatest2547.blob.core.windows.net/vulnerability-assessment/\",\r\n \"recurringScans\": {\r\n \"isEnabled\": false,\r\n \"emailSubscriptionAdmins\": true,\r\n \"emails\": [\r\n \"fakemail1@mail.com\",\r\n \"fakemail2@mail.com\"\r\n ]\r\n }\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Sql/servers/sqlcrudtest-9756/databases/sqlvulnerabilityassessmentcrudtest-762/vulnerabilityAssessments/Default\",\r\n \"name\": \"Default\",\r\n \"type\": \"Microsoft.Sql/servers/databases/vulnerabilityAssessments\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:23:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "1cbfe770-e01c-4863-8c2d-3f371a1500b5" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "cb3e5d78-569d-4aa6-9dda-1594c7daa5b1" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212301Z:cb3e5d78-569d-4aa6-9dda-1594c7daa5b1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-3680/providers/Microsoft.Sql/servers/sqlcrudtest-9756/databases/sqlvulnerabilityassessmentcrudtest-762/vulnerabilityAssessments/default?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC05NzU2L2RhdGFiYXNlcy9zcWx2dWxuZXJhYmlsaXR5YXNzZXNzbWVudGNydWR0ZXN0LTc2Mi92dWxuZXJhYmlsaXR5QXNzZXNzbWVudHMvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9fecc4f9-7155-4ed7-9ac9-ac1d93c988b0" + ], + "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": [ + "Wed, 23 May 2018 21:23:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "32dfec22-6d50-40f5-b584-b1e160fa3f7c" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "e7d98a20-2211-467f-a8cd-bf59b5fd731f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212302Z:e7d98a20-2211-467f-a8cd-bf59b5fd731f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-3680?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTM2ODA/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ad2c6b8f-7e0d-45d6-a116-e861887bb07c" + ], + "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": [ + "Wed, 23 May 2018 21:23:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDM2ODAtTk9SVEhDRU5UUkFMVVMiLCJqb2JMb2NhdGlvbiI6Im5vcnRoY2VudHJhbHVzIn0?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "4c2c7470-b851-4fc4-b339-edf71c9a6f07" + ], + "x-ms-correlation-request-id": [ + "4c2c7470-b851-4fc4-b339-edf71c9a6f07" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212303Z:4c2c7470-b851-4fc4-b339-edf71c9a6f07" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + } + ], + "Names": { + "CreateResourceGroup": [ + "sqlcrudtest-3680" + ], + "CreateServer": [ + "sqlcrudtest-9756" + ], + "TestCreateUpdateGetDatabaseVulnerabilityAssessments": [ + "sqlvulnerabilityassessmentcrudtest-762" + ], + "CreateStorageContainer": [ + "sqlvatest2547" + ] + }, + "Variables": { + "DefaultLocation": "north central us", + "SubscriptionId": "f28872d6-4a93-4bb1-84b9-aecb02b6af4c" + } +} \ No newline at end of file diff --git a/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.DatabaseVulnerabilityAssessmentScenarioTests/TestCreateUpdateGetDeleteDatabaseVulnerabilityAssessmentBaselines.json b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.DatabaseVulnerabilityAssessmentScenarioTests/TestCreateUpdateGetDeleteDatabaseVulnerabilityAssessmentBaselines.json new file mode 100644 index 0000000000000..ab3bdbf1403d3 --- /dev/null +++ b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.DatabaseVulnerabilityAssessmentScenarioTests/TestCreateUpdateGetDeleteDatabaseVulnerabilityAssessmentBaselines.json @@ -0,0 +1,1369 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-6395?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTYzOTU/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"north central us\",\r\n \"tags\": {\r\n \"sqlcrudtest-6395\": \"2018-05-23 21:17:53Z\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "105" + ], + "x-ms-client-request-id": [ + "bd9b0c0c-8a40-4af4-b887-ea34f5e9f752" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6395\",\r\n \"name\": \"sqlcrudtest-6395\",\r\n \"location\": \"northcentralus\",\r\n \"tags\": {\r\n \"sqlcrudtest-6395\": \"2018-05-23 21:17:53Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "244" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:17:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "44ffe9dc-ee71-4dcc-b23a-be146c02f5b7" + ], + "x-ms-correlation-request-id": [ + "44ffe9dc-ee71-4dcc-b23a-be146c02f5b7" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T211756Z:44ffe9dc-ee71-4dcc-b23a-be146c02f5b7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6395/providers/Microsoft.Sql/servers/sqlcrudtest-3591?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYzOTUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0zNTkxP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "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\": \"north central us\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "190" + ], + "x-ms-client-request-id": [ + "3c4a6924-6d1b-4e0f-88c5-2261c3e5c279" + ], + "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-23T21:17:57.843Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "74" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:17:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6395/providers/Microsoft.Sql/locations/northcentralus/serverOperationResults/07621ec3-6b6c-4a63-9e12-3930f81e5746?api-version=2015-05-01-preview" + ], + "Retry-After": [ + "1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6395/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/07621ec3-6b6c-4a63-9e12-3930f81e5746?api-version=2015-05-01-preview" + ], + "x-ms-request-id": [ + "07621ec3-6b6c-4a63-9e12-3930f81e5746" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "63e5b33a-e809-4017-8379-442274b71621" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T211757Z:63e5b33a-e809-4017-8379-442274b71621" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6395/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/07621ec3-6b6c-4a63-9e12-3930f81e5746?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYzOTUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vMDc2MjFlYzMtNmI2Yy00YTYzLTllMTItMzkzMGY4MWU1NzQ2P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"07621ec3-6b6c-4a63-9e12-3930f81e5746\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-23T21:17:57.843Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:18:07 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "22fe64a1-c22b-4af7-a605-ba03eea6f7f3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "f72bd8f3-4dd8-4ad7-bb35-4505c9c6bcf2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T211808Z:f72bd8f3-4dd8-4ad7-bb35-4505c9c6bcf2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6395/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/07621ec3-6b6c-4a63-9e12-3930f81e5746?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYzOTUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vMDc2MjFlYzMtNmI2Yy00YTYzLTllMTItMzkzMGY4MWU1NzQ2P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"07621ec3-6b6c-4a63-9e12-3930f81e5746\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-23T21:17:57.843Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:18:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "d40ee71d-5dd2-4284-8a31-b5fadacf4156" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "f167109e-5d55-4ccd-b95d-94b8d6811b3e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T211828Z:f167109e-5d55-4ccd-b95d-94b8d6811b3e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6395/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/07621ec3-6b6c-4a63-9e12-3930f81e5746?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYzOTUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vMDc2MjFlYzMtNmI2Yy00YTYzLTllMTItMzkzMGY4MWU1NzQ2P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"07621ec3-6b6c-4a63-9e12-3930f81e5746\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-23T21:17:57.843Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:18:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "a09d75b8-0a87-4aa3-aa5e-cd05fd244b60" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "ba5aa329-6b3f-441b-9f47-5188a03e516c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T211848Z:ba5aa329-6b3f-441b-9f47-5188a03e516c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6395/providers/Microsoft.Sql/servers/sqlcrudtest-3591?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYzOTUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0zNTkxP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "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-3591.database.windows.net\"\r\n },\r\n \"location\": \"northcentralus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6395/providers/Microsoft.Sql/servers/sqlcrudtest-3591\",\r\n \"name\": \"sqlcrudtest-3591\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:18:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "3d559515-a2c1-4c56-9ae6-b77b4a8b5121" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "ef37d577-57d8-4cfc-a799-bbcb24f0f047" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T211848Z:ef37d577-57d8-4cfc-a799-bbcb24f0f047" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6395/providers/Microsoft.Sql/servers/sqlcrudtest-3591/databases/sqlvulnerabilityassessmentbaselinetest-8774?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYzOTUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0zNTkxL2RhdGFiYXNlcy9zcWx2dWxuZXJhYmlsaXR5YXNzZXNzbWVudGJhc2VsaW5ldGVzdC04Nzc0P2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"northcentralus\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "36" + ], + "x-ms-client-request-id": [ + "e690b642-51be-4710-8d92-7cb5478f5cd5" + ], + "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-23T21:18:49.9Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "74" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:18:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6395/providers/Microsoft.Sql/locations/northcentralus/databaseOperationResults/95209c5c-2358-46dd-ab2a-0525f7f7dbfa?api-version=2017-10-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6395/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/95209c5c-2358-46dd-ab2a-0525f7f7dbfa?api-version=2017-10-01-preview" + ], + "x-ms-request-id": [ + "2418c909-ed1f-41c1-83f1-ce0bdd747db3" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "63e58b58-5c6d-422c-bc0a-34556b2a7773" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T211849Z:63e58b58-5c6d-422c-bc0a-34556b2a7773" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6395/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/95209c5c-2358-46dd-ab2a-0525f7f7dbfa?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYzOTUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi85NTIwOWM1Yy0yMzU4LTQ2ZGQtYWIyYS0wNTI1ZjdmN2RiZmE/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"95209c5c-2358-46dd-ab2a-0525f7f7dbfa\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-23T21:18:49.9Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:19:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "83e3df04-fdef-4616-970f-d60ab66604c6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "c26331fe-dfba-483e-b237-592534f3696b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T211905Z:c26331fe-dfba-483e-b237-592534f3696b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6395/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/95209c5c-2358-46dd-ab2a-0525f7f7dbfa?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYzOTUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi85NTIwOWM1Yy0yMzU4LTQ2ZGQtYWIyYS0wNTI1ZjdmN2RiZmE/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"95209c5c-2358-46dd-ab2a-0525f7f7dbfa\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-23T21:18:49.9Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:19:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "05735ccc-9571-4e7d-b515-ffeec30bcb1a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "19c2f832-c808-4057-a0b3-2708e96e8397" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T211920Z:19c2f832-c808-4057-a0b3-2708e96e8397" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6395/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/95209c5c-2358-46dd-ab2a-0525f7f7dbfa?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYzOTUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi85NTIwOWM1Yy0yMzU4LTQ2ZGQtYWIyYS0wNTI1ZjdmN2RiZmE/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"95209c5c-2358-46dd-ab2a-0525f7f7dbfa\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-23T21:18:49.9Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:19:34 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7139f69e-c792-49f1-961e-01364799e839" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "bab4e016-99dd-4fc3-93aa-8568c3b1e06c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T211935Z:bab4e016-99dd-4fc3-93aa-8568c3b1e06c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6395/providers/Microsoft.Sql/servers/sqlcrudtest-3591/databases/sqlvulnerabilityassessmentbaselinetest-8774?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYzOTUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0zNTkxL2RhdGFiYXNlcy9zcWx2dWxuZXJhYmlsaXR5YXNzZXNzbWVudGJhc2VsaW5ldGVzdC04Nzc0P2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "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\": \"8c2bcd14-1da1-4f88-b5e0-13d2795f0007\",\r\n \"creationDate\": \"2018-05-23T21:18:50.163Z\",\r\n \"currentServiceObjectiveName\": \"S0\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"defaultSecondaryLocation\": \"South Central US\",\r\n \"catalogCollation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"zoneRedundant\": false,\r\n \"earliestRestoreDate\": \"2018-05-23T21:49:34.727Z\",\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\": \"northcentralus\",\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6395/providers/Microsoft.Sql/servers/sqlcrudtest-3591/databases/sqlvulnerabilityassessmentbaselinetest-8774\",\r\n \"name\": \"sqlvulnerabilityassessmentbaselinetest-8774\",\r\n \"type\": \"Microsoft.Sql/servers/databases\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:19:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b3c90876-a6d6-463c-a848-02e7bc8743b3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "cc0c2e73-ac07-4c83-a773-e63b80791211" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T211935Z:cc0c2e73-ac07-4c83-a773-e63b80791211" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6395/providers/Microsoft.Sql/servers/sqlcrudtest-3591/databases/sqlvulnerabilityassessmentbaselinetest-8774/securityAlertPolicies/default?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYzOTUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0zNTkxL2RhdGFiYXNlcy9zcWx2dWxuZXJhYmlsaXR5YXNzZXNzbWVudGJhc2VsaW5ldGVzdC04Nzc0L3NlY3VyaXR5QWxlcnRQb2xpY2llcy9kZWZhdWx0P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"state\": \"Enabled\",\r\n \"emailAccountAdmins\": \"Enabled\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "90" + ], + "x-ms-client-request-id": [ + "5c20cda2-6aad-4bc3-ba83-1ebc159546cc" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6395/providers/Microsoft.Sql/servers/sqlcrudtest-3591/databases/sqlvulnerabilityassessmentbaselinetest-8774/securityAlertPolicies/default\",\r\n \"name\": \"default\",\r\n \"type\": \"Microsoft.Sql/servers/databases/securityAlertPolicies\",\r\n \"location\": null,\r\n \"kind\": null,\r\n \"properties\": {\r\n \"useServerDefault\": null,\r\n \"state\": \"Enabled\",\r\n \"disabledAlerts\": null,\r\n \"emailAddresses\": null,\r\n \"emailAccountAdmins\": \"Enabled\",\r\n \"storageEndpoint\": null,\r\n \"storageAccountAccessKey\": null,\r\n \"retentionDays\": 0\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:19:37 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9823c33c-a320-4f1a-a878-fb27f85986fd" + ], + "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": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "e91b5a05-7db7-4fe4-a8ad-606ddeedc50f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T211938Z:e91b5a05-7db7-4fe4-a8ad-606ddeedc50f" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6395/providers/Microsoft.Storage/storageAccounts/sqlvatest5208?api-version=2017-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYzOTUvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9zcWx2YXRlc3Q1MjA4P2FwaS12ZXJzaW9uPTIwMTctMDYtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_LRS\"\r\n },\r\n \"kind\": \"BlobStorage\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"accessTier\": \"Cool\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "159" + ], + "x-ms-client-request-id": [ + "4ada3cbb-0a92-4e48-bfb5-bca0136f2378" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Storage.StorageManagementClient/6.5.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Content-Type": [ + "text/plain; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:19:39 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/providers/Microsoft.Storage/locations/northcentralus/asyncoperations/55dfdf62-a13b-4d4e-8358-801a349520ef?monitor=true&api-version=2017-06-01" + ], + "Retry-After": [ + "17" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "55dfdf62-a13b-4d4e-8358-801a349520ef" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "a51c485b-1675-43b0-92e0-01b8dee57e19" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T211940Z:a51c485b-1675-43b0-92e0-01b8dee57e19" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/providers/Microsoft.Storage/locations/northcentralus/asyncoperations/55dfdf62-a13b-4d4e-8358-801a349520ef?monitor=true&api-version=2017-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Byb3ZpZGVycy9NaWNyb3NvZnQuU3RvcmFnZS9sb2NhdGlvbnMvbm9ydGhjZW50cmFsdXMvYXN5bmNvcGVyYXRpb25zLzU1ZGZkZjYyLWExM2ItNGQ0ZS04MzU4LTgwMWEzNDk1MjBlZj9tb25pdG9yPXRydWUmYXBpLXZlcnNpb249MjAxNy0wNi0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Storage.StorageManagementClient/6.5.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_LRS\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"kind\": \"BlobStorage\",\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6395/providers/Microsoft.Storage/storageAccounts/sqlvatest5208\",\r\n \"name\": \"sqlvatest5208\",\r\n \"type\": \"Microsoft.Storage/storageAccounts\",\r\n \"location\": \"northcentralus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"networkAcls\": {\r\n \"bypass\": \"AzureServices\",\r\n \"virtualNetworkRules\": [],\r\n \"ipRules\": [],\r\n \"defaultAction\": \"Allow\"\r\n },\r\n \"trustedDirectories\": [\r\n \"4c8f1d26-c1d3-40f7-a12b-4d72de2a6d3c\"\r\n ],\r\n \"supportsHttpsTrafficOnly\": false,\r\n \"encryption\": {\r\n \"services\": {\r\n \"file\": {\r\n \"enabled\": true,\r\n \"lastEnabledTime\": \"2018-05-23T21:19:40.365097Z\"\r\n },\r\n \"blob\": {\r\n \"enabled\": true,\r\n \"lastEnabledTime\": \"2018-05-23T21:19:40.365097Z\"\r\n }\r\n },\r\n \"keySource\": \"Microsoft.Storage\"\r\n },\r\n \"accessTier\": \"Cool\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"2018-05-23T21:19:40.3182215Z\",\r\n \"primaryEndpoints\": {\r\n \"blob\": \"https://sqlvatest5208.blob.core.windows.net/\",\r\n \"table\": \"https://sqlvatest5208.table.core.windows.net/\"\r\n },\r\n \"primaryLocation\": \"northcentralus\",\r\n \"statusOfPrimary\": \"available\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:19:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "369f9b5e-ee49-4965-b5f7-b1d11bac2001" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "61fa7611-5656-41e0-ac33-2185602a8ae2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T211957Z:61fa7611-5656-41e0-ac33-2185602a8ae2" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6395/providers/Microsoft.Storage/storageAccounts/sqlvatest5208/listKeys?api-version=2017-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYzOTUvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9zcWx2YXRlc3Q1MjA4L2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTctMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "51dc7603-3e98-484a-939d-0d0ab9dddd51" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Storage.StorageManagementClient/6.5.0.0" + ] + }, + "ResponseBody": "{\r\n \"keys\": [\r\n {\r\n \"keyName\": \"key1\",\r\n \"value\": \"nghA43aCCrot1Md8qmABByITrig33Gpg5M4y4gc9CLdGDRcbjcD2nLo9fxHFWIAgxH2OGsE70SM6WfLXQdcA3Q==\",\r\n \"permissions\": \"FULL\"\r\n },\r\n {\r\n \"keyName\": \"key2\",\r\n \"value\": \"CxRheYt4mRaNFFyRXTqWN3bFMqW09Q7+CNaj+T1oUkgDWHs1GAQAaWM0LUUtOlVC9RjkPHaFle2r0JZQ1cxc1w==\",\r\n \"permissions\": \"FULL\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:19:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f953500c-8b13-49b6-82b8-98bb9dc4a54b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "bbe12c87-a155-4286-912f-62662d531ea8" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T211958Z:bbe12c87-a155-4286-912f-62662d531ea8" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6395/providers/Microsoft.Sql/servers/sqlcrudtest-3591/databases/sqlvulnerabilityassessmentbaselinetest-8774/vulnerabilityAssessments/default?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYzOTUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0zNTkxL2RhdGFiYXNlcy9zcWx2dWxuZXJhYmlsaXR5YXNzZXNzbWVudGJhc2VsaW5ldGVzdC04Nzc0L3Z1bG5lcmFiaWxpdHlBc3Nlc3NtZW50cy9kZWZhdWx0P2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"storageContainerPath\": \"https://sqlvatest5208.blob.core.windows.net/vulnerability-assessment\",\r\n \"storageContainerSasKey\": \"?sv=2016-05-31&sr=c&sig=BGiW%2BaCN3RBfdxVfGPDESHX6wGTWKHmMItut5pUVKhU%3D&se=2018-05-23T22%3A19%3A58Z&sp=rwl\",\r\n \"recurringScans\": {\r\n \"isEnabled\": false,\r\n \"emailSubscriptionAdmins\": true,\r\n \"emails\": [\r\n \"fakemail1@mail.com\",\r\n \"fakemail2@mail.com\"\r\n ]\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "459" + ], + "x-ms-client-request-id": [ + "9010d9a9-6a9d-407b-b59b-3097cb5ba53e" + ], + "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 \"storageContainerPath\": \"https://sqlvatest5208.blob.core.windows.net/vulnerability-assessment/\",\r\n \"recurringScans\": {\r\n \"isEnabled\": false,\r\n \"emailSubscriptionAdmins\": true,\r\n \"emails\": [\r\n \"fakemail1@mail.com\",\r\n \"fakemail2@mail.com\"\r\n ]\r\n }\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6395/providers/Microsoft.Sql/servers/sqlcrudtest-3591/databases/sqlvulnerabilityassessmentbaselinetest-8774/vulnerabilityAssessments/Default\",\r\n \"name\": \"Default\",\r\n \"type\": \"Microsoft.Sql/servers/databases/vulnerabilityAssessments\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:20:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "c2e2c9a7-517c-425f-b3a9-c26b4c04f8c9" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "d24503b5-6945-4bf7-9cd9-26c12618da31" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212006Z:d24503b5-6945-4bf7-9cd9-26c12618da31" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6395/providers/Microsoft.Sql/servers/sqlcrudtest-3591/databases/sqlvulnerabilityassessmentbaselinetest-8774/vulnerabilityAssessments/default/rules/VA2031/baselines/default?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYzOTUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0zNTkxL2RhdGFiYXNlcy9zcWx2dWxuZXJhYmlsaXR5YXNzZXNzbWVudGJhc2VsaW5ldGVzdC04Nzc0L3Z1bG5lcmFiaWxpdHlBc3Nlc3NtZW50cy9kZWZhdWx0L3J1bGVzL1ZBMjAzMS9iYXNlbGluZXMvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"baselineResults\": [\r\n {\r\n \"result\": [\r\n \"userA\",\r\n \"SELECT\"\r\n ]\r\n },\r\n {\r\n \"result\": [\r\n \"userB\",\r\n \"SELECT\"\r\n ]\r\n }\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "242" + ], + "x-ms-client-request-id": [ + "da9e707e-30c2-419e-ba98-aa8eb37bf3c1" + ], + "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 \"baselineResults\": [\r\n {\r\n \"result\": [\r\n \"userA\",\r\n \"SELECT\"\r\n ]\r\n },\r\n {\r\n \"result\": [\r\n \"userB\",\r\n \"SELECT\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6395/providers/Microsoft.Sql/servers/sqlcrudtest-3591/databases/sqlvulnerabilityassessmentbaselinetest-8774/vulnerabilityAssessments/Default/rules/VA2031/baselines/Default\",\r\n \"name\": \"Default\",\r\n \"type\": \"Microsoft.Sql/servers/databases/vulnerabilityAssessments/rules/baselines\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:20:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "8e424636-5d3a-40c2-a1f1-491778e5192c" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "2f365487-aa75-43f8-9fbc-96267690ec77" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212029Z:2f365487-aa75-43f8-9fbc-96267690ec77" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6395/providers/Microsoft.Sql/servers/sqlcrudtest-3591/databases/sqlvulnerabilityassessmentbaselinetest-8774/vulnerabilityAssessments/default/rules/VA2031/baselines/default?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYzOTUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0zNTkxL2RhdGFiYXNlcy9zcWx2dWxuZXJhYmlsaXR5YXNzZXNzbWVudGJhc2VsaW5ldGVzdC04Nzc0L3Z1bG5lcmFiaWxpdHlBc3Nlc3NtZW50cy9kZWZhdWx0L3J1bGVzL1ZBMjAzMS9iYXNlbGluZXMvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5c6c305a-a89c-4bd0-966e-d07ceb994117" + ], + "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 \"baselineResults\": [\r\n {\r\n \"result\": [\r\n \"userA\",\r\n \"SELECT\"\r\n ]\r\n },\r\n {\r\n \"result\": [\r\n \"userB\",\r\n \"SELECT\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6395/providers/Microsoft.Sql/servers/sqlcrudtest-3591/databases/sqlvulnerabilityassessmentbaselinetest-8774/vulnerabilityAssessments/Default/rules/VA2031/baselines/Default\",\r\n \"name\": \"Default\",\r\n \"type\": \"Microsoft.Sql/servers/databases/vulnerabilityAssessments/rules/baselines\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:20:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "83d784f2-03af-4269-9063-5d88697fbaf3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "4f93ca02-9fbc-445b-b121-339f0e1cde10" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212030Z:4f93ca02-9fbc-445b-b121-339f0e1cde10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6395/providers/Microsoft.Sql/servers/sqlcrudtest-3591/databases/sqlvulnerabilityassessmentbaselinetest-8774/vulnerabilityAssessments/default/rules/VA2031/baselines/default?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYzOTUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0zNTkxL2RhdGFiYXNlcy9zcWx2dWxuZXJhYmlsaXR5YXNzZXNzbWVudGJhc2VsaW5ldGVzdC04Nzc0L3Z1bG5lcmFiaWxpdHlBc3Nlc3NtZW50cy9kZWZhdWx0L3J1bGVzL1ZBMjAzMS9iYXNlbGluZXMvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "be79d833-8f89-43a3-b387-a9d281d653bf" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"VulnerabilityAssessmentBaselineDoesNotExists\",\r\n \"message\": \"Baseline does not exist for rule 'VA2031'\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "119" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:20:31 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "c3fbf8b2-2089-4d88-ad4e-5ae7b09e967f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "d4ad3e05-9631-4171-a889-f78cc1a8da2b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212032Z:d4ad3e05-9631-4171-a889-f78cc1a8da2b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6395/providers/Microsoft.Sql/servers/sqlcrudtest-3591/databases/sqlvulnerabilityassessmentbaselinetest-8774/vulnerabilityAssessments/default/rules/VA2031/baselines/default?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTYzOTUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0zNTkxL2RhdGFiYXNlcy9zcWx2dWxuZXJhYmlsaXR5YXNzZXNzbWVudGJhc2VsaW5ldGVzdC04Nzc0L3Z1bG5lcmFiaWxpdHlBc3Nlc3NtZW50cy9kZWZhdWx0L3J1bGVzL1ZBMjAzMS9iYXNlbGluZXMvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "632a07c1-eec4-47b7-a426-abbbed3d1833" + ], + "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": [ + "Wed, 23 May 2018 21:20:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "485810dc-4407-43e4-a543-1a8a0d68fd4c" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "2b66e871-8c23-4087-a320-c482f2850948" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212031Z:2b66e871-8c23-4087-a320-c482f2850948" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-6395?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTYzOTU/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "10c77dbb-d227-4de9-bf57-e13c0ca59d7f" + ], + "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": [ + "Wed, 23 May 2018 21:20:33 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDYzOTUtTk9SVEhDRU5UUkFMVVMiLCJqb2JMb2NhdGlvbiI6Im5vcnRoY2VudHJhbHVzIn0?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "28651307-6041-4417-8ca7-8a5c1ef7596a" + ], + "x-ms-correlation-request-id": [ + "28651307-6041-4417-8ca7-8a5c1ef7596a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212033Z:28651307-6041-4417-8ca7-8a5c1ef7596a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + } + ], + "Names": { + "CreateResourceGroup": [ + "sqlcrudtest-6395" + ], + "CreateServer": [ + "sqlcrudtest-3591" + ], + "TestCreateUpdateGetDeleteDatabaseVulnerabilityAssessmentBaselines": [ + "sqlvulnerabilityassessmentbaselinetest-8774" + ], + "CreateStorageContainer": [ + "sqlvatest5208" + ] + }, + "Variables": { + "SubscriptionId": "f28872d6-4a93-4bb1-84b9-aecb02b6af4c", + "DefaultLocation": "north central us" + } +} \ No newline at end of file diff --git a/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.DatabaseVulnerabilityAssessmentScenarioTests/TestExecuteGetListDatabaseVulnerabilityAssessmentScans.json b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.DatabaseVulnerabilityAssessmentScenarioTests/TestExecuteGetListDatabaseVulnerabilityAssessmentScans.json new file mode 100644 index 0000000000000..48ed93ba70d2c --- /dev/null +++ b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.DatabaseVulnerabilityAssessmentScenarioTests/TestExecuteGetListDatabaseVulnerabilityAssessmentScans.json @@ -0,0 +1,1863 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-6730?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTY3MzA/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"north central us\",\r\n \"tags\": {\r\n \"sqlcrudtest-6730\": \"2018-05-23 21:29:02Z\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "105" + ], + "x-ms-client-request-id": [ + "aac552c7-c5e8-41e6-94fa-737833770a95" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730\",\r\n \"name\": \"sqlcrudtest-6730\",\r\n \"location\": \"northcentralus\",\r\n \"tags\": {\r\n \"sqlcrudtest-6730\": \"2018-05-23 21:29:02Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "244" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:29:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "194d9bdd-5d31-4a1f-b7ee-ab72212a15ac" + ], + "x-ms-correlation-request-id": [ + "194d9bdd-5d31-4a1f-b7ee-ab72212a15ac" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212904Z:194d9bdd-5d31-4a1f-b7ee-ab72212a15ac" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/sqlcrudtest-1876?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY3MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xODc2P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "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\": \"north central us\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "190" + ], + "x-ms-client-request-id": [ + "37f0e05c-388c-4780-876c-64553e4754e2" + ], + "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-23T21:29:05.727Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "74" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:29:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/locations/northcentralus/serverOperationResults/e0ab367d-4086-4161-8187-bd391a1daa62?api-version=2015-05-01-preview" + ], + "Retry-After": [ + "1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/e0ab367d-4086-4161-8187-bd391a1daa62?api-version=2015-05-01-preview" + ], + "x-ms-request-id": [ + "e0ab367d-4086-4161-8187-bd391a1daa62" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "b0d6ce7a-197f-4ef9-957d-b52b254eb23b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212906Z:b0d6ce7a-197f-4ef9-957d-b52b254eb23b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/e0ab367d-4086-4161-8187-bd391a1daa62?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY3MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vZTBhYjM2N2QtNDA4Ni00MTYxLTgxODctYmQzOTFhMWRhYTYyP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"e0ab367d-4086-4161-8187-bd391a1daa62\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-23T21:29:05.727Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:29:16 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "3b18a344-5f49-4d7c-870a-67c16cc17de5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "d3cbf4e3-5fad-4f08-8af0-d9b3656d3d32" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212916Z:d3cbf4e3-5fad-4f08-8af0-d9b3656d3d32" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/e0ab367d-4086-4161-8187-bd391a1daa62?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY3MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vZTBhYjM2N2QtNDA4Ni00MTYxLTgxODctYmQzOTFhMWRhYTYyP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"e0ab367d-4086-4161-8187-bd391a1daa62\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-23T21:29:05.727Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:29:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ab36b3c6-351f-4915-a000-71995f6c97bd" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "50d79577-4129-4a0f-90cf-55c5d008e36d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212936Z:50d79577-4129-4a0f-90cf-55c5d008e36d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/e0ab367d-4086-4161-8187-bd391a1daa62?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY3MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vZTBhYjM2N2QtNDA4Ni00MTYxLTgxODctYmQzOTFhMWRhYTYyP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"e0ab367d-4086-4161-8187-bd391a1daa62\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-23T21:29:05.727Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:29:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "80f6f1b8-ffe6-4385-bfea-97b5b8eaa5da" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "55125eb6-3cd0-4f6e-9b7e-d03c39ce6940" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212956Z:55125eb6-3cd0-4f6e-9b7e-d03c39ce6940" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/sqlcrudtest-1876?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY3MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xODc2P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "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-1876.database.windows.net\"\r\n },\r\n \"location\": \"northcentralus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/sqlcrudtest-1876\",\r\n \"name\": \"sqlcrudtest-1876\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:29:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "1c2054ad-1c40-4bd0-952b-4fbd5fd079b2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "7568afb3-66ca-434f-8849-fdc06b0740e2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212957Z:7568afb3-66ca-434f-8849-fdc06b0740e2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/sqlcrudtest-1876/databases/sqlvulnerabilityassessmentscantest-8852?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY3MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xODc2L2RhdGFiYXNlcy9zcWx2dWxuZXJhYmlsaXR5YXNzZXNzbWVudHNjYW50ZXN0LTg4NTI/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"northcentralus\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "36" + ], + "x-ms-client-request-id": [ + "8dc2abd9-2247-495b-ab5f-c9e1093955a4" + ], + "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-23T21:29:58.14Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "75" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:29:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/locations/northcentralus/databaseOperationResults/7bbf0bfc-fcbe-4634-b632-472a89d0310b?api-version=2017-10-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/7bbf0bfc-fcbe-4634-b632-472a89d0310b?api-version=2017-10-01-preview" + ], + "x-ms-request-id": [ + "6ef2a54e-7798-4757-aad3-6c003d2a05b1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "8fbb78cf-2b36-4db6-a989-0b7162dcd56f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212958Z:8fbb78cf-2b36-4db6-a989-0b7162dcd56f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/7bbf0bfc-fcbe-4634-b632-472a89d0310b?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY3MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi83YmJmMGJmYy1mY2JlLTQ2MzQtYjYzMi00NzJhODlkMDMxMGI/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"7bbf0bfc-fcbe-4634-b632-472a89d0310b\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-23T21:29:58.14Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:30:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "0740442a-e743-467e-a973-d495bf30f93a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "9b401574-4b3c-4eb6-88b6-92c651db0a51" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T213013Z:9b401574-4b3c-4eb6-88b6-92c651db0a51" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/7bbf0bfc-fcbe-4634-b632-472a89d0310b?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY3MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi83YmJmMGJmYy1mY2JlLTQ2MzQtYjYzMi00NzJhODlkMDMxMGI/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"7bbf0bfc-fcbe-4634-b632-472a89d0310b\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-23T21:29:58.14Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:30:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ffa27ae7-2eef-4e08-bc25-9146cb5afdd9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "dc9dc2bb-3e67-4cfc-b189-2ba67f889333" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T213028Z:dc9dc2bb-3e67-4cfc-b189-2ba67f889333" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/7bbf0bfc-fcbe-4634-b632-472a89d0310b?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY3MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi83YmJmMGJmYy1mY2JlLTQ2MzQtYjYzMi00NzJhODlkMDMxMGI/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"7bbf0bfc-fcbe-4634-b632-472a89d0310b\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-23T21:29:58.14Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:30:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f6a639f1-002f-4ccf-aedb-7574442a2acb" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "c837f7a0-de74-44b9-9e16-f66d7532312b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T213043Z:c837f7a0-de74-44b9-9e16-f66d7532312b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/7bbf0bfc-fcbe-4634-b632-472a89d0310b?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY3MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi83YmJmMGJmYy1mY2JlLTQ2MzQtYjYzMi00NzJhODlkMDMxMGI/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"7bbf0bfc-fcbe-4634-b632-472a89d0310b\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-23T21:29:58.14Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:30:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e06f7376-ad79-461f-a0af-63f89b4832dc" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "1f31d0c9-e8ea-44e6-8900-2ad6a7f29f87" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T213058Z:1f31d0c9-e8ea-44e6-8900-2ad6a7f29f87" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/sqlcrudtest-1876/databases/sqlvulnerabilityassessmentscantest-8852?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY3MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xODc2L2RhdGFiYXNlcy9zcWx2dWxuZXJhYmlsaXR5YXNzZXNzbWVudHNjYW50ZXN0LTg4NTI/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\": \"b3dd1a55-e2ca-4641-82bf-9a091df39c87\",\r\n \"creationDate\": \"2018-05-23T21:29:58.423Z\",\r\n \"currentServiceObjectiveName\": \"S0\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"defaultSecondaryLocation\": \"South Central US\",\r\n \"catalogCollation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"zoneRedundant\": false,\r\n \"earliestRestoreDate\": \"2018-05-23T22:00:45.85Z\",\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\": \"northcentralus\",\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/sqlcrudtest-1876/databases/sqlvulnerabilityassessmentscantest-8852\",\r\n \"name\": \"sqlvulnerabilityassessmentscantest-8852\",\r\n \"type\": \"Microsoft.Sql/servers/databases\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:30:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "135158e4-2edc-4a4b-8f74-21444be613c4" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "d176338c-61b9-404b-8e0b-22df48381379" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T213059Z:d176338c-61b9-404b-8e0b-22df48381379" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/sqlcrudtest-1876/databases/sqlvulnerabilityassessmentscantest-8852/securityAlertPolicies/default?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY3MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xODc2L2RhdGFiYXNlcy9zcWx2dWxuZXJhYmlsaXR5YXNzZXNzbWVudHNjYW50ZXN0LTg4NTIvc2VjdXJpdHlBbGVydFBvbGljaWVzL2RlZmF1bHQ/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"state\": \"Enabled\",\r\n \"emailAccountAdmins\": \"Enabled\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "90" + ], + "x-ms-client-request-id": [ + "a2f94ed9-db27-4cda-a91e-74504e65806e" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/sqlcrudtest-1876/databases/sqlvulnerabilityassessmentscantest-8852/securityAlertPolicies/default\",\r\n \"name\": \"default\",\r\n \"type\": \"Microsoft.Sql/servers/databases/securityAlertPolicies\",\r\n \"location\": null,\r\n \"kind\": null,\r\n \"properties\": {\r\n \"useServerDefault\": null,\r\n \"state\": \"Enabled\",\r\n \"disabledAlerts\": null,\r\n \"emailAddresses\": null,\r\n \"emailAccountAdmins\": \"Enabled\",\r\n \"storageEndpoint\": null,\r\n \"storageAccountAccessKey\": null,\r\n \"retentionDays\": 0\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:31:01 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "fd9fe158-c055-4972-bee0-d4360021aeb1" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "6097405d-4975-4d93-a3fe-8c6903398ef0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T213101Z:6097405d-4975-4d93-a3fe-8c6903398ef0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Storage/storageAccounts/sqlvatest1385?api-version=2017-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY3MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9zcWx2YXRlc3QxMzg1P2FwaS12ZXJzaW9uPTIwMTctMDYtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_LRS\"\r\n },\r\n \"kind\": \"BlobStorage\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"accessTier\": \"Cool\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "159" + ], + "x-ms-client-request-id": [ + "408fe159-7ddd-457e-97a3-cc5e260697d5" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Storage.StorageManagementClient/6.5.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Content-Type": [ + "text/plain; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:31:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/providers/Microsoft.Storage/locations/northcentralus/asyncoperations/48198ab9-9159-4af0-9bb9-e42114d2873c?monitor=true&api-version=2017-06-01" + ], + "Retry-After": [ + "17" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "48198ab9-9159-4af0-9bb9-e42114d2873c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "154c2d1e-8f45-4372-981a-c03e10b4669a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T213103Z:154c2d1e-8f45-4372-981a-c03e10b4669a" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/providers/Microsoft.Storage/locations/northcentralus/asyncoperations/48198ab9-9159-4af0-9bb9-e42114d2873c?monitor=true&api-version=2017-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Byb3ZpZGVycy9NaWNyb3NvZnQuU3RvcmFnZS9sb2NhdGlvbnMvbm9ydGhjZW50cmFsdXMvYXN5bmNvcGVyYXRpb25zLzQ4MTk4YWI5LTkxNTktNGFmMC05YmI5LWU0MjExNGQyODczYz9tb25pdG9yPXRydWUmYXBpLXZlcnNpb249MjAxNy0wNi0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Storage.StorageManagementClient/6.5.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Content-Type": [ + "text/plain; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:31:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/providers/Microsoft.Storage/locations/northcentralus/asyncoperations/48198ab9-9159-4af0-9bb9-e42114d2873c?monitor=true&api-version=2017-06-01" + ], + "Retry-After": [ + "17" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "3c02b809-b000-4e64-8c99-d118a1ae5857" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "06e9c844-ba1b-441d-9b3a-bd7078fe1bd9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T213121Z:06e9c844-ba1b-441d-9b3a-bd7078fe1bd9" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/providers/Microsoft.Storage/locations/northcentralus/asyncoperations/48198ab9-9159-4af0-9bb9-e42114d2873c?monitor=true&api-version=2017-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Byb3ZpZGVycy9NaWNyb3NvZnQuU3RvcmFnZS9sb2NhdGlvbnMvbm9ydGhjZW50cmFsdXMvYXN5bmNvcGVyYXRpb25zLzQ4MTk4YWI5LTkxNTktNGFmMC05YmI5LWU0MjExNGQyODczYz9tb25pdG9yPXRydWUmYXBpLXZlcnNpb249MjAxNy0wNi0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Storage.StorageManagementClient/6.5.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_LRS\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"kind\": \"BlobStorage\",\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Storage/storageAccounts/sqlvatest1385\",\r\n \"name\": \"sqlvatest1385\",\r\n \"type\": \"Microsoft.Storage/storageAccounts\",\r\n \"location\": \"northcentralus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"networkAcls\": {\r\n \"bypass\": \"AzureServices\",\r\n \"virtualNetworkRules\": [],\r\n \"ipRules\": [],\r\n \"defaultAction\": \"Allow\"\r\n },\r\n \"trustedDirectories\": [\r\n \"4c8f1d26-c1d3-40f7-a12b-4d72de2a6d3c\"\r\n ],\r\n \"supportsHttpsTrafficOnly\": false,\r\n \"encryption\": {\r\n \"services\": {\r\n \"file\": {\r\n \"enabled\": true,\r\n \"lastEnabledTime\": \"2018-05-23T21:31:03.3531248Z\"\r\n },\r\n \"blob\": {\r\n \"enabled\": true,\r\n \"lastEnabledTime\": \"2018-05-23T21:31:03.3531248Z\"\r\n }\r\n },\r\n \"keySource\": \"Microsoft.Storage\"\r\n },\r\n \"accessTier\": \"Cool\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"2018-05-23T21:31:03.3062357Z\",\r\n \"primaryEndpoints\": {\r\n \"blob\": \"https://sqlvatest1385.blob.core.windows.net/\",\r\n \"table\": \"https://sqlvatest1385.table.core.windows.net/\"\r\n },\r\n \"primaryLocation\": \"northcentralus\",\r\n \"statusOfPrimary\": \"available\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:31:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "fbc59c0b-5a98-4556-9492-edfefd41cfb5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "258ae982-07cb-46d9-842c-f48d34264061" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T213138Z:258ae982-07cb-46d9-842c-f48d34264061" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Storage/storageAccounts/sqlvatest1385/listKeys?api-version=2017-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY3MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9zcWx2YXRlc3QxMzg1L2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTctMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d4a42466-4001-4afb-beb7-36a065be8636" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Storage.StorageManagementClient/6.5.0.0" + ] + }, + "ResponseBody": "{\r\n \"keys\": [\r\n {\r\n \"keyName\": \"key1\",\r\n \"value\": \"uRTe1S6sdkNdR1gleLQoY5Pqu2xNC0vABEDwNCo2suH2+V3iPNwkUmRlQ/g50JtgVad2DbuXOH9//TCLGDO/Nw==\",\r\n \"permissions\": \"FULL\"\r\n },\r\n {\r\n \"keyName\": \"key2\",\r\n \"value\": \"EqNv39Vdwt0Ag+o2KFBwhtkXVQ0s+h6t9649vwx/SVssW65YqNKMI/xr9znR8W77E/kzs0HjYP76mIn7Xl2M0w==\",\r\n \"permissions\": \"FULL\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:31:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "a42036d8-889d-41e2-9988-c22b81dd9a82" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "72f998b2-bf19-47e5-9674-274148687e9d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T213138Z:72f998b2-bf19-47e5-9674-274148687e9d" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/sqlcrudtest-1876/databases/sqlvulnerabilityassessmentscantest-8852/vulnerabilityAssessments/default?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY3MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xODc2L2RhdGFiYXNlcy9zcWx2dWxuZXJhYmlsaXR5YXNzZXNzbWVudHNjYW50ZXN0LTg4NTIvdnVsbmVyYWJpbGl0eUFzc2Vzc21lbnRzL2RlZmF1bHQ/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"storageContainerPath\": \"https://sqlvatest1385.blob.core.windows.net/vulnerability-assessment\",\r\n \"storageContainerSasKey\": \"?sv=2016-05-31&sr=c&sig=x313Nc4jFHh4k%2FY%2BmBXcgxDMAGkVKm%2BREHZCZIff6RM%3D&se=2018-05-23T22%3A31%3A38Z&sp=rwl\",\r\n \"recurringScans\": {\r\n \"isEnabled\": false,\r\n \"emailSubscriptionAdmins\": true,\r\n \"emails\": [\r\n \"fakemail1@mail.com\",\r\n \"fakemail2@mail.com\"\r\n ]\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "463" + ], + "x-ms-client-request-id": [ + "dd9199e5-1dd2-4e2b-be29-e003bfb760a8" + ], + "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 \"storageContainerPath\": \"https://sqlvatest1385.blob.core.windows.net/vulnerability-assessment/\",\r\n \"recurringScans\": {\r\n \"isEnabled\": false,\r\n \"emailSubscriptionAdmins\": true,\r\n \"emails\": [\r\n \"fakemail1@mail.com\",\r\n \"fakemail2@mail.com\"\r\n ]\r\n }\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/sqlcrudtest-1876/databases/sqlvulnerabilityassessmentscantest-8852/vulnerabilityAssessments/Default\",\r\n \"name\": \"Default\",\r\n \"type\": \"Microsoft.Sql/servers/databases/vulnerabilityAssessments\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:31:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9d2b21b0-fafd-4ae8-81d1-ab9de68aea50" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "88c23e92-dfee-4a32-890e-cf7f8cf0444a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T213139Z:88c23e92-dfee-4a32-890e-cf7f8cf0444a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/sqlcrudtest-1876/databases/sqlvulnerabilityassessmentscantest-8852/vulnerabilityAssessments/default/scans/scantest1_sqlvulnerabilityassessmentscantest-/initiateScan?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY3MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xODc2L2RhdGFiYXNlcy9zcWx2dWxuZXJhYmlsaXR5YXNzZXNzbWVudHNjYW50ZXN0LTg4NTIvdnVsbmVyYWJpbGl0eUFzc2Vzc21lbnRzL2RlZmF1bHQvc2NhbnMvc2NhbnRlc3QxX3NxbHZ1bG5lcmFiaWxpdHlhc3Nlc3NtZW50c2NhbnRlc3QtL2luaXRpYXRlU2Nhbj9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e8fb0389-bc0c-4097-9513-e1149b080cc2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"ExecuteDatabaseVulnerabilityAssessmentScan\",\r\n \"startTime\": \"2018-05-23T21:31:39.983Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "97" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:31:39 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/locations/northcentralus/vulnerabilityAssessmentScanOperationResults/200c1866-1377-43b1-a34a-7a4406909870?api-version=2017-10-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/locations/northcentralus/vulnerabilityAssessmentScanAzureAsyncOperation/200c1866-1377-43b1-a34a-7a4406909870?api-version=2017-10-01-preview" + ], + "x-ms-request-id": [ + "aaa3efac-1829-474e-a8b1-df80b5795770" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-correlation-request-id": [ + "9c531038-8f46-46c9-aa79-7ac77caa1fc1" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T213140Z:9c531038-8f46-46c9-aa79-7ac77caa1fc1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/locations/northcentralus/vulnerabilityAssessmentScanAzureAsyncOperation/200c1866-1377-43b1-a34a-7a4406909870?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY3MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3Z1bG5lcmFiaWxpdHlBc3Nlc3NtZW50U2NhbkF6dXJlQXN5bmNPcGVyYXRpb24vMjAwYzE4NjYtMTM3Ny00M2IxLWEzNGEtN2E0NDA2OTA5ODcwP2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"200c1866-1377-43b1-a34a-7a4406909870\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-23T21:31:39.983Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:31:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "70ff471e-4f2a-4ccb-afc6-b2874360b058" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "d995ddb9-c7f6-4391-9cba-212245e26d38" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T213155Z:d995ddb9-c7f6-4391-9cba-212245e26d38" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/locations/northcentralus/vulnerabilityAssessmentScanAzureAsyncOperation/200c1866-1377-43b1-a34a-7a4406909870?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY3MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3Z1bG5lcmFiaWxpdHlBc3Nlc3NtZW50U2NhbkF6dXJlQXN5bmNPcGVyYXRpb24vMjAwYzE4NjYtMTM3Ny00M2IxLWEzNGEtN2E0NDA2OTA5ODcwP2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"200c1866-1377-43b1-a34a-7a4406909870\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-23T21:31:39.983Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:32:10 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ad19f4c9-d6b4-4d05-bfb4-a2fc3430e68a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "b10d41c2-b8f1-4ec6-a617-888d81753dbc" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T213210Z:b10d41c2-b8f1-4ec6-a617-888d81753dbc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/locations/northcentralus/vulnerabilityAssessmentScanOperationResults/200c1866-1377-43b1-a34a-7a4406909870?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY3MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3Z1bG5lcmFiaWxpdHlBc3Nlc3NtZW50U2Nhbk9wZXJhdGlvblJlc3VsdHMvMjAwYzE4NjYtMTM3Ny00M2IxLWEzNGEtN2E0NDA2OTA5ODcwP2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "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 \"scanId\": \"scantest1_sqlvulnerabilityassessmentscantest-\",\r\n \"triggerType\": \"OnDemand\",\r\n \"state\": \"Failed\",\r\n \"startTime\": \"2018-05-23T21:31:39.983Z\",\r\n \"endTime\": \"9999-12-31T23:59:59.9999999Z\",\r\n \"storageContainerPath\": \"https://sqlvatest1385.blob.core.windows.net/vulnerability-assessment/\",\r\n \"numberOfFailedSecurityChecks\": 0\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/sqlcrudtest-1876/databases/sqlvulnerabilityassessmentscantest-8852/vulnerabilityAssessments/Default/scans/scantest1_sqlvulnerabilityassessmentscantest-\",\r\n \"name\": \"scantest1_sqlvulnerabilityassessmentscantest-\",\r\n \"type\": \"Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "725" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:32:10 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "51e0e33f-e98b-4b46-8743-d7dff3e21a76" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "dd85f7a8-d7db-4aa7-9bd5-fc8194912d8d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T213211Z:dd85f7a8-d7db-4aa7-9bd5-fc8194912d8d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/sqlcrudtest-1876/databases/sqlvulnerabilityassessmentscantest-8852/vulnerabilityAssessments/default/scans/scantest2_sqlvulnerabilityassessmentscantest-/initiateScan?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY3MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xODc2L2RhdGFiYXNlcy9zcWx2dWxuZXJhYmlsaXR5YXNzZXNzbWVudHNjYW50ZXN0LTg4NTIvdnVsbmVyYWJpbGl0eUFzc2Vzc21lbnRzL2RlZmF1bHQvc2NhbnMvc2NhbnRlc3QyX3NxbHZ1bG5lcmFiaWxpdHlhc3Nlc3NtZW50c2NhbnRlc3QtL2luaXRpYXRlU2Nhbj9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "707f586e-d1d0-4a89-b511-812816f15e7e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"ExecuteDatabaseVulnerabilityAssessmentScan\",\r\n \"startTime\": \"2018-05-23T21:32:11.27Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "96" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:32:10 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/locations/northcentralus/vulnerabilityAssessmentScanOperationResults/e005b7d8-e097-41ce-afde-2a8e422f6df0?api-version=2017-10-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/locations/northcentralus/vulnerabilityAssessmentScanAzureAsyncOperation/e005b7d8-e097-41ce-afde-2a8e422f6df0?api-version=2017-10-01-preview" + ], + "x-ms-request-id": [ + "50e564bd-ece6-4a46-ab59-5558ccc6cf90" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1192" + ], + "x-ms-correlation-request-id": [ + "c2f33e1a-7b11-4eca-89ed-a25d9c534814" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T213211Z:c2f33e1a-7b11-4eca-89ed-a25d9c534814" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/locations/northcentralus/vulnerabilityAssessmentScanAzureAsyncOperation/e005b7d8-e097-41ce-afde-2a8e422f6df0?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY3MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3Z1bG5lcmFiaWxpdHlBc3Nlc3NtZW50U2NhbkF6dXJlQXN5bmNPcGVyYXRpb24vZTAwNWI3ZDgtZTA5Ny00MWNlLWFmZGUtMmE4ZTQyMmY2ZGYwP2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"e005b7d8-e097-41ce-afde-2a8e422f6df0\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-23T21:32:11.27Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:32:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b4fd8a42-4774-4ecc-8b6e-5c345ff9d706" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "f34f3a59-e632-457d-a07a-74fddfd32038" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T213226Z:f34f3a59-e632-457d-a07a-74fddfd32038" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/locations/northcentralus/vulnerabilityAssessmentScanOperationResults/e005b7d8-e097-41ce-afde-2a8e422f6df0?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY3MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3Z1bG5lcmFiaWxpdHlBc3Nlc3NtZW50U2Nhbk9wZXJhdGlvblJlc3VsdHMvZTAwNWI3ZDgtZTA5Ny00MWNlLWFmZGUtMmE4ZTQyMmY2ZGYwP2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "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 \"scanId\": \"scantest2_sqlvulnerabilityassessmentscantest-\",\r\n \"triggerType\": \"OnDemand\",\r\n \"state\": \"Failed\",\r\n \"startTime\": \"2018-05-23T21:32:11.27Z\",\r\n \"endTime\": \"9999-12-31T23:59:59.9999999Z\",\r\n \"storageContainerPath\": \"https://sqlvatest1385.blob.core.windows.net/vulnerability-assessment/\",\r\n \"numberOfFailedSecurityChecks\": 0\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/sqlcrudtest-1876/databases/sqlvulnerabilityassessmentscantest-8852/vulnerabilityAssessments/Default/scans/scantest2_sqlvulnerabilityassessmentscantest-\",\r\n \"name\": \"scantest2_sqlvulnerabilityassessmentscantest-\",\r\n \"type\": \"Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "724" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:32:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "61a5b98d-11df-4b75-8c9d-9888cc1d9a60" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-correlation-request-id": [ + "967e9ba2-a765-49b3-b6de-58710192b7bf" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T213226Z:967e9ba2-a765-49b3-b6de-58710192b7bf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/sqlcrudtest-1876/databases/sqlvulnerabilityassessmentscantest-8852/vulnerabilityAssessments/default/scans/scantest1_sqlvulnerabilityassessmentscantest-?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY3MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xODc2L2RhdGFiYXNlcy9zcWx2dWxuZXJhYmlsaXR5YXNzZXNzbWVudHNjYW50ZXN0LTg4NTIvdnVsbmVyYWJpbGl0eUFzc2Vzc21lbnRzL2RlZmF1bHQvc2NhbnMvc2NhbnRlc3QxX3NxbHZ1bG5lcmFiaWxpdHlhc3Nlc3NtZW50c2NhbnRlc3QtP2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f58bd8ee-cfe4-4a4d-9626-16f8acc84a3f" + ], + "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 \"scanId\": \"scantest1_sqlvulnerabilityassessmentscantest-\",\r\n \"triggerType\": \"OnDemand\",\r\n \"state\": \"Failed\",\r\n \"startTime\": \"2018-05-23T21:31:40.625604Z\",\r\n \"endTime\": \"2018-05-23T21:31:55.2043054Z\",\r\n \"storageContainerPath\": \"https://sqlvatest1385.blob.core.windows.net/vulnerability-assessment/\",\r\n \"numberOfFailedSecurityChecks\": 3\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/sqlcrudtest-1876/databases/sqlvulnerabilityassessmentscantest-8852/vulnerabilityAssessments/Default/scans/scantest1_sqlvulnerabilityassessmentscantest-\",\r\n \"name\": \"scantest1_sqlvulnerabilityassessmentscantest-\",\r\n \"type\": \"Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:32:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f41ffe53-1e69-407c-885d-75e616d64f62" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-correlation-request-id": [ + "8a5136a3-7393-4e63-b30f-945c1a5b455e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T213226Z:8a5136a3-7393-4e63-b30f-945c1a5b455e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/sqlcrudtest-1876/databases/sqlvulnerabilityassessmentscantest-8852/vulnerabilityAssessments/default/scans?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY3MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xODc2L2RhdGFiYXNlcy9zcWx2dWxuZXJhYmlsaXR5YXNzZXNzbWVudHNjYW50ZXN0LTg4NTIvdnVsbmVyYWJpbGl0eUFzc2Vzc21lbnRzL2RlZmF1bHQvc2NhbnM/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0b8c0e32-8dc1-4970-be19-96cfc15bedd3" + ], + "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 \"scanId\": \"scantest1_sqlvulnerabilityassessmentscantest-\",\r\n \"triggerType\": \"OnDemand\",\r\n \"state\": \"Failed\",\r\n \"startTime\": \"2018-05-23T21:31:40.625604Z\",\r\n \"endTime\": \"2018-05-23T21:31:55.2043054Z\",\r\n \"storageContainerPath\": \"https://sqlvatest1385.blob.core.windows.net/vulnerability-assessment/\",\r\n \"numberOfFailedSecurityChecks\": 3\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/sqlcrudtest-1876/databases/sqlvulnerabilityassessmentscantest-8852/vulnerabilityAssessments/Default/scans/scantest1_sqlvulnerabilityassessmentscantest-\",\r\n \"name\": \"scantest1_sqlvulnerabilityassessmentscantest-\",\r\n \"type\": \"Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans\"\r\n },\r\n {\r\n \"properties\": {\r\n \"scanId\": \"scantest2_sqlvulnerabilityassessmentscantest-\",\r\n \"triggerType\": \"OnDemand\",\r\n \"state\": \"Failed\",\r\n \"startTime\": \"2018-05-23T21:32:11.5330409Z\",\r\n \"endTime\": \"2018-05-23T21:32:19.2052556Z\",\r\n \"storageContainerPath\": \"https://sqlvatest1385.blob.core.windows.net/vulnerability-assessment/\",\r\n \"numberOfFailedSecurityChecks\": 3\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/sqlcrudtest-1876/databases/sqlvulnerabilityassessmentscantest-8852/vulnerabilityAssessments/Default/scans/scantest2_sqlvulnerabilityassessmentscantest-\",\r\n \"name\": \"scantest2_sqlvulnerabilityassessmentscantest-\",\r\n \"type\": \"Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:32:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f01bd98e-67b1-4cc0-a461-c9c5951b546c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14979" + ], + "x-ms-correlation-request-id": [ + "1a97151d-c4e6-4d77-8e63-7b7ef1d73837" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T213226Z:1a97151d-c4e6-4d77-8e63-7b7ef1d73837" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/sqlcrudtest-1876/databases/sqlvulnerabilityassessmentscantest-8852/vulnerabilityAssessments/default/scans/scantest2_sqlvulnerabilityassessmentscantest-?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTY3MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xODc2L2RhdGFiYXNlcy9zcWx2dWxuZXJhYmlsaXR5YXNzZXNzbWVudHNjYW50ZXN0LTg4NTIvdnVsbmVyYWJpbGl0eUFzc2Vzc21lbnRzL2RlZmF1bHQvc2NhbnMvc2NhbnRlc3QyX3NxbHZ1bG5lcmFiaWxpdHlhc3Nlc3NtZW50c2NhbnRlc3QtP2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3955de12-83af-4e40-b044-3a2e0eb428cf" + ], + "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 \"scanId\": \"scantest2_sqlvulnerabilityassessmentscantest-\",\r\n \"triggerType\": \"OnDemand\",\r\n \"state\": \"Failed\",\r\n \"startTime\": \"2018-05-23T21:32:11.5330409Z\",\r\n \"endTime\": \"2018-05-23T21:32:19.2052556Z\",\r\n \"storageContainerPath\": \"https://sqlvatest1385.blob.core.windows.net/vulnerability-assessment/\",\r\n \"numberOfFailedSecurityChecks\": 3\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/sqlcrudtest-1876/databases/sqlvulnerabilityassessmentscantest-8852/vulnerabilityAssessments/Default/scans/scantest2_sqlvulnerabilityassessmentscantest-\",\r\n \"name\": \"scantest2_sqlvulnerabilityassessmentscantest-\",\r\n \"type\": \"Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:32:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "eb5ef18c-898e-4749-832f-e0a34e98340b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14978" + ], + "x-ms-correlation-request-id": [ + "cb5720a7-de89-4d41-be07-754f0827868e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T213227Z:cb5720a7-de89-4d41-be07-754f0827868e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-6730?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTY3MzA/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "97d6cf68-c586-4d3d-86e6-76cd61dad0e3" + ], + "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": [ + "Wed, 23 May 2018 21:32:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDY3MzAtTk9SVEhDRU5UUkFMVVMiLCJqb2JMb2NhdGlvbiI6Im5vcnRoY2VudHJhbHVzIn0?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "64e5aa0f-c705-4dbc-9ecc-feaba18150d3" + ], + "x-ms-correlation-request-id": [ + "64e5aa0f-c705-4dbc-9ecc-feaba18150d3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T213228Z:64e5aa0f-c705-4dbc-9ecc-feaba18150d3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + } + ], + "Names": { + "CreateResourceGroup": [ + "sqlcrudtest-6730" + ], + "CreateServer": [ + "sqlcrudtest-1876" + ], + "TestExecuteGetListDatabaseVulnerabilityAssessmentScans": [ + "sqlvulnerabilityassessmentscantest-8852" + ], + "CreateStorageContainer": [ + "sqlvatest1385" + ] + }, + "Variables": { + "SubscriptionId": "f28872d6-4a93-4bb1-84b9-aecb02b6af4c", + "DefaultLocation": "north central us" + } +} \ No newline at end of file diff --git a/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.DatabaseVulnerabilityAssessmentScenarioTests/TestExportDatabaseVulnerabilityAssessmentScans.json b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.DatabaseVulnerabilityAssessmentScenarioTests/TestExportDatabaseVulnerabilityAssessmentScans.json new file mode 100644 index 0000000000000..e2931a8b5ac50 --- /dev/null +++ b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.DatabaseVulnerabilityAssessmentScenarioTests/TestExportDatabaseVulnerabilityAssessmentScans.json @@ -0,0 +1,1485 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-1442?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTE0NDI/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"north central us\",\r\n \"tags\": {\r\n \"sqlcrudtest-1442\": \"2018-05-23 21:23:05Z\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "105" + ], + "x-ms-client-request-id": [ + "6eea1044-0898-4b13-97ca-2591616d7e5c" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442\",\r\n \"name\": \"sqlcrudtest-1442\",\r\n \"location\": \"northcentralus\",\r\n \"tags\": {\r\n \"sqlcrudtest-1442\": \"2018-05-23 21:23:05Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "244" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:23:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "39aa115c-0304-44b5-b56d-ff35f03af6c5" + ], + "x-ms-correlation-request-id": [ + "39aa115c-0304-44b5-b56d-ff35f03af6c5" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212306Z:39aa115c-0304-44b5-b56d-ff35f03af6c5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Sql/servers/sqlcrudtest-117?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xMTc/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "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\": \"north central us\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "190" + ], + "x-ms-client-request-id": [ + "8ab6d7c5-2dff-45e8-ac6a-b79b6b67ce73" + ], + "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-23T21:23:08.073Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "74" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:23:07 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Sql/locations/northcentralus/serverOperationResults/68f81713-a985-4cd1-8462-151314aa9028?api-version=2015-05-01-preview" + ], + "Retry-After": [ + "1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/68f81713-a985-4cd1-8462-151314aa9028?api-version=2015-05-01-preview" + ], + "x-ms-request-id": [ + "68f81713-a985-4cd1-8462-151314aa9028" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "180cb5fe-92ca-4ede-bcf4-6d4704d69c82" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212308Z:180cb5fe-92ca-4ede-bcf4-6d4704d69c82" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/68f81713-a985-4cd1-8462-151314aa9028?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vNjhmODE3MTMtYTk4NS00Y2QxLTg0NjItMTUxMzE0YWE5MDI4P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"68f81713-a985-4cd1-8462-151314aa9028\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-23T21:23:08.073Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:23:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "8659bc2f-9b7b-4de6-bac8-190b4ecb1a7b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "836046f2-0e36-48c6-844a-8391518a1abd" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212319Z:836046f2-0e36-48c6-844a-8391518a1abd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/68f81713-a985-4cd1-8462-151314aa9028?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vNjhmODE3MTMtYTk4NS00Y2QxLTg0NjItMTUxMzE0YWE5MDI4P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"68f81713-a985-4cd1-8462-151314aa9028\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-23T21:23:08.073Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:23:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "fdbdd40f-255a-4ca0-9661-cc3960c08b65" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "2e4ebc4e-3496-4139-a51b-653e07678d64" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212339Z:2e4ebc4e-3496-4139-a51b-653e07678d64" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/68f81713-a985-4cd1-8462-151314aa9028?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vNjhmODE3MTMtYTk4NS00Y2QxLTg0NjItMTUxMzE0YWE5MDI4P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"68f81713-a985-4cd1-8462-151314aa9028\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-23T21:23:08.073Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:23:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f42c1a0a-5cc1-4f22-8cc0-46e7aaa92218" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "5102ec51-e284-4ae6-a9c9-d536bb5bea24" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212359Z:5102ec51-e284-4ae6-a9c9-d536bb5bea24" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Sql/servers/sqlcrudtest-117?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xMTc/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "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-117.database.windows.net\"\r\n },\r\n \"location\": \"northcentralus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Sql/servers/sqlcrudtest-117\",\r\n \"name\": \"sqlcrudtest-117\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:23:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "dec1a0c7-53e9-45ac-a0d3-01236e48cf88" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "0c1d3165-b388-4668-929d-734c9ae6863e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212359Z:0c1d3165-b388-4668-929d-734c9ae6863e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Sql/servers/sqlcrudtest-117/databases/sqlvulnerabilityassessmentexportscantest-7082?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xMTcvZGF0YWJhc2VzL3NxbHZ1bG5lcmFiaWxpdHlhc3Nlc3NtZW50ZXhwb3J0c2NhbnRlc3QtNzA4Mj9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"northcentralus\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "36" + ], + "x-ms-client-request-id": [ + "3431e944-6f44-4557-8872-b7b339d97653" + ], + "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-23T21:24:00.723Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "76" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:24:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Sql/locations/northcentralus/databaseOperationResults/d5516a81-8b25-4823-8a89-4dc8b5d38a94?api-version=2017-10-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/d5516a81-8b25-4823-8a89-4dc8b5d38a94?api-version=2017-10-01-preview" + ], + "x-ms-request-id": [ + "070be053-e7d5-4f10-a590-e824db7acf1d" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "aded8ee9-fa58-47ed-b5fa-fc299b377463" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212400Z:aded8ee9-fa58-47ed-b5fa-fc299b377463" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/d5516a81-8b25-4823-8a89-4dc8b5d38a94?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi9kNTUxNmE4MS04YjI1LTQ4MjMtOGE4OS00ZGM4YjVkMzhhOTQ/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"d5516a81-8b25-4823-8a89-4dc8b5d38a94\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-23T21:24:00.723Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:24:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "098dca84-15fa-4e80-9624-01673ed54e2a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "13337723-0207-4b67-86e1-fba5d74caabf" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212415Z:13337723-0207-4b67-86e1-fba5d74caabf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/d5516a81-8b25-4823-8a89-4dc8b5d38a94?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi9kNTUxNmE4MS04YjI1LTQ4MjMtOGE4OS00ZGM4YjVkMzhhOTQ/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"d5516a81-8b25-4823-8a89-4dc8b5d38a94\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-23T21:24:00.723Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:24:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "3bae0fb5-5761-4387-9787-0c55531de05d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "1addb0b0-4a26-46ea-8d3a-d5083486893b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212431Z:1addb0b0-4a26-46ea-8d3a-d5083486893b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/d5516a81-8b25-4823-8a89-4dc8b5d38a94?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi9kNTUxNmE4MS04YjI1LTQ4MjMtOGE4OS00ZGM4YjVkMzhhOTQ/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"d5516a81-8b25-4823-8a89-4dc8b5d38a94\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-23T21:24:00.723Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:24:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "8a26b6f6-a0e0-4808-92a2-b1253d678d22" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "2979caa7-282d-4dfb-928f-75bbd6487ac5" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212446Z:2979caa7-282d-4dfb-928f-75bbd6487ac5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/d5516a81-8b25-4823-8a89-4dc8b5d38a94?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi9kNTUxNmE4MS04YjI1LTQ4MjMtOGE4OS00ZGM4YjVkMzhhOTQ/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"d5516a81-8b25-4823-8a89-4dc8b5d38a94\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-23T21:24:00.723Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:25:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "8e43d9a7-58e0-482e-9bc0-5c97d4e1d899" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "738c95e0-f721-4930-99f4-876c167d84b3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212501Z:738c95e0-f721-4930-99f4-876c167d84b3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Sql/servers/sqlcrudtest-117/databases/sqlvulnerabilityassessmentexportscantest-7082?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xMTcvZGF0YWJhc2VzL3NxbHZ1bG5lcmFiaWxpdHlhc3Nlc3NtZW50ZXhwb3J0c2NhbnRlc3QtNzA4Mj9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "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\": \"89c975ac-e5c7-44b1-b9cd-c2b8c39c01f4\",\r\n \"creationDate\": \"2018-05-23T21:24:01.02Z\",\r\n \"currentServiceObjectiveName\": \"S0\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"defaultSecondaryLocation\": \"South Central US\",\r\n \"catalogCollation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"zoneRedundant\": false,\r\n \"earliestRestoreDate\": \"2018-05-23T21:54:51.82Z\",\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\": \"northcentralus\",\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Sql/servers/sqlcrudtest-117/databases/sqlvulnerabilityassessmentexportscantest-7082\",\r\n \"name\": \"sqlvulnerabilityassessmentexportscantest-7082\",\r\n \"type\": \"Microsoft.Sql/servers/databases\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:25:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "57b3452d-be8f-4704-ad95-95b4bc3dbd58" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "5310e294-4405-411d-a338-ec4a92baf977" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212501Z:5310e294-4405-411d-a338-ec4a92baf977" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Sql/servers/sqlcrudtest-117/databases/sqlvulnerabilityassessmentexportscantest-7082/securityAlertPolicies/default?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xMTcvZGF0YWJhc2VzL3NxbHZ1bG5lcmFiaWxpdHlhc3Nlc3NtZW50ZXhwb3J0c2NhbnRlc3QtNzA4Mi9zZWN1cml0eUFsZXJ0UG9saWNpZXMvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"state\": \"Enabled\",\r\n \"emailAccountAdmins\": \"Enabled\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "90" + ], + "x-ms-client-request-id": [ + "397275a7-f36d-4e9b-84fd-3d5b60a52a6c" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Sql/servers/sqlcrudtest-117/databases/sqlvulnerabilityassessmentexportscantest-7082/securityAlertPolicies/default\",\r\n \"name\": \"default\",\r\n \"type\": \"Microsoft.Sql/servers/databases/securityAlertPolicies\",\r\n \"location\": null,\r\n \"kind\": null,\r\n \"properties\": {\r\n \"useServerDefault\": null,\r\n \"state\": \"Enabled\",\r\n \"disabledAlerts\": null,\r\n \"emailAddresses\": null,\r\n \"emailAccountAdmins\": \"Enabled\",\r\n \"storageEndpoint\": null,\r\n \"storageAccountAccessKey\": null,\r\n \"retentionDays\": 0\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:25:03 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "5a7274e7-e987-4c32-b43d-1dfad9b22770" + ], + "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": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "6fbee40b-a630-46f3-9658-a655db6af4ca" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212504Z:6fbee40b-a630-46f3-9658-a655db6af4ca" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Storage/storageAccounts/sqlvatest1851?api-version=2017-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9zcWx2YXRlc3QxODUxP2FwaS12ZXJzaW9uPTIwMTctMDYtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_LRS\"\r\n },\r\n \"kind\": \"BlobStorage\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"accessTier\": \"Cool\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "159" + ], + "x-ms-client-request-id": [ + "a1a7b5fb-747f-46c7-9e6e-3aefdce9bd2c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Storage.StorageManagementClient/6.5.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Content-Type": [ + "text/plain; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:25:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/providers/Microsoft.Storage/locations/northcentralus/asyncoperations/524faada-8aac-49bb-ac29-62a55a956011?monitor=true&api-version=2017-06-01" + ], + "Retry-After": [ + "17" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "524faada-8aac-49bb-ac29-62a55a956011" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "5520d47f-e753-44a7-aa35-b9389c6e0f46" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212506Z:5520d47f-e753-44a7-aa35-b9389c6e0f46" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/providers/Microsoft.Storage/locations/northcentralus/asyncoperations/524faada-8aac-49bb-ac29-62a55a956011?monitor=true&api-version=2017-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Byb3ZpZGVycy9NaWNyb3NvZnQuU3RvcmFnZS9sb2NhdGlvbnMvbm9ydGhjZW50cmFsdXMvYXN5bmNvcGVyYXRpb25zLzUyNGZhYWRhLThhYWMtNDliYi1hYzI5LTYyYTU1YTk1NjAxMT9tb25pdG9yPXRydWUmYXBpLXZlcnNpb249MjAxNy0wNi0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Storage.StorageManagementClient/6.5.0.0" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_LRS\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"kind\": \"BlobStorage\",\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Storage/storageAccounts/sqlvatest1851\",\r\n \"name\": \"sqlvatest1851\",\r\n \"type\": \"Microsoft.Storage/storageAccounts\",\r\n \"location\": \"northcentralus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"networkAcls\": {\r\n \"bypass\": \"AzureServices\",\r\n \"virtualNetworkRules\": [],\r\n \"ipRules\": [],\r\n \"defaultAction\": \"Allow\"\r\n },\r\n \"trustedDirectories\": [\r\n \"4c8f1d26-c1d3-40f7-a12b-4d72de2a6d3c\"\r\n ],\r\n \"supportsHttpsTrafficOnly\": false,\r\n \"encryption\": {\r\n \"services\": {\r\n \"file\": {\r\n \"enabled\": true,\r\n \"lastEnabledTime\": \"2018-05-23T21:25:05.9767419Z\"\r\n },\r\n \"blob\": {\r\n \"enabled\": true,\r\n \"lastEnabledTime\": \"2018-05-23T21:25:05.9767419Z\"\r\n }\r\n },\r\n \"keySource\": \"Microsoft.Storage\"\r\n },\r\n \"accessTier\": \"Cool\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"2018-05-23T21:25:05.9142416Z\",\r\n \"primaryEndpoints\": {\r\n \"blob\": \"https://sqlvatest1851.blob.core.windows.net/\",\r\n \"table\": \"https://sqlvatest1851.table.core.windows.net/\"\r\n },\r\n \"primaryLocation\": \"northcentralus\",\r\n \"statusOfPrimary\": \"available\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:25:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b3d85c7a-f063-4ba1-841d-36e897af8fdf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "e8b08099-12dc-46cd-ac21-32d182c59c67" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212523Z:e8b08099-12dc-46cd-ac21-32d182c59c67" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Storage/storageAccounts/sqlvatest1851/listKeys?api-version=2017-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9zcWx2YXRlc3QxODUxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTctMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "71d6b469-c58b-4794-8430-da685cf9d5f8" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Storage.StorageManagementClient/6.5.0.0" + ] + }, + "ResponseBody": "{\r\n \"keys\": [\r\n {\r\n \"keyName\": \"key1\",\r\n \"value\": \"t/ZN2NAo5I3vjydhhSlgrHlXuycYgTY/lv3QKyt0dAe1PC04jqOdCxfr+0IBCxY6VRaGUOsGfJDV4J6YUldb1g==\",\r\n \"permissions\": \"FULL\"\r\n },\r\n {\r\n \"keyName\": \"key2\",\r\n \"value\": \"EzY6rdcSsaR0LAM8Z9Jvy3rh2yzLNbypxY28qKXkAbqxrFRgKkAoPiimTT5q0UgnFRCy7ZUZT4x0vkHD+/qcNw==\",\r\n \"permissions\": \"FULL\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:25:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "10fd962a-4d29-41e1-8c01-7e83f1fb92f9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "56bdf8f0-a3d5-4151-bb50-0af20368c0db" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212523Z:56bdf8f0-a3d5-4151-bb50-0af20368c0db" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Sql/servers/sqlcrudtest-117/databases/sqlvulnerabilityassessmentexportscantest-7082/vulnerabilityAssessments/default?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xMTcvZGF0YWJhc2VzL3NxbHZ1bG5lcmFiaWxpdHlhc3Nlc3NtZW50ZXhwb3J0c2NhbnRlc3QtNzA4Mi92dWxuZXJhYmlsaXR5QXNzZXNzbWVudHMvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"storageContainerPath\": \"https://sqlvatest1851.blob.core.windows.net/vulnerability-assessment\",\r\n \"storageContainerSasKey\": \"?sv=2016-05-31&sr=c&sig=UYqXYDM8AyNPT%2BZz%2FNQ6PeW18pobk%2Bi1NyM7%2FUJjpHw%3D&se=2018-05-23T22%3A25%3A23Z&sp=rwl\",\r\n \"recurringScans\": {\r\n \"isEnabled\": false,\r\n \"emailSubscriptionAdmins\": true,\r\n \"emails\": [\r\n \"fakemail1@mail.com\",\r\n \"fakemail2@mail.com\"\r\n ]\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "465" + ], + "x-ms-client-request-id": [ + "61eae31c-117a-4a5d-bffb-b4ab77793ce1" + ], + "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 \"storageContainerPath\": \"https://sqlvatest1851.blob.core.windows.net/vulnerability-assessment/\",\r\n \"recurringScans\": {\r\n \"isEnabled\": false,\r\n \"emailSubscriptionAdmins\": true,\r\n \"emails\": [\r\n \"fakemail1@mail.com\",\r\n \"fakemail2@mail.com\"\r\n ]\r\n }\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Sql/servers/sqlcrudtest-117/databases/sqlvulnerabilityassessmentexportscantest-7082/vulnerabilityAssessments/Default\",\r\n \"name\": \"Default\",\r\n \"type\": \"Microsoft.Sql/servers/databases/vulnerabilityAssessments\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:25:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "2d914e79-cc9c-446a-9622-55b2ecb8f52e" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "7507b51a-a797-4d15-9eff-4973c4cc8cf2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212533Z:7507b51a-a797-4d15-9eff-4973c4cc8cf2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Sql/servers/sqlcrudtest-117/databases/sqlvulnerabilityassessmentexportscantest-7082/vulnerabilityAssessments/default/scans/scan1_sqlvulnerabilityassessmentexportscantest-/initiateScan?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xMTcvZGF0YWJhc2VzL3NxbHZ1bG5lcmFiaWxpdHlhc3Nlc3NtZW50ZXhwb3J0c2NhbnRlc3QtNzA4Mi92dWxuZXJhYmlsaXR5QXNzZXNzbWVudHMvZGVmYXVsdC9zY2Fucy9zY2FuMV9zcWx2dWxuZXJhYmlsaXR5YXNzZXNzbWVudGV4cG9ydHNjYW50ZXN0LS9pbml0aWF0ZVNjYW4/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c0d08de6-427b-4d91-9ef7-26e1753145ae" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"ExecuteDatabaseVulnerabilityAssessmentScan\",\r\n \"startTime\": \"2018-05-23T21:25:33.42Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "96" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:25:33 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Sql/locations/northcentralus/vulnerabilityAssessmentScanOperationResults/6cdc8d47-aea5-4b25-a9dd-471ad3762bec?api-version=2017-10-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Sql/locations/northcentralus/vulnerabilityAssessmentScanAzureAsyncOperation/6cdc8d47-aea5-4b25-a9dd-471ad3762bec?api-version=2017-10-01-preview" + ], + "x-ms-request-id": [ + "25ee456f-b049-4152-97df-044510523439" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "b5c9998b-58b4-4abf-a48a-f2bfd34b87fe" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212533Z:b5c9998b-58b4-4abf-a48a-f2bfd34b87fe" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Sql/locations/northcentralus/vulnerabilityAssessmentScanAzureAsyncOperation/6cdc8d47-aea5-4b25-a9dd-471ad3762bec?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3Z1bG5lcmFiaWxpdHlBc3Nlc3NtZW50U2NhbkF6dXJlQXN5bmNPcGVyYXRpb24vNmNkYzhkNDctYWVhNS00YjI1LWE5ZGQtNDcxYWQzNzYyYmVjP2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"6cdc8d47-aea5-4b25-a9dd-471ad3762bec\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-23T21:25:33.42Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:25:48 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "05000b52-ee53-48b3-81f2-d6bcad74b5f6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "7c066e86-39b6-4d90-8b3b-2ad06c96ba05" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212548Z:7c066e86-39b6-4d90-8b3b-2ad06c96ba05" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Sql/locations/northcentralus/vulnerabilityAssessmentScanAzureAsyncOperation/6cdc8d47-aea5-4b25-a9dd-471ad3762bec?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3Z1bG5lcmFiaWxpdHlBc3Nlc3NtZW50U2NhbkF6dXJlQXN5bmNPcGVyYXRpb24vNmNkYzhkNDctYWVhNS00YjI1LWE5ZGQtNDcxYWQzNzYyYmVjP2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"6cdc8d47-aea5-4b25-a9dd-471ad3762bec\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-23T21:25:33.42Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:26:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e5544b1b-dcad-4245-b379-9dffcc99f974" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "a37c2492-50c9-4d5a-a117-f6d7422c1091" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212604Z:a37c2492-50c9-4d5a-a117-f6d7422c1091" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Sql/locations/northcentralus/vulnerabilityAssessmentScanOperationResults/6cdc8d47-aea5-4b25-a9dd-471ad3762bec?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3Z1bG5lcmFiaWxpdHlBc3Nlc3NtZW50U2Nhbk9wZXJhdGlvblJlc3VsdHMvNmNkYzhkNDctYWVhNS00YjI1LWE5ZGQtNDcxYWQzNzYyYmVjP2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "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 \"scanId\": \"scan1_sqlvulnerabilityassessmentexportscantest-\",\r\n \"triggerType\": \"OnDemand\",\r\n \"state\": \"Failed\",\r\n \"startTime\": \"2018-05-23T21:25:33.42Z\",\r\n \"endTime\": \"9999-12-31T23:59:59.9999999Z\",\r\n \"storageContainerPath\": \"https://sqlvatest1851.blob.core.windows.net/vulnerability-assessment/\",\r\n \"numberOfFailedSecurityChecks\": 0\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Sql/servers/sqlcrudtest-117/databases/sqlvulnerabilityassessmentexportscantest-7082/vulnerabilityAssessments/Default/scans/scan1_sqlvulnerabilityassessmentexportscantest-\",\r\n \"name\": \"scan1_sqlvulnerabilityassessmentexportscantest-\",\r\n \"type\": \"Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "735" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:26:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "4dd7327b-a582-4a21-b390-f0d8166aeaa8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "8c017e10-70bc-437b-bc15-3963e60140d3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212604Z:8c017e10-70bc-437b-bc15-3963e60140d3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Sql/servers/sqlcrudtest-117/databases/sqlvulnerabilityassessmentexportscantest-7082/vulnerabilityAssessments/default/scans/scan1_sqlvulnerabilityassessmentexportscantest-/export?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0xMTcvZGF0YWJhc2VzL3NxbHZ1bG5lcmFiaWxpdHlhc3Nlc3NtZW50ZXhwb3J0c2NhbnRlc3QtNzA4Mi92dWxuZXJhYmlsaXR5QXNzZXNzbWVudHMvZGVmYXVsdC9zY2Fucy9zY2FuMV9zcWx2dWxuZXJhYmlsaXR5YXNzZXNzbWVudGV4cG9ydHNjYW50ZXN0LS9leHBvcnQ/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b9a384a6-5aa1-40f6-8e41-afa3b4567724" + ], + "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 \"exportedReportLocation\": \"https://sqlvatest1851.blob.core.windows.net/vulnerability-assessment/scans/sqlcrudtest-117/sqlvulnerabilityassessmentexportscantest-7082/scan_scan1_sqlvulnerabilityassessmentexportscantest-.xlsx\"\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1442/providers/Microsoft.Sql/servers/sqlcrudtest-117/databases/sqlvulnerabilityassessmentexportscantest-7082/vulnerabilityAssessments/Default/scans/scan1_sqlvulnerabilityassessmentexportscantest-/export\",\r\n \"name\": \"scan1_sqlvulnerabilityassessmentexportscantest-\",\r\n \"type\": \"Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans/export\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "663" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 23 May 2018 21:26:09 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "05014c1e-a545-4270-880f-2ba8e44a31ad" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "9c5ee43b-76cd-4b94-89c1-39e405f9684d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212609Z:9c5ee43b-76cd-4b94-89c1-39e405f9684d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-1442?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTE0NDI/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "55e0a6d7-37df-4938-a5b1-355575c2d750" + ], + "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": [ + "Wed, 23 May 2018 21:26:10 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDE0NDItTk9SVEhDRU5UUkFMVVMiLCJqb2JMb2NhdGlvbiI6Im5vcnRoY2VudHJhbHVzIn0?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "3e98eb16-b548-41d3-a73b-f7f1c5500a05" + ], + "x-ms-correlation-request-id": [ + "3e98eb16-b548-41d3-a73b-f7f1c5500a05" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180523T212611Z:3e98eb16-b548-41d3-a73b-f7f1c5500a05" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + } + ], + "Names": { + "CreateResourceGroup": [ + "sqlcrudtest-1442" + ], + "CreateServer": [ + "sqlcrudtest-117" + ], + "TestExportDatabaseVulnerabilityAssessmentScans": [ + "sqlvulnerabilityassessmentexportscantest-7082" + ], + "CreateStorageContainer": [ + "sqlvatest1851" + ] + }, + "Variables": { + "DefaultLocation": "north central us", + "SubscriptionId": "f28872d6-4a93-4bb1-84b9-aecb02b6af4c" + } +} \ 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 0000000000000..fbf5044e88711 --- /dev/null +++ b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ElasticJobAgentScenarioTests/TestCreateUpdateDropAgent.json @@ -0,0 +1,2150 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-5490?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTU0OTA/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"north central us\",\r\n \"tags\": {\r\n \"sqlcrudtest-5490\": \"2018-05-22 19:11:49Z\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "105" + ], + "x-ms-client-request-id": [ + "937e82e8-1320-41fc-83cb-4536504aae6f" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490\",\r\n \"name\": \"sqlcrudtest-5490\",\r\n \"location\": \"northcentralus\",\r\n \"tags\": {\r\n \"sqlcrudtest-5490\": \"2018-05-22 19:11:49Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "244" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:11:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "9b9b857b-aab7-4d1f-ae80-326e81692a21" + ], + "x-ms-correlation-request-id": [ + "9b9b857b-aab7-4d1f-ae80-326e81692a21" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191151Z:9b9b857b-aab7-4d1f-ae80-326e81692a21" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/servers/sqlcrudtest-7135?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC03MTM1P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "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\": \"north central us\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "190" + ], + "x-ms-client-request-id": [ + "65056019-401d-4392-8962-f628cd4ee48a" + ], + "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-22T19:11:52.783Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "74" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:11:52 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/locations/northcentralus/serverOperationResults/2c9cf4e0-661f-4c25-a982-2117910b504b?api-version=2015-05-01-preview" + ], + "Retry-After": [ + "1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/2c9cf4e0-661f-4c25-a982-2117910b504b?api-version=2015-05-01-preview" + ], + "x-ms-request-id": [ + "2c9cf4e0-661f-4c25-a982-2117910b504b" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "d7cd0396-3f89-44bd-9669-eaa28d4eb216" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191152Z:d7cd0396-3f89-44bd-9669-eaa28d4eb216" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/2c9cf4e0-661f-4c25-a982-2117910b504b?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vMmM5Y2Y0ZTAtNjYxZi00YzI1LWE5ODItMjExNzkxMGI1MDRiP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"2c9cf4e0-661f-4c25-a982-2117910b504b\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:11:52.783Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:12:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "98f5bf96-5f0b-4d5c-96c8-d23facacd7ef" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "ae037369-265b-4b25-b25e-f63c75392791" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191203Z:ae037369-265b-4b25-b25e-f63c75392791" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/2c9cf4e0-661f-4c25-a982-2117910b504b?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vMmM5Y2Y0ZTAtNjYxZi00YzI1LWE5ODItMjExNzkxMGI1MDRiP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"2c9cf4e0-661f-4c25-a982-2117910b504b\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:11:52.783Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:12:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b2abf5bb-9c85-47a7-b161-e87c99ca1365" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "5ac612b0-316f-4b43-8997-19bef55995dc" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191223Z:5ac612b0-316f-4b43-8997-19bef55995dc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/2c9cf4e0-661f-4c25-a982-2117910b504b?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vMmM5Y2Y0ZTAtNjYxZi00YzI1LWE5ODItMjExNzkxMGI1MDRiP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"2c9cf4e0-661f-4c25-a982-2117910b504b\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T19:11:52.783Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:12:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "d9a741b3-833f-4b1d-958b-30b25adcd944" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "fdc03dad-60e1-42ec-b82c-382566fbbd39" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191243Z:fdc03dad-60e1-42ec-b82c-382566fbbd39" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/servers/sqlcrudtest-7135?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC03MTM1P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "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-7135.database.windows.net\"\r\n },\r\n \"location\": \"northcentralus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/servers/sqlcrudtest-7135\",\r\n \"name\": \"sqlcrudtest-7135\",\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 19:12:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "81064553-cea2-4aa6-84f6-7cc573f121b6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "84e8bec8-c2e7-4cd9-9b37-bbfbdc4f86e1" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191243Z:84e8bec8-c2e7-4cd9-9b37-bbfbdc4f86e1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/servers/sqlcrudtest-7135/databases/sqlcrudtest-5078?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC03MTM1L2RhdGFiYXNlcy9zcWxjcnVkdGVzdC01MDc4P2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"northcentralus\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "36" + ], + "x-ms-client-request-id": [ + "9390217f-7a97-445d-b08e-e19dfc7cb82e" + ], + "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-22T19:12:45.293Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "76" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:12:44 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/locations/northcentralus/databaseOperationResults/f0434e3c-3672-4731-8ece-a254cb3b0d79?api-version=2017-10-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/f0434e3c-3672-4731-8ece-a254cb3b0d79?api-version=2017-10-01-preview" + ], + "x-ms-request-id": [ + "a82caa11-9efc-4feb-821e-222f828c7022" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "2fa72211-c169-4240-83fe-96936e29270b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191245Z:2fa72211-c169-4240-83fe-96936e29270b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/f0434e3c-3672-4731-8ece-a254cb3b0d79?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi9mMDQzNGUzYy0zNjcyLTQ3MzEtOGVjZS1hMjU0Y2IzYjBkNzk/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"f0434e3c-3672-4731-8ece-a254cb3b0d79\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:12:45.293Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:12:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "76c1c51d-a6db-49c8-98fc-e82ae42c6cfe" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "e21ac2e6-34ed-41e7-ae74-bdbbfe00b405" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191300Z:e21ac2e6-34ed-41e7-ae74-bdbbfe00b405" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/f0434e3c-3672-4731-8ece-a254cb3b0d79?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi9mMDQzNGUzYy0zNjcyLTQ3MzEtOGVjZS1hMjU0Y2IzYjBkNzk/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"f0434e3c-3672-4731-8ece-a254cb3b0d79\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:12:45.293Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:13:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "809847ba-90e9-4ed0-b5e9-d8ee54061d0e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "8c1144e8-1c94-4126-83fc-b8ee3f8a4dca" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191316Z:8c1144e8-1c94-4126-83fc-b8ee3f8a4dca" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/f0434e3c-3672-4731-8ece-a254cb3b0d79?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi9mMDQzNGUzYy0zNjcyLTQ3MzEtOGVjZS1hMjU0Y2IzYjBkNzk/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"f0434e3c-3672-4731-8ece-a254cb3b0d79\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:12:45.293Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:13:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7c341e33-188f-468a-945c-5dd07c57aca9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "6bfcd1ea-2241-4e2f-81f7-3356c9bb25bf" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191331Z:6bfcd1ea-2241-4e2f-81f7-3356c9bb25bf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/f0434e3c-3672-4731-8ece-a254cb3b0d79?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi9mMDQzNGUzYy0zNjcyLTQ3MzEtOGVjZS1hMjU0Y2IzYjBkNzk/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"f0434e3c-3672-4731-8ece-a254cb3b0d79\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T19:12:45.293Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:13:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b13f96a1-a0e4-4d14-9fec-5e245057366e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "1152ad14-a47a-4eb7-8f16-e90bf673a7b1" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191346Z:1152ad14-a47a-4eb7-8f16-e90bf673a7b1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/servers/sqlcrudtest-7135/databases/sqlcrudtest-5078?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC03MTM1L2RhdGFiYXNlcy9zcWxjcnVkdGVzdC01MDc4P2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "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\": \"c16c9bb8-bbaf-4b8b-81a8-fa46ca63c9b4\",\r\n \"creationDate\": \"2018-05-22T19:12:45.683Z\",\r\n \"currentServiceObjectiveName\": \"S0\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"defaultSecondaryLocation\": \"South Central US\",\r\n \"catalogCollation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"zoneRedundant\": false,\r\n \"earliestRestoreDate\": \"2018-05-22T19:43:34.403Z\",\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\": \"northcentralus\",\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/servers/sqlcrudtest-7135/databases/sqlcrudtest-5078\",\r\n \"name\": \"sqlcrudtest-5078\",\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 19:13:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "a9041e98-6749-4c4c-8a61-d2a8a8bc86b1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "7e134ce6-e15a-4e3a-96fb-d0f412fab824" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191346Z:7e134ce6-e15a-4e3a-96fb-d0f412fab824" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/servers/sqlcrudtest-7135/jobAgents/agent1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC03MTM1L2pvYkFnZW50cy9hZ2VudDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/servers/sqlcrudtest-7135/databases/sqlcrudtest-5078\"\r\n },\r\n \"location\": \"northcentralus\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "242" + ], + "x-ms-client-request-id": [ + "4dfa7339-d807-42d5-8a36-2868c5f4cd88" + ], + "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-22T19:13:47.513Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "71" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:13:46 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/locations/northcentralus/jobAgentOperationResults/8200fcd7-9cf9-40f1-a1d6-361cbb1a01e5?api-version=2017-03-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/8200fcd7-9cf9-40f1-a1d6-361cbb1a01e5?api-version=2017-03-01-preview" + ], + "x-ms-request-id": [ + "850f41d9-3801-4969-ab74-d180b8f58fdf" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "e61648a1-995b-4eaa-bd86-e4d1413dbc3b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191347Z:e61648a1-995b-4eaa-bd86-e4d1413dbc3b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/servers/sqlcrudtest-7135/jobAgents/agent1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC03MTM1L2pvYkFnZW50cy9hZ2VudDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/servers/sqlcrudtest-7135/databases/sqlcrudtest-5078\"\r\n },\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"location\": \"northcentralus\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "4f44aa3f-e903-49a6-80b1-2999e9728c71" + ], + "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-22T19:16:20.177Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "71" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:16:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/locations/northcentralus/jobAgentOperationResults/b6ee195b-7ad7-4d76-82e2-895c0c0f2f46?api-version=2017-03-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/b6ee195b-7ad7-4d76-82e2-895c0c0f2f46?api-version=2017-03-01-preview" + ], + "x-ms-request-id": [ + "9a2bc21e-8598-4d5c-aeb8-0fd90f8035d0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "decaeafd-3cd5-46c8-b876-092d2afae2b0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191620Z:decaeafd-3cd5-46c8-b876-092d2afae2b0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/8200fcd7-9cf9-40f1-a1d6-361cbb1a01e5?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi84MjAwZmNkNy05Y2Y5LTQwZjEtYTFkNi0zNjFjYmIxYTAxZTU/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"8200fcd7-9cf9-40f1-a1d6-361cbb1a01e5\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:13:47.513Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:14:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "758c1146-89f7-49c0-a8b9-c87a3808c08b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "8fc28976-d428-4f47-996e-b3d465e57b6e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191402Z:8fc28976-d428-4f47-996e-b3d465e57b6e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/8200fcd7-9cf9-40f1-a1d6-361cbb1a01e5?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi84MjAwZmNkNy05Y2Y5LTQwZjEtYTFkNi0zNjFjYmIxYTAxZTU/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"8200fcd7-9cf9-40f1-a1d6-361cbb1a01e5\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:13:47.513Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:14:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "d41a45c0-5c3a-46a1-a330-8ca77d420729" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "1ea9974c-5cd1-42a7-9585-36bdedddfe73" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191417Z:1ea9974c-5cd1-42a7-9585-36bdedddfe73" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/8200fcd7-9cf9-40f1-a1d6-361cbb1a01e5?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi84MjAwZmNkNy05Y2Y5LTQwZjEtYTFkNi0zNjFjYmIxYTAxZTU/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"8200fcd7-9cf9-40f1-a1d6-361cbb1a01e5\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:13:47.513Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:14:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "bb0796e1-572d-4c21-9377-e7fc3f0815db" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "b6b85242-7b4c-400d-84a2-c13ca1fcb426" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191433Z:b6b85242-7b4c-400d-84a2-c13ca1fcb426" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/8200fcd7-9cf9-40f1-a1d6-361cbb1a01e5?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi84MjAwZmNkNy05Y2Y5LTQwZjEtYTFkNi0zNjFjYmIxYTAxZTU/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"8200fcd7-9cf9-40f1-a1d6-361cbb1a01e5\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:13:47.513Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:14:48 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "cea8de28-57ea-4bc4-a6e1-eb90f044a9b3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "4c256852-9015-4fbf-8972-a6bc5946cef4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191448Z:4c256852-9015-4fbf-8972-a6bc5946cef4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/8200fcd7-9cf9-40f1-a1d6-361cbb1a01e5?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi84MjAwZmNkNy05Y2Y5LTQwZjEtYTFkNi0zNjFjYmIxYTAxZTU/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"8200fcd7-9cf9-40f1-a1d6-361cbb1a01e5\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:13:47.513Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:15:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "857ae38a-c921-4de2-ad9c-4c60ce58bf3d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "9ae305ac-5863-4df0-a5f8-57f71a5a3ac5" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191503Z:9ae305ac-5863-4df0-a5f8-57f71a5a3ac5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/8200fcd7-9cf9-40f1-a1d6-361cbb1a01e5?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi84MjAwZmNkNy05Y2Y5LTQwZjEtYTFkNi0zNjFjYmIxYTAxZTU/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"8200fcd7-9cf9-40f1-a1d6-361cbb1a01e5\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:13:47.513Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:15:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "fc760760-8bce-45ac-a98e-a87b0969643f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "99e82bf9-274f-4374-972d-efbeed09214e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191518Z:99e82bf9-274f-4374-972d-efbeed09214e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/8200fcd7-9cf9-40f1-a1d6-361cbb1a01e5?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi84MjAwZmNkNy05Y2Y5LTQwZjEtYTFkNi0zNjFjYmIxYTAxZTU/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"8200fcd7-9cf9-40f1-a1d6-361cbb1a01e5\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:13:47.513Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:15:33 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "79d73c5f-74c8-44e8-aea6-2ba3134d27a1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "ee461be2-2b85-4ddf-be58-5608804dedcf" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191533Z:ee461be2-2b85-4ddf-be58-5608804dedcf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/8200fcd7-9cf9-40f1-a1d6-361cbb1a01e5?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi84MjAwZmNkNy05Y2Y5LTQwZjEtYTFkNi0zNjFjYmIxYTAxZTU/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"8200fcd7-9cf9-40f1-a1d6-361cbb1a01e5\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:13:47.513Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:15:48 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f22fc5a0-af79-4f1d-823f-dd79d0d83430" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "b78a3b65-98ac-46a4-b8d6-65635d1586db" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191548Z:b78a3b65-98ac-46a4-b8d6-65635d1586db" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/8200fcd7-9cf9-40f1-a1d6-361cbb1a01e5?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi84MjAwZmNkNy05Y2Y5LTQwZjEtYTFkNi0zNjFjYmIxYTAxZTU/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"8200fcd7-9cf9-40f1-a1d6-361cbb1a01e5\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:13:47.513Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:16:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "8eb467be-51c3-4478-b2d4-fd394a87611b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "c33dc63e-be6c-4c9e-abb0-ae353da2e5d0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191604Z:c33dc63e-be6c-4c9e-abb0-ae353da2e5d0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/8200fcd7-9cf9-40f1-a1d6-361cbb1a01e5?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi84MjAwZmNkNy05Y2Y5LTQwZjEtYTFkNi0zNjFjYmIxYTAxZTU/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"8200fcd7-9cf9-40f1-a1d6-361cbb1a01e5\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T19:13:47.513Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:16:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "40218f4d-a67b-4f45-a835-e4fb302c4a39" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-correlation-request-id": [ + "a3aad7d9-5dcd-4c18-a4fa-bc2f313270a3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191619Z:a3aad7d9-5dcd-4c18-a4fa-bc2f313270a3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/servers/sqlcrudtest-7135/jobAgents/agent1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC03MTM1L2pvYkFnZW50cy9hZ2VudDE/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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/servers/sqlcrudtest-7135/databases/sqlcrudtest-5078\",\r\n \"state\": \"Ready\"\r\n },\r\n \"location\": \"northcentralus\",\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/servers/sqlcrudtest-7135/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 19:16:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "086f1de3-88b9-4ef1-a741-49d21ca26fbc" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-correlation-request-id": [ + "c0c66fd0-4f6f-47f8-a7d8-5b4b644c52ca" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191619Z:c0c66fd0-4f6f-47f8-a7d8-5b4b644c52ca" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/servers/sqlcrudtest-7135/jobAgents/agent1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC03MTM1L2pvYkFnZW50cy9hZ2VudDE/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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/servers/sqlcrudtest-7135/databases/sqlcrudtest-5078\",\r\n \"state\": \"Ready\"\r\n },\r\n \"location\": \"northcentralus\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/servers/sqlcrudtest-7135/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 19:16:34 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "41d05968-9999-4389-b9fd-cb5f68fbd5b3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14978" + ], + "x-ms-correlation-request-id": [ + "0c8f5776-f636-4ee8-9958-5617daab749d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191635Z:0c8f5776-f636-4ee8-9958-5617daab749d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/servers/sqlcrudtest-7135/jobAgents/agent1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC03MTM1L2pvYkFnZW50cy9hZ2VudDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9391ec2a-b885-4c8e-82ad-c7fc4d096d07" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/servers/sqlcrudtest-7135/databases/sqlcrudtest-5078\",\r\n \"state\": \"Ready\"\r\n },\r\n \"location\": \"northcentralus\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/servers/sqlcrudtest-7135/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 19:16:34 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "99faa383-4f5c-40ad-9fd0-f0a4613f25ba" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14977" + ], + "x-ms-correlation-request-id": [ + "5dcc3d68-d613-4e8c-91a3-92ecceef6486" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191635Z:5dcc3d68-d613-4e8c-91a3-92ecceef6486" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/b6ee195b-7ad7-4d76-82e2-895c0c0f2f46?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi9iNmVlMTk1Yi03YWQ3LTRkNzYtODJlMi04OTVjMGMwZjJmNDY/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"b6ee195b-7ad7-4d76-82e2-895c0c0f2f46\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T19:16:20.177Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:16:34 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e5a2d79a-f265-431c-834a-20e19cbf247a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14979" + ], + "x-ms-correlation-request-id": [ + "4d78c91b-b2f0-47f6-8420-f3e250aeba16" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191635Z:4d78c91b-b2f0-47f6-8420-f3e250aeba16" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/servers/sqlcrudtest-7135/jobAgents?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC03MTM1L2pvYkFnZW50cz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2c686537-8809-4f2c-989a-8b57507ca907" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/servers/sqlcrudtest-7135/databases/sqlcrudtest-5078\",\r\n \"state\": \"Ready\"\r\n },\r\n \"location\": \"northcentralus\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/servers/sqlcrudtest-7135/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 19:16:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b7634976-f098-4409-9b12-211bc66da00a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14976" + ], + "x-ms-correlation-request-id": [ + "ef7255a1-90d8-430e-a4a7-68525ace31d2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191636Z:ef7255a1-90d8-430e-a4a7-68525ace31d2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/servers/sqlcrudtest-7135/jobAgents/agent1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC03MTM1L2pvYkFnZW50cy9hZ2VudDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5611cd7c-da9f-4c0a-9599-164e89750e77" + ], + "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-22T19:16:36.85Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "70" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:16:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/locations/northcentralus/jobAgentOperationResults/4d2d09f9-01fd-4d62-80a4-a609d9a362ab?api-version=2017-03-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/4d2d09f9-01fd-4d62-80a4-a609d9a362ab?api-version=2017-03-01-preview" + ], + "x-ms-request-id": [ + "5ab6ffd0-f10c-4e12-be8e-52950cda03bc" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "fd646631-d5ae-4520-95ec-9d9bb1077802" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191636Z:fd646631-d5ae-4520-95ec-9d9bb1077802" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/4d2d09f9-01fd-4d62-80a4-a609d9a362ab?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi80ZDJkMDlmOS0wMWZkLTRkNjItODBhNC1hNjA5ZDlhMzYyYWI/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"4d2d09f9-01fd-4d62-80a4-a609d9a362ab\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T19:16:36.85Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:16:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "a476f6a2-2d9b-4c5f-8f85-99dd39a866c0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14975" + ], + "x-ms-correlation-request-id": [ + "e38dd703-ec6e-4c25-ba85-5f8243ac3b35" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191652Z:e38dd703-ec6e-4c25-ba85-5f8243ac3b35" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-5490/providers/Microsoft.Sql/locations/northcentralus/jobAgentOperationResults/4d2d09f9-01fd-4d62-80a4-a609d9a362ab?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTU0OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50T3BlcmF0aW9uUmVzdWx0cy80ZDJkMDlmOS0wMWZkLTRkNjItODBhNC1hNjA5ZDlhMzYyYWI/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "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 19:16:52 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "9a8387af-72b9-4129-b2a0-0410b966abad" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14974" + ], + "x-ms-correlation-request-id": [ + "be36d1a8-4c16-448c-a492-b3ffeb12d9ca" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191652Z:be36d1a8-4c16-448c-a492-b3ffeb12d9ca" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-5490?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTU0OTA/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "edcd6477-a523-4adf-bf40-c2d4434a28d9" + ], + "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 19:16:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDU0OTAtTk9SVEhDRU5UUkFMVVMiLCJqb2JMb2NhdGlvbiI6Im5vcnRoY2VudHJhbHVzIn0?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14998" + ], + "x-ms-request-id": [ + "f3568251-4c11-4698-bbe8-36b1093888f9" + ], + "x-ms-correlation-request-id": [ + "f3568251-4c11-4698-bbe8-36b1093888f9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191653Z:f3568251-4c11-4698-bbe8-36b1093888f9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-5490?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTU0OTA/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0f3ac934-0e4f-4cdf-b089-03b4d13cea61" + ], + "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 19:16:54 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDU0OTAtTk9SVEhDRU5UUkFMVVMiLCJqb2JMb2NhdGlvbiI6Im5vcnRoY2VudHJhbHVzIn0?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14997" + ], + "x-ms-request-id": [ + "c20e67f3-4f05-47bf-b457-561a89bb02a4" + ], + "x-ms-correlation-request-id": [ + "c20e67f3-4f05-47bf-b457-561a89bb02a4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191654Z:c20e67f3-4f05-47bf-b457-561a89bb02a4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + } + ], + "Names": { + "CreateResourceGroup": [ + "sqlcrudtest-5490" + ], + "CreateServer": [ + "sqlcrudtest-7135" + ], + "TestCreateUpdateDropAgent": [ + "sqlcrudtest-5078" + ] + }, + "Variables": { + "DefaultLocation": "north central us", + "SubscriptionId": "f28872d6-4a93-4bb1-84b9-aecb02b6af4c" + } +} \ 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 0000000000000..f29421faf5a39 --- /dev/null +++ b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ElasticJobAgentScenarioTests/TestCreateUpdateDropJob.json @@ -0,0 +1,1720 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-2535?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTI1MzU/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"north central us\",\r\n \"tags\": {\r\n \"sqlcrudtest-2535\": \"2018-05-22 19:07:58Z\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "105" + ], + "x-ms-client-request-id": [ + "5331ed05-83f8-40a1-926c-d8d1ea81cf4a" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535\",\r\n \"name\": \"sqlcrudtest-2535\",\r\n \"location\": \"northcentralus\",\r\n \"tags\": {\r\n \"sqlcrudtest-2535\": \"2018-05-22 19:07:58Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "244" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:07:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "decb4611-ff5d-4ea1-b5ad-f659d94c1978" + ], + "x-ms-correlation-request-id": [ + "decb4611-ff5d-4ea1-b5ad-f659d94c1978" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190800Z:decb4611-ff5d-4ea1-b5ad-f659d94c1978" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/servers/sqlcrudtest-3206?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1MzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0zMjA2P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "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\": \"north central us\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "190" + ], + "x-ms-client-request-id": [ + "2510e0b9-a21c-45e7-8608-c7a449690643" + ], + "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-22T19:08:01.73Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "73" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:08:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/locations/northcentralus/serverOperationResults/11989f56-4e23-4055-be4c-97a1d1024dc3?api-version=2015-05-01-preview" + ], + "Retry-After": [ + "1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/11989f56-4e23-4055-be4c-97a1d1024dc3?api-version=2015-05-01-preview" + ], + "x-ms-request-id": [ + "11989f56-4e23-4055-be4c-97a1d1024dc3" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "6b0420e4-59f5-44dd-90c2-ec17219a0b85" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190801Z:6b0420e4-59f5-44dd-90c2-ec17219a0b85" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/11989f56-4e23-4055-be4c-97a1d1024dc3?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1MzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vMTE5ODlmNTYtNGUyMy00MDU1LWJlNGMtOTdhMWQxMDI0ZGMzP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"11989f56-4e23-4055-be4c-97a1d1024dc3\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:08:01.73Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:08:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9b0b67d8-1bf2-46b5-b987-67ab28c54ff3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "ce826fdb-130e-4c85-8104-b30a88415e9f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190811Z:ce826fdb-130e-4c85-8104-b30a88415e9f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/11989f56-4e23-4055-be4c-97a1d1024dc3?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1MzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vMTE5ODlmNTYtNGUyMy00MDU1LWJlNGMtOTdhMWQxMDI0ZGMzP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"11989f56-4e23-4055-be4c-97a1d1024dc3\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:08:01.73Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:08:31 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9b388b49-a3b3-4845-aadb-35c7e9abba26" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "76c4dbd4-d56f-4b9d-b1e2-e1b2f61cbc89" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190832Z:76c4dbd4-d56f-4b9d-b1e2-e1b2f61cbc89" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/11989f56-4e23-4055-be4c-97a1d1024dc3?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1MzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vMTE5ODlmNTYtNGUyMy00MDU1LWJlNGMtOTdhMWQxMDI0ZGMzP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"11989f56-4e23-4055-be4c-97a1d1024dc3\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T19:08:01.73Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:08:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "433a82ca-158e-4488-a0a9-e346cc8639f2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "5afffa3b-cc8b-4de4-a855-4e00d5019305" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190852Z:5afffa3b-cc8b-4de4-a855-4e00d5019305" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/servers/sqlcrudtest-3206?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1MzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0zMjA2P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "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-3206.database.windows.net\"\r\n },\r\n \"location\": \"northcentralus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/servers/sqlcrudtest-3206\",\r\n \"name\": \"sqlcrudtest-3206\",\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 19:08:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "865d6f1e-23d2-440f-9706-d5288c21b47e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "d5307889-0dc6-492f-a5aa-18ea48501e9c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190852Z:d5307889-0dc6-492f-a5aa-18ea48501e9c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/servers/sqlcrudtest-3206/databases/sqlcrudtest-9445?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1MzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0zMjA2L2RhdGFiYXNlcy9zcWxjcnVkdGVzdC05NDQ1P2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"northcentralus\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "36" + ], + "x-ms-client-request-id": [ + "d2da9b64-240f-4cff-b694-bd21cd3912c4" + ], + "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-22T19:08:53.81Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "75" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:08:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/locations/northcentralus/databaseOperationResults/077e3064-79ae-411d-86ee-6f56389e0062?api-version=2017-10-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/077e3064-79ae-411d-86ee-6f56389e0062?api-version=2017-10-01-preview" + ], + "x-ms-request-id": [ + "91bdc3ef-5f34-4e71-b299-066b2491ed14" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "9404ac91-bffb-499d-9205-7bbfb5089fc0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190853Z:9404ac91-bffb-499d-9205-7bbfb5089fc0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/077e3064-79ae-411d-86ee-6f56389e0062?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1MzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi8wNzdlMzA2NC03OWFlLTQxMWQtODZlZS02ZjU2Mzg5ZTAwNjI/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"077e3064-79ae-411d-86ee-6f56389e0062\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:08:53.81Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:09:09 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "aa9977e9-29d7-4801-9d9f-f073e97b522c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "e1a619df-1b97-4201-8358-44bf63bb452e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190909Z:e1a619df-1b97-4201-8358-44bf63bb452e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/077e3064-79ae-411d-86ee-6f56389e0062?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1MzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi8wNzdlMzA2NC03OWFlLTQxMWQtODZlZS02ZjU2Mzg5ZTAwNjI/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"077e3064-79ae-411d-86ee-6f56389e0062\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:08:53.81Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:09:24 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "03e4ff92-1baa-4349-b1c0-79c799416821" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "d97ceae1-e636-4104-bc47-d330ec518c8c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190924Z:d97ceae1-e636-4104-bc47-d330ec518c8c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/077e3064-79ae-411d-86ee-6f56389e0062?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1MzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi8wNzdlMzA2NC03OWFlLTQxMWQtODZlZS02ZjU2Mzg5ZTAwNjI/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"077e3064-79ae-411d-86ee-6f56389e0062\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:08:53.81Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:09:39 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "8aa4e1f5-52b5-4869-92ba-ac2beeb4c4a1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "fbd35bed-91ed-4a79-b8ab-ee9f1687cf06" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190939Z:fbd35bed-91ed-4a79-b8ab-ee9f1687cf06" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/077e3064-79ae-411d-86ee-6f56389e0062?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1MzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi8wNzdlMzA2NC03OWFlLTQxMWQtODZlZS02ZjU2Mzg5ZTAwNjI/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"077e3064-79ae-411d-86ee-6f56389e0062\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T19:08:53.81Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:09:54 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "88f53a89-9af6-47f9-9343-a9e509410067" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "647bb46c-29e6-4029-bbd1-74c377888b0a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190954Z:647bb46c-29e6-4029-bbd1-74c377888b0a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/servers/sqlcrudtest-3206/databases/sqlcrudtest-9445?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1MzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0zMjA2L2RhdGFiYXNlcy9zcWxjcnVkdGVzdC05NDQ1P2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "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\": \"127e91b1-ed93-45d8-b62c-409aa0a15ad3\",\r\n \"creationDate\": \"2018-05-22T19:08:54.107Z\",\r\n \"currentServiceObjectiveName\": \"S0\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"defaultSecondaryLocation\": \"South Central US\",\r\n \"catalogCollation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"zoneRedundant\": false,\r\n \"earliestRestoreDate\": \"2018-05-22T19:39:42.39Z\",\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\": \"northcentralus\",\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/servers/sqlcrudtest-3206/databases/sqlcrudtest-9445\",\r\n \"name\": \"sqlcrudtest-9445\",\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 19:09:54 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "c38959c6-404c-4f22-94df-85e93beb21e4" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "ed7ff7e2-d52e-4ada-860a-691fcc9b2f0d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190954Z:ed7ff7e2-d52e-4ada-860a-691fcc9b2f0d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/servers/sqlcrudtest-3206/jobAgents/agent?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1MzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0zMjA2L2pvYkFnZW50cy9hZ2VudD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/servers/sqlcrudtest-3206/databases/sqlcrudtest-9445\"\r\n },\r\n \"location\": \"northcentralus\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "242" + ], + "x-ms-client-request-id": [ + "a8e72f83-6b87-4aea-afdc-1b0c1d1d2fa9" + ], + "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-22T19:09:55.76Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "70" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:09:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/locations/northcentralus/jobAgentOperationResults/a2af1602-6610-454a-bdf4-bccf13b080ae?api-version=2017-03-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/a2af1602-6610-454a-bdf4-bccf13b080ae?api-version=2017-03-01-preview" + ], + "x-ms-request-id": [ + "11ea2004-9178-4103-bc6b-6e4a2b0c7f6a" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "eca2ae67-4634-4a90-ac33-c685dfc1113d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190955Z:eca2ae67-4634-4a90-ac33-c685dfc1113d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/a2af1602-6610-454a-bdf4-bccf13b080ae?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1MzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi9hMmFmMTYwMi02NjEwLTQ1NGEtYmRmNC1iY2NmMTNiMDgwYWU/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"a2af1602-6610-454a-bdf4-bccf13b080ae\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:09:55.76Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:10:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "4974faf4-15fb-4ab9-8326-3eab1464c13d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "53ace3cd-529f-4101-875c-516968319fac" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191012Z:53ace3cd-529f-4101-875c-516968319fac" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/a2af1602-6610-454a-bdf4-bccf13b080ae?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1MzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi9hMmFmMTYwMi02NjEwLTQ1NGEtYmRmNC1iY2NmMTNiMDgwYWU/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"a2af1602-6610-454a-bdf4-bccf13b080ae\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:09:55.76Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:10:27 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "d20575d8-5b7f-4583-a6e9-8bba4a795e6c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "4d9823d8-f4fa-4992-8526-a77d19269792" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191027Z:4d9823d8-f4fa-4992-8526-a77d19269792" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/a2af1602-6610-454a-bdf4-bccf13b080ae?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1MzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi9hMmFmMTYwMi02NjEwLTQ1NGEtYmRmNC1iY2NmMTNiMDgwYWU/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"a2af1602-6610-454a-bdf4-bccf13b080ae\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:09:55.76Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:10:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7d40cec3-20eb-4c67-bd33-2cfabd313109" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "3e2fa685-68bd-44f2-be7f-47cbb3c10067" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191042Z:3e2fa685-68bd-44f2-be7f-47cbb3c10067" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/a2af1602-6610-454a-bdf4-bccf13b080ae?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1MzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi9hMmFmMTYwMi02NjEwLTQ1NGEtYmRmNC1iY2NmMTNiMDgwYWU/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"a2af1602-6610-454a-bdf4-bccf13b080ae\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:09:55.76Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:10:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "55541cfd-1fd7-4536-a998-d60bf17f0e2a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "490d88d0-45ad-4eff-a246-3bb73f6e34e3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191057Z:490d88d0-45ad-4eff-a246-3bb73f6e34e3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/a2af1602-6610-454a-bdf4-bccf13b080ae?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1MzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi9hMmFmMTYwMi02NjEwLTQ1NGEtYmRmNC1iY2NmMTNiMDgwYWU/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"a2af1602-6610-454a-bdf4-bccf13b080ae\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:09:55.76Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:11:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "63de3d55-f391-410d-8c37-a65cef8e30b9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "9adabe93-b9ed-4a4c-ad86-ce9e14f1d532" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191113Z:9adabe93-b9ed-4a4c-ad86-ce9e14f1d532" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/a2af1602-6610-454a-bdf4-bccf13b080ae?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1MzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi9hMmFmMTYwMi02NjEwLTQ1NGEtYmRmNC1iY2NmMTNiMDgwYWU/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"a2af1602-6610-454a-bdf4-bccf13b080ae\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:09:55.76Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:11:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "a6f2697b-e832-4f6e-ad34-00bcbdb22378" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "be0c37b0-e89a-4e1c-8b11-dd768eb7f7b7" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191128Z:be0c37b0-e89a-4e1c-8b11-dd768eb7f7b7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/a2af1602-6610-454a-bdf4-bccf13b080ae?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1MzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi9hMmFmMTYwMi02NjEwLTQ1NGEtYmRmNC1iY2NmMTNiMDgwYWU/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"a2af1602-6610-454a-bdf4-bccf13b080ae\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T19:09:55.76Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:11:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "23c67bf0-ce35-4aed-b1ff-bae99a54e1a8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "00d20dd3-38d4-4cf9-8073-5d341b12366c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191143Z:00d20dd3-38d4-4cf9-8073-5d341b12366c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/servers/sqlcrudtest-3206/jobAgents/agent?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1MzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0zMjA2L2pvYkFnZW50cy9hZ2VudD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/servers/sqlcrudtest-3206/databases/sqlcrudtest-9445\",\r\n \"state\": \"Ready\"\r\n },\r\n \"location\": \"northcentralus\",\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/servers/sqlcrudtest-3206/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 19:11:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b5ae3f3d-1702-4cff-8c2c-12922f69b676" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "dbe0c723-5d28-4bb7-a0d4-1a28b3f375ab" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191143Z:dbe0c723-5d28-4bb7-a0d4-1a28b3f375ab" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/servers/sqlcrudtest-3206/jobAgents/agent/jobs/job1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1MzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0zMjA2L2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjE/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": [ + "87b7ca7a-5b5e-441c-bcb4-679b60a06073" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/servers/sqlcrudtest-3206/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 19:11:44 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "1f5afdcf-8420-494f-8b8f-77fe90fc6a9b" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "a63504c3-e225-4f22-a1a1-fdfb8e4b08ad" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191144Z:a63504c3-e225-4f22-a1a1-fdfb8e4b08ad" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/servers/sqlcrudtest-3206/jobAgents/agent/jobs/job1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1MzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0zMjA2L2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjE/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": [ + "8d1418da-8476-4501-bfc7-2dede20b31f7" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/servers/sqlcrudtest-3206/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 19:11:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "2c4a30fb-1e78-4d89-b43e-96f2211ab728" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "d1cdc634-4d01-4726-9838-d49fa8d52e08" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191145Z:d1cdc634-4d01-4726-9838-d49fa8d52e08" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/servers/sqlcrudtest-3206/jobAgents/agent/jobs?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1MzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0zMjA2L2pvYkFnZW50cy9hZ2VudC9qb2JzP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5fb101ba-75f8-4e1a-a4b8-c4fa69d8e634" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/servers/sqlcrudtest-3206/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 19:11:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "65e90268-1501-42d6-9dc3-bb5a49e827d4" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "29de5f5b-40e0-4322-a29d-d746f9fb33b7" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191145Z:29de5f5b-40e0-4322-a29d-d746f9fb33b7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2535/providers/Microsoft.Sql/servers/sqlcrudtest-3206/jobAgents/agent/jobs/job1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI1MzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC0zMjA2L2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f4aa7457-5541-4f49-b692-ce053643e60b" + ], + "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 19:11:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "1e441e0a-626c-4f46-a790-b41732a7ef63" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "97316415-34f7-4424-b671-44defa236113" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191146Z:97316415-34f7-4424-b671-44defa236113" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-2535?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTI1MzU/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b0a156ae-0b9e-4775-8dd0-912c26a523e4" + ], + "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 19:11:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDI1MzUtTk9SVEhDRU5UUkFMVVMiLCJqb2JMb2NhdGlvbiI6Im5vcnRoY2VudHJhbHVzIn0?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "4078fb0a-f0e0-4da1-861e-f3f3637387b6" + ], + "x-ms-correlation-request-id": [ + "4078fb0a-f0e0-4da1-861e-f3f3637387b6" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191147Z:4078fb0a-f0e0-4da1-861e-f3f3637387b6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-2535?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTI1MzU/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "8d3c8796-c6c1-409c-91bc-c9a874754ff7" + ], + "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 19:11:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDI1MzUtTk9SVEhDRU5UUkFMVVMiLCJqb2JMb2NhdGlvbiI6Im5vcnRoY2VudHJhbHVzIn0?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14998" + ], + "x-ms-request-id": [ + "769a74e8-5247-48a1-8daa-8cca740d9f49" + ], + "x-ms-correlation-request-id": [ + "769a74e8-5247-48a1-8daa-8cca740d9f49" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191148Z:769a74e8-5247-48a1-8daa-8cca740d9f49" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + } + ], + "Names": { + "CreateResourceGroup": [ + "sqlcrudtest-2535" + ], + "CreateServer": [ + "sqlcrudtest-3206" + ], + "TestCreateUpdateDropJob": [ + "sqlcrudtest-9445" + ] + }, + "Variables": { + "DefaultLocation": "north central us", + "SubscriptionId": "f28872d6-4a93-4bb1-84b9-aecb02b6af4c" + } +} \ 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 0000000000000..caf7e4e3a8d98 --- /dev/null +++ b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ElasticJobAgentScenarioTests/TestCreateUpdateDropJobCredential.json @@ -0,0 +1,1842 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-293?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTI5Mz9hcGktdmVyc2lvbj0yMDE3LTA1LTEw", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"north central us\",\r\n \"tags\": {\r\n \"sqlcrudtest-293\": \"2018-05-22 18:59:34Z\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "104" + ], + "x-ms-client-request-id": [ + "6042128f-aec7-459f-81ab-72fbd985d97f" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293\",\r\n \"name\": \"sqlcrudtest-293\",\r\n \"location\": \"northcentralus\",\r\n \"tags\": {\r\n \"sqlcrudtest-293\": \"2018-05-22 18:59:34Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "241" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 18:59:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "8a220b7b-4c4b-4869-ac93-6f956598adf2" + ], + "x-ms-correlation-request-id": [ + "8a220b7b-4c4b-4869-ac93-6f956598adf2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185936Z:8a220b7b-4c4b-4869-ac93-6f956598adf2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/servers/sqlcrudtest-9402?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI5My9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbGNydWR0ZXN0LTk0MDI/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "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\": \"north central us\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "190" + ], + "x-ms-client-request-id": [ + "9b847a96-0227-4794-b09f-4794946bfcbc" + ], + "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-22T18:59:38.037Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "74" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 18:59:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/locations/northcentralus/serverOperationResults/b33474a1-edf5-4d82-8e0c-feb978311f4b?api-version=2015-05-01-preview" + ], + "Retry-After": [ + "1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/b33474a1-edf5-4d82-8e0c-feb978311f4b?api-version=2015-05-01-preview" + ], + "x-ms-request-id": [ + "b33474a1-edf5-4d82-8e0c-feb978311f4b" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "e383b9c8-94a7-4513-a0d0-f301805113b4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185938Z:e383b9c8-94a7-4513-a0d0-f301805113b4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/b33474a1-edf5-4d82-8e0c-feb978311f4b?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI5My9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvbm9ydGhjZW50cmFsdXMvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi9iMzM0NzRhMS1lZGY1LTRkODItOGUwYy1mZWI5NzgzMTFmNGI/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\": \"b33474a1-edf5-4d82-8e0c-feb978311f4b\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T18:59:38.037Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 18:59:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "a3c060f5-660a-45b6-b7b4-3dddc4c58400" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "618004fd-a6a9-4e22-9e20-581c0bb26b58" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185948Z:618004fd-a6a9-4e22-9e20-581c0bb26b58" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/b33474a1-edf5-4d82-8e0c-feb978311f4b?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI5My9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvbm9ydGhjZW50cmFsdXMvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi9iMzM0NzRhMS1lZGY1LTRkODItOGUwYy1mZWI5NzgzMTFmNGI/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\": \"b33474a1-edf5-4d82-8e0c-feb978311f4b\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T18:59:38.037Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:00:08 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "0581b1e9-3242-487f-8307-39d8b9c5df27" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "00e29eb0-f22f-496c-bd1a-dedd7e2518ac" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190008Z:00e29eb0-f22f-496c-bd1a-dedd7e2518ac" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/b33474a1-edf5-4d82-8e0c-feb978311f4b?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI5My9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvbm9ydGhjZW50cmFsdXMvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi9iMzM0NzRhMS1lZGY1LTRkODItOGUwYy1mZWI5NzgzMTFmNGI/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\": \"b33474a1-edf5-4d82-8e0c-feb978311f4b\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T18:59:38.037Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:00:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "6ceb2c86-56d3-426e-b147-a0cb4d398a0a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "bded882e-7295-48a9-be98-60b4c1e59b35" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190028Z:bded882e-7295-48a9-be98-60b4c1e59b35" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/b33474a1-edf5-4d82-8e0c-feb978311f4b?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI5My9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvbm9ydGhjZW50cmFsdXMvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi9iMzM0NzRhMS1lZGY1LTRkODItOGUwYy1mZWI5NzgzMTFmNGI/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\": \"b33474a1-edf5-4d82-8e0c-feb978311f4b\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T18:59:38.037Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:00:48 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "3679314e-d99c-4137-aa0c-7ce54c9d8411" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "e4737430-b7db-40ce-b0e3-48c2d52ad45a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190048Z:e4737430-b7db-40ce-b0e3-48c2d52ad45a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/servers/sqlcrudtest-9402?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI5My9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbGNydWR0ZXN0LTk0MDI/YXBpLXZlcnNpb249MjAxNS0wNS0wMS1wcmV2aWV3", + "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-9402.database.windows.net\"\r\n },\r\n \"location\": \"northcentralus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/servers/sqlcrudtest-9402\",\r\n \"name\": \"sqlcrudtest-9402\",\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 19:00:48 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7175567f-2431-4b19-9e60-d10186960eb9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "05400a2c-3df9-4525-982e-3049bfad2dc5" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190049Z:05400a2c-3df9-4525-982e-3049bfad2dc5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/servers/sqlcrudtest-9402/databases/sqlcrudtest-7121?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI5My9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbGNydWR0ZXN0LTk0MDIvZGF0YWJhc2VzL3NxbGNydWR0ZXN0LTcxMjE/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"northcentralus\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "36" + ], + "x-ms-client-request-id": [ + "f209f762-9613-48b8-b11f-d808af3a189b" + ], + "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-22T19:00:50.467Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "76" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:00:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/locations/northcentralus/databaseOperationResults/dc078b41-1984-429c-b313-5530eed190b1?api-version=2017-10-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/dc078b41-1984-429c-b313-5530eed190b1?api-version=2017-10-01-preview" + ], + "x-ms-request-id": [ + "38651200-6e5e-4511-a157-a96dd3596558" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "e142ad03-5a08-4477-809d-d2d6db1afe86" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190050Z:e142ad03-5a08-4477-809d-d2d6db1afe86" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/dc078b41-1984-429c-b313-5530eed190b1?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI5My9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvbm9ydGhjZW50cmFsdXMvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uL2RjMDc4YjQxLTE5ODQtNDI5Yy1iMzEzLTU1MzBlZWQxOTBiMT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"dc078b41-1984-429c-b313-5530eed190b1\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:00:50.467Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:01:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "00e41776-ba6b-4224-84c5-e4cab78b7814" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "852f2198-50fd-4f1d-8569-01adb59c8935" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190105Z:852f2198-50fd-4f1d-8569-01adb59c8935" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/dc078b41-1984-429c-b313-5530eed190b1?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI5My9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvbm9ydGhjZW50cmFsdXMvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uL2RjMDc4YjQxLTE5ODQtNDI5Yy1iMzEzLTU1MzBlZWQxOTBiMT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"dc078b41-1984-429c-b313-5530eed190b1\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:00:50.467Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:01:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "3f475e08-9ec6-4746-b678-9868a74fe828" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "6b79d1fc-92ca-42bb-b0b6-ba5507796354" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190120Z:6b79d1fc-92ca-42bb-b0b6-ba5507796354" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/dc078b41-1984-429c-b313-5530eed190b1?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI5My9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvbm9ydGhjZW50cmFsdXMvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uL2RjMDc4YjQxLTE5ODQtNDI5Yy1iMzEzLTU1MzBlZWQxOTBiMT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"dc078b41-1984-429c-b313-5530eed190b1\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:00:50.467Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:01:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "6394522b-057e-424d-a3a0-0d573ea3ae0b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "1b1e9516-f063-43c7-9ed8-9140478fb675" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190135Z:1b1e9516-f063-43c7-9ed8-9140478fb675" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/dc078b41-1984-429c-b313-5530eed190b1?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI5My9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvbm9ydGhjZW50cmFsdXMvZGF0YWJhc2VBenVyZUFzeW5jT3BlcmF0aW9uL2RjMDc4YjQxLTE5ODQtNDI5Yy1iMzEzLTU1MzBlZWQxOTBiMT9hcGktdmVyc2lvbj0yMDE3LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"dc078b41-1984-429c-b313-5530eed190b1\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T19:00:50.467Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:01:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "91b32228-e1f2-4f2e-afd1-58e43a5fd9a4" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "96fb0fe3-3dcb-459e-b61c-020460cc068f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190151Z:96fb0fe3-3dcb-459e-b61c-020460cc068f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/servers/sqlcrudtest-9402/databases/sqlcrudtest-7121?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI5My9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbGNydWR0ZXN0LTk0MDIvZGF0YWJhc2VzL3NxbGNydWR0ZXN0LTcxMjE/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\": \"74b8187d-34b7-47e9-b481-eb7001a9e58f\",\r\n \"creationDate\": \"2018-05-22T19:00:50.747Z\",\r\n \"currentServiceObjectiveName\": \"S0\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"defaultSecondaryLocation\": \"South Central US\",\r\n \"catalogCollation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"zoneRedundant\": false,\r\n \"earliestRestoreDate\": \"2018-05-22T19:31:38.847Z\",\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\": \"northcentralus\",\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/servers/sqlcrudtest-9402/databases/sqlcrudtest-7121\",\r\n \"name\": \"sqlcrudtest-7121\",\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 19:01:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "d2a691cb-db37-41bb-97a6-c9829bfcb9c8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "c612b903-b7f6-4b38-b662-89f6ac04e3b9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190151Z:c612b903-b7f6-4b38-b662-89f6ac04e3b9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/servers/sqlcrudtest-9402/jobAgents/agent?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI5My9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbGNydWR0ZXN0LTk0MDIvam9iQWdlbnRzL2FnZW50P2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/servers/sqlcrudtest-9402/databases/sqlcrudtest-7121\"\r\n },\r\n \"location\": \"northcentralus\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "241" + ], + "x-ms-client-request-id": [ + "b30912db-dd51-4b2a-a619-1681f624dba7" + ], + "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-22T19:01:52.897Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "71" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:01:52 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/locations/northcentralus/jobAgentOperationResults/aa18fed2-1289-4b0f-83fd-013a351f76c6?api-version=2017-03-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/aa18fed2-1289-4b0f-83fd-013a351f76c6?api-version=2017-03-01-preview" + ], + "x-ms-request-id": [ + "a8c57fbe-1f34-4bb2-bca8-ca183c1e658c" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "f6001db1-29f9-4727-841a-5ee566d245c6" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190152Z:f6001db1-29f9-4727-841a-5ee566d245c6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/aa18fed2-1289-4b0f-83fd-013a351f76c6?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI5My9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvbm9ydGhjZW50cmFsdXMvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2FhMThmZWQyLTEyODktNGIwZi04M2ZkLTAxM2EzNTFmNzZjNj9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"aa18fed2-1289-4b0f-83fd-013a351f76c6\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:01:52.897Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:02:08 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "a44c778b-7d03-41f9-bb10-f4c87441b65b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "e9ffd439-c417-496a-8a65-38b79c27a8b5" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190208Z:e9ffd439-c417-496a-8a65-38b79c27a8b5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/aa18fed2-1289-4b0f-83fd-013a351f76c6?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI5My9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvbm9ydGhjZW50cmFsdXMvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2FhMThmZWQyLTEyODktNGIwZi04M2ZkLTAxM2EzNTFmNzZjNj9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"aa18fed2-1289-4b0f-83fd-013a351f76c6\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:01:52.897Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:02:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "c31196f2-32ce-4e42-8062-5c05b80f27e9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "9c7d8bbf-de5a-4427-b49f-24e3c1f117cb" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190223Z:9c7d8bbf-de5a-4427-b49f-24e3c1f117cb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/aa18fed2-1289-4b0f-83fd-013a351f76c6?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI5My9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvbm9ydGhjZW50cmFsdXMvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2FhMThmZWQyLTEyODktNGIwZi04M2ZkLTAxM2EzNTFmNzZjNj9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"aa18fed2-1289-4b0f-83fd-013a351f76c6\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:01:52.897Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:02:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "5718a8e2-4db5-4877-ada2-9a41485d8fbd" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "60d37a67-5774-4a48-ba41-65dfe0fb30f9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190238Z:60d37a67-5774-4a48-ba41-65dfe0fb30f9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/aa18fed2-1289-4b0f-83fd-013a351f76c6?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI5My9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvbm9ydGhjZW50cmFsdXMvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2FhMThmZWQyLTEyODktNGIwZi04M2ZkLTAxM2EzNTFmNzZjNj9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"aa18fed2-1289-4b0f-83fd-013a351f76c6\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:01:52.897Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:02:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f14482f0-2cda-4fc0-b8e0-c6d8bbe4aea9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "5bffe7ad-4d98-4ac6-ad12-ae4a1399d23e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190253Z:5bffe7ad-4d98-4ac6-ad12-ae4a1399d23e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/aa18fed2-1289-4b0f-83fd-013a351f76c6?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI5My9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvbm9ydGhjZW50cmFsdXMvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2FhMThmZWQyLTEyODktNGIwZi04M2ZkLTAxM2EzNTFmNzZjNj9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"aa18fed2-1289-4b0f-83fd-013a351f76c6\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:01:52.897Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:03:07 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "41db042b-fe88-4015-bfa8-472d35feac40" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "aea7d278-f0d8-42e8-a40f-331907b8275c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190308Z:aea7d278-f0d8-42e8-a40f-331907b8275c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/aa18fed2-1289-4b0f-83fd-013a351f76c6?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI5My9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvbm9ydGhjZW50cmFsdXMvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2FhMThmZWQyLTEyODktNGIwZi04M2ZkLTAxM2EzNTFmNzZjNj9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"aa18fed2-1289-4b0f-83fd-013a351f76c6\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:01:52.897Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:03:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "0189a049-dde9-489e-93cb-26b074e4a105" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "a6085570-8226-422b-bd39-b081c495d715" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190323Z:a6085570-8226-422b-bd39-b081c495d715" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/aa18fed2-1289-4b0f-83fd-013a351f76c6?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI5My9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvbm9ydGhjZW50cmFsdXMvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2FhMThmZWQyLTEyODktNGIwZi04M2ZkLTAxM2EzNTFmNzZjNj9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"aa18fed2-1289-4b0f-83fd-013a351f76c6\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:01:52.897Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:03:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "3b1e9f98-30b6-43e2-8388-1918dc28c971" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "e08a41da-b86c-4852-9ebd-c97465051b80" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190338Z:e08a41da-b86c-4852-9ebd-c97465051b80" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/aa18fed2-1289-4b0f-83fd-013a351f76c6?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI5My9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9sb2NhdGlvbnMvbm9ydGhjZW50cmFsdXMvam9iQWdlbnRBenVyZUFzeW5jT3BlcmF0aW9uL2FhMThmZWQyLTEyODktNGIwZi04M2ZkLTAxM2EzNTFmNzZjNj9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"aa18fed2-1289-4b0f-83fd-013a351f76c6\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T19:01:52.897Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:03:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "6aff20b7-4d3f-4250-a724-86a3e1272065" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "c5e60cca-b738-45c6-b017-0ea38d5ab078" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190354Z:c5e60cca-b738-45c6-b017-0ea38d5ab078" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/servers/sqlcrudtest-9402/jobAgents/agent?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI5My9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbGNydWR0ZXN0LTk0MDIvam9iQWdlbnRzL2FnZW50P2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/servers/sqlcrudtest-9402/databases/sqlcrudtest-7121\",\r\n \"state\": \"Ready\"\r\n },\r\n \"location\": \"northcentralus\",\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/servers/sqlcrudtest-9402/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 19:03:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "d9551402-d440-4f39-8bdb-125421ccf9a0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-correlation-request-id": [ + "bd81209a-33f5-475d-91cc-d0fdb17f203e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190354Z:bd81209a-33f5-475d-91cc-d0fdb17f203e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/servers/sqlcrudtest-9402/jobAgents/agent/credentials/dummylogin?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI5My9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbGNydWR0ZXN0LTk0MDIvam9iQWdlbnRzL2FnZW50L2NyZWRlbnRpYWxzL2R1bW15bG9naW4/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "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": [ + "1ae8d1af-e263-426a-ae33-3d7923edecbb" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/servers/sqlcrudtest-9402/jobAgents/agent/credentials/dummylogin\",\r\n \"name\": \"dummylogin\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/credentials\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "282" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:03:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "5ade1c79-cb37-4b97-a8b4-1290b5bc28f5" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "0636464a-1c19-4830-bdf5-da88e5798d8d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190355Z:0636464a-1c19-4830-bdf5-da88e5798d8d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/servers/sqlcrudtest-9402/jobAgents/agent/credentials/dummylogin?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI5My9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbGNydWR0ZXN0LTk0MDIvam9iQWdlbnRzL2FnZW50L2NyZWRlbnRpYWxzL2R1bW15bG9naW4/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "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": [ + "1f7506e4-c729-442c-b2e5-5719c746ec26" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/servers/sqlcrudtest-9402/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 19:03:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "1a6bab8b-a6a8-41bf-b61c-506314c2b333" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "980c5376-3f04-485f-a8d4-3e4480c7d844" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190356Z:980c5376-3f04-485f-a8d4-3e4480c7d844" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/servers/sqlcrudtest-9402/jobAgents/agent/credentials?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI5My9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbGNydWR0ZXN0LTk0MDIvam9iQWdlbnRzL2FnZW50L2NyZWRlbnRpYWxzP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "430f07da-f57b-4fea-9485-1fced9d8c203" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/servers/sqlcrudtest-9402/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 19:03:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "6d605c76-5a03-4dc9-8c96-84b9fd954448" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-correlation-request-id": [ + "15f1f4e6-7763-45e5-a33a-90eebc4c325b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190356Z:15f1f4e6-7763-45e5-a33a-90eebc4c325b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-293/providers/Microsoft.Sql/servers/sqlcrudtest-9402/jobAgents/agent/credentials/dummylogin?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTI5My9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbGNydWR0ZXN0LTk0MDIvam9iQWdlbnRzL2FnZW50L2NyZWRlbnRpYWxzL2R1bW15bG9naW4/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "74c8818e-13fc-44f9-80aa-98c746744ff3" + ], + "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 19:03:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "e2b44bc6-c21f-45e5-a806-02f6068c1c00" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "ecfca5f4-cf56-4cfa-b44e-35ba6c4e5adb" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190357Z:ecfca5f4-cf56-4cfa-b44e-35ba6c4e5adb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-293?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTI5Mz9hcGktdmVyc2lvbj0yMDE3LTA1LTEw", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3fa8f725-6704-4493-97ea-18decc2a009a" + ], + "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 19:03:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDI5My1OT1JUSENFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoibm9ydGhjZW50cmFsdXMifQ?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "b689e862-dabb-41ac-bef5-065ee4712243" + ], + "x-ms-correlation-request-id": [ + "b689e862-dabb-41ac-bef5-065ee4712243" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190358Z:b689e862-dabb-41ac-bef5-065ee4712243" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-293?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTI5Mz9hcGktdmVyc2lvbj0yMDE3LTA1LTEw", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7932e878-fcaa-4fd7-9e5e-f1740bfe1960" + ], + "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 19:03:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDI5My1OT1JUSENFTlRSQUxVUyIsImpvYkxvY2F0aW9uIjoibm9ydGhjZW50cmFsdXMifQ?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14998" + ], + "x-ms-request-id": [ + "09219d40-1a4e-4b11-8773-b578a0fc3567" + ], + "x-ms-correlation-request-id": [ + "09219d40-1a4e-4b11-8773-b578a0fc3567" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190359Z:09219d40-1a4e-4b11-8773-b578a0fc3567" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + } + ], + "Names": { + "CreateResourceGroup": [ + "sqlcrudtest-293" + ], + "CreateServer": [ + "sqlcrudtest-9402" + ], + "TestCreateUpdateDropJobCredential": [ + "sqlcrudtest-7121" + ] + }, + "Variables": { + "DefaultLocation": "north central us", + "SubscriptionId": "f28872d6-4a93-4bb1-84b9-aecb02b6af4c" + } +} \ 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 0000000000000..e28d7faf55702 --- /dev/null +++ b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ElasticJobAgentScenarioTests/TestCreateUpdateDropJobStep.json @@ -0,0 +1,1921 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-1440?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTE0NDA/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"north central us\",\r\n \"tags\": {\r\n \"sqlcrudtest-1440\": \"2018-05-22 19:04:00Z\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "105" + ], + "x-ms-client-request-id": [ + "04dad2df-05d0-4fce-800d-b698a08fb90a" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440\",\r\n \"name\": \"sqlcrudtest-1440\",\r\n \"location\": \"northcentralus\",\r\n \"tags\": {\r\n \"sqlcrudtest-1440\": \"2018-05-22 19:04:00Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "244" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:04:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "4baa5b50-4e24-4073-99ad-ca3eca3d5dab" + ], + "x-ms-correlation-request-id": [ + "4baa5b50-4e24-4073-99ad-ca3eca3d5dab" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190402Z:4baa5b50-4e24-4073-99ad-ca3eca3d5dab" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MTI4P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "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\": \"north central us\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "190" + ], + "x-ms-client-request-id": [ + "883b3442-13c4-4962-8d20-1d167d4802ea" + ], + "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-22T19:04:04.197Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "74" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:04:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/locations/northcentralus/serverOperationResults/e9d9cdce-a3e2-4761-ad15-1d3a23224c6e?api-version=2015-05-01-preview" + ], + "Retry-After": [ + "1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/e9d9cdce-a3e2-4761-ad15-1d3a23224c6e?api-version=2015-05-01-preview" + ], + "x-ms-request-id": [ + "e9d9cdce-a3e2-4761-ad15-1d3a23224c6e" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "876c62f8-15ea-4104-8d8b-75a174349823" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190404Z:876c62f8-15ea-4104-8d8b-75a174349823" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/e9d9cdce-a3e2-4761-ad15-1d3a23224c6e?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vZTlkOWNkY2UtYTNlMi00NzYxLWFkMTUtMWQzYTIzMjI0YzZlP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"e9d9cdce-a3e2-4761-ad15-1d3a23224c6e\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:04:04.197Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:04:14 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "5990e079-5e5f-4a6d-ae6d-d54f7376a7fb" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "d18e44f2-e3de-47bf-b482-3f9706564d64" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190414Z:d18e44f2-e3de-47bf-b482-3f9706564d64" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/e9d9cdce-a3e2-4761-ad15-1d3a23224c6e?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vZTlkOWNkY2UtYTNlMi00NzYxLWFkMTUtMWQzYTIzMjI0YzZlP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"e9d9cdce-a3e2-4761-ad15-1d3a23224c6e\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:04:04.197Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:04:34 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "980054d5-99d9-4d8e-8017-13a8946246ad" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "c0e020fe-9973-4d4b-bd1d-7b9dd5c87d29" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190434Z:c0e020fe-9973-4d4b-bd1d-7b9dd5c87d29" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/e9d9cdce-a3e2-4761-ad15-1d3a23224c6e?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vZTlkOWNkY2UtYTNlMi00NzYxLWFkMTUtMWQzYTIzMjI0YzZlP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"e9d9cdce-a3e2-4761-ad15-1d3a23224c6e\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T19:04:04.197Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:04:54 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "6d10701f-1a5e-4e3c-a247-00732b88ec18" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "53c00990-ea9b-4f43-8574-6b4a1477fbf8" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190454Z:53c00990-ea9b-4f43-8574-6b4a1477fbf8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MTI4P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "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-4128.database.windows.net\"\r\n },\r\n \"location\": \"northcentralus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128\",\r\n \"name\": \"sqlcrudtest-4128\",\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 19:04:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "5664227f-ec9e-41b6-b422-c2ec74aa5bda" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "42ec4260-b597-4a2a-9d88-82bdd482f534" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190455Z:42ec4260-b597-4a2a-9d88-82bdd482f534" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/databases/sqlcrudtest-4846?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MTI4L2RhdGFiYXNlcy9zcWxjcnVkdGVzdC00ODQ2P2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"northcentralus\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "36" + ], + "x-ms-client-request-id": [ + "855e947a-76ee-45c6-9960-38b331846a10" + ], + "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-22T19:04:56.707Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "76" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:04:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/locations/northcentralus/databaseOperationResults/c363a184-79b2-451d-a4dd-139202de2e26?api-version=2017-10-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/c363a184-79b2-451d-a4dd-139202de2e26?api-version=2017-10-01-preview" + ], + "x-ms-request-id": [ + "544cd06a-8e7e-49ef-aba4-6fa3619d9c6e" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "2e839095-f428-4dd0-8d7b-8e82ed6ce3a4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190456Z:2e839095-f428-4dd0-8d7b-8e82ed6ce3a4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/c363a184-79b2-451d-a4dd-139202de2e26?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi9jMzYzYTE4NC03OWIyLTQ1MWQtYTRkZC0xMzkyMDJkZTJlMjY/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"c363a184-79b2-451d-a4dd-139202de2e26\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:04:56.707Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:05:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "6f5ab048-dbf9-43e9-a3ef-c91403d2e93d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "257a6d2f-3604-44ef-9ce1-25b846f0f614" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190512Z:257a6d2f-3604-44ef-9ce1-25b846f0f614" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/c363a184-79b2-451d-a4dd-139202de2e26?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi9jMzYzYTE4NC03OWIyLTQ1MWQtYTRkZC0xMzkyMDJkZTJlMjY/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"c363a184-79b2-451d-a4dd-139202de2e26\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:04:56.707Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:05:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "127e3bcc-b341-4722-8aa4-7089985975c1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "8ab79ef4-67e8-4fc5-b98f-4220a4a6bffb" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190527Z:8ab79ef4-67e8-4fc5-b98f-4220a4a6bffb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/c363a184-79b2-451d-a4dd-139202de2e26?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi9jMzYzYTE4NC03OWIyLTQ1MWQtYTRkZC0xMzkyMDJkZTJlMjY/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"c363a184-79b2-451d-a4dd-139202de2e26\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T19:04:56.707Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:05:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "cd335a37-8956-4cae-a2bf-44f5e869fbe4" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "b7c14d86-0d42-4129-9ee6-c2653a35c5de" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190542Z:b7c14d86-0d42-4129-9ee6-c2653a35c5de" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/databases/sqlcrudtest-4846?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MTI4L2RhdGFiYXNlcy9zcWxjcnVkdGVzdC00ODQ2P2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "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\": \"9b5db934-fb57-47e5-8251-f42b3ba19a11\",\r\n \"creationDate\": \"2018-05-22T19:04:57.097Z\",\r\n \"currentServiceObjectiveName\": \"S0\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"defaultSecondaryLocation\": \"South Central US\",\r\n \"catalogCollation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"zoneRedundant\": false,\r\n \"earliestRestoreDate\": \"2018-05-22T19:35:41.24Z\",\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\": \"northcentralus\",\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/databases/sqlcrudtest-4846\",\r\n \"name\": \"sqlcrudtest-4846\",\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 19:05:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f6e5637b-fe66-4c1f-8054-3b72f5e5a4e6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "92716ef7-a9a6-4ec7-b07b-6b44a5a3414e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190542Z:92716ef7-a9a6-4ec7-b07b-6b44a5a3414e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/jobAgents/agent?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MTI4L2pvYkFnZW50cy9hZ2VudD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/databases/sqlcrudtest-4846\"\r\n },\r\n \"location\": \"northcentralus\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "242" + ], + "x-ms-client-request-id": [ + "29d8b203-071a-44af-99b4-599eb43235b6" + ], + "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-22T19:05:43.193Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "71" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:05:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/locations/northcentralus/jobAgentOperationResults/7b971619-5820-42f4-87be-6e4e382a4200?api-version=2017-03-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/7b971619-5820-42f4-87be-6e4e382a4200?api-version=2017-03-01-preview" + ], + "x-ms-request-id": [ + "56742ebf-6f8b-484f-93c9-aa9b5cb0827d" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "7af737f8-bdd0-4941-b88f-80e1a742df83" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190543Z:7af737f8-bdd0-4941-b88f-80e1a742df83" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/7b971619-5820-42f4-87be-6e4e382a4200?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi83Yjk3MTYxOS01ODIwLTQyZjQtODdiZS02ZTRlMzgyYTQyMDA/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"7b971619-5820-42f4-87be-6e4e382a4200\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:05:43.193Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:05:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "280a50a7-8218-4c06-8922-23fc382e47e7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "4932fdca-69d9-4784-8f79-48f3885c3b86" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190558Z:4932fdca-69d9-4784-8f79-48f3885c3b86" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/7b971619-5820-42f4-87be-6e4e382a4200?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi83Yjk3MTYxOS01ODIwLTQyZjQtODdiZS02ZTRlMzgyYTQyMDA/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"7b971619-5820-42f4-87be-6e4e382a4200\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:05:43.193Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:06:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "77a16397-5144-45ba-9349-c08deb687c42" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "da9b4934-8e14-4d2f-8c39-16e31c6d19e6" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190613Z:da9b4934-8e14-4d2f-8c39-16e31c6d19e6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/7b971619-5820-42f4-87be-6e4e382a4200?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi83Yjk3MTYxOS01ODIwLTQyZjQtODdiZS02ZTRlMzgyYTQyMDA/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"7b971619-5820-42f4-87be-6e4e382a4200\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:05:43.193Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:06:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ea9d4f9a-29a8-4c18-9dde-8caaca1cbd1e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "4095c9b5-3227-4803-a446-388d886a7856" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190628Z:4095c9b5-3227-4803-a446-388d886a7856" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/7b971619-5820-42f4-87be-6e4e382a4200?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi83Yjk3MTYxOS01ODIwLTQyZjQtODdiZS02ZTRlMzgyYTQyMDA/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"7b971619-5820-42f4-87be-6e4e382a4200\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:05:43.193Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:06:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "1d74c4b5-b1b7-43a1-ab95-68ef38fcbcf2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "7e54a3cb-26ff-4aed-93f5-b267d67dbbba" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190643Z:7e54a3cb-26ff-4aed-93f5-b267d67dbbba" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/7b971619-5820-42f4-87be-6e4e382a4200?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi83Yjk3MTYxOS01ODIwLTQyZjQtODdiZS02ZTRlMzgyYTQyMDA/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"7b971619-5820-42f4-87be-6e4e382a4200\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:05:43.193Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:06:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "4ed6796d-e439-42ce-baa0-7e83bfe41242" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "12132d60-fd2a-4d3b-9cb9-fa0f4679311e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190659Z:12132d60-fd2a-4d3b-9cb9-fa0f4679311e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/7b971619-5820-42f4-87be-6e4e382a4200?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi83Yjk3MTYxOS01ODIwLTQyZjQtODdiZS02ZTRlMzgyYTQyMDA/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"7b971619-5820-42f4-87be-6e4e382a4200\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:05:43.193Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:07:14 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "1dd3ef59-a878-4ab6-9fdb-69da628c8d62" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "77bffc24-b7e1-42c5-a042-846ee3392e8c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190714Z:77bffc24-b7e1-42c5-a042-846ee3392e8c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/7b971619-5820-42f4-87be-6e4e382a4200?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi83Yjk3MTYxOS01ODIwLTQyZjQtODdiZS02ZTRlMzgyYTQyMDA/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"7b971619-5820-42f4-87be-6e4e382a4200\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:05:43.193Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:07:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b0ad9692-74e8-4be8-838b-d78b54245003" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "663dc4e6-3435-4b04-a142-f29a593c161c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190729Z:663dc4e6-3435-4b04-a142-f29a593c161c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/7b971619-5820-42f4-87be-6e4e382a4200?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi83Yjk3MTYxOS01ODIwLTQyZjQtODdiZS02ZTRlMzgyYTQyMDA/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"7b971619-5820-42f4-87be-6e4e382a4200\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T19:05:43.193Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:07:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "990a939a-26d5-4816-b672-065259cbb06f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "f2f62301-e9bc-48a2-998f-35ddeadc978b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190744Z:f2f62301-e9bc-48a2-998f-35ddeadc978b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/jobAgents/agent?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MTI4L2pvYkFnZW50cy9hZ2VudD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/databases/sqlcrudtest-4846\",\r\n \"state\": \"Ready\"\r\n },\r\n \"location\": \"northcentralus\",\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/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 19:07:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "555a790b-0177-4ad6-be11-4e1ded3b81ef" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "01ef7243-41ff-4479-9de8-62e627cded03" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190744Z:01ef7243-41ff-4479-9de8-62e627cded03" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/jobAgents/agent/credentials/dummylogin?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MTI4L2pvYkFnZW50cy9hZ2VudC9jcmVkZW50aWFscy9kdW1teWxvZ2luP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "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": [ + "d2d6bcff-df69-481c-b395-412421b59d6e" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/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 19:07:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "b5a0a97e-6aff-432a-966f-8e66d2d2cdd2" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "3b1191d3-1784-4f4b-af6c-09caabe6a332" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190747Z:3b1191d3-1784-4f4b-af6c-09caabe6a332" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/jobAgents/agent/targetGroups/tg1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MTI4L2pvYkFnZW50cy9hZ2VudC90YXJnZXRHcm91cHMvdGcxP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"members\": [\r\n {\r\n \"membershipType\": \"Include\",\r\n \"type\": \"SqlServer\",\r\n \"serverName\": \"sqlcrudtest-4128\",\r\n \"refreshCredential\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/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": [ + "10beba11-4cc7-4af8-b0ca-bb6b55154e2b" + ], + "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-4128\",\r\n \"refreshCredential\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/jobAgents/agent/credentials/dummylogin\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/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 19:07:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "47a6ea05-41c1-4b39-b0cd-a3dc7a047129" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "261bdb08-db82-400b-bb84-7e6e09b3c456" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190749Z:261bdb08-db82-400b-bb84-7e6e09b3c456" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/jobAgents/agent/jobs/job1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MTI4L2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjE/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": [ + "999ff756-20d5-4559-8056-b8e1935989dd" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/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 19:07:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "3cc27a8c-20b1-4d5c-8f38-a1b1953ac554" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "0a72af90-f0e7-442b-894e-8d0c9218b53f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190750Z:0a72af90-f0e7-442b-894e-8d0c9218b53f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/jobAgents/agent/jobs/job1/steps/step1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MTI4L2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvc3RlcHMvc3RlcDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"targetGroup\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/jobAgents/agent/targetGroups/tg1\",\r\n \"credential\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/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": [ + "8ef8538f-acf5-4a58-bcf3-d492b82c37e7" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/jobAgents/agent/targetGroups/tg1\",\r\n \"credential\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/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 19:07:52 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "b30e65bf-3370-42c9-b227-2ce4aa277cd8" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-correlation-request-id": [ + "a0ad28d4-841f-4004-af18-43258b5357b1" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190752Z:a0ad28d4-841f-4004-af18-43258b5357b1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/jobAgents/agent/jobs/job1/steps/step1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MTI4L2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvc3RlcHMvc3RlcDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"targetGroup\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/jobAgents/agent/targetGroups/tg1\",\r\n \"credential\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/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": [ + "3c5e37ab-6946-40d9-8fdc-0be108a351d0" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/jobAgents/agent/targetGroups/tg1\",\r\n \"credential\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/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 19:07:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "c08131b4-23a4-44a5-9ad8-99ffb311117e" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1192" + ], + "x-ms-correlation-request-id": [ + "cc942a93-1bce-4dc4-a892-3dc81ec5e11a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190753Z:cc942a93-1bce-4dc4-a892-3dc81ec5e11a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/jobAgents/agent/jobs/job1/steps?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MTI4L2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvc3RlcHM/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c66eb180-09dc-40b9-844c-dbab8037c4e0" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/jobAgents/agent/targetGroups/tg1\",\r\n \"credential\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/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 19:07:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "61f724f0-a73b-4849-9d47-ce221ad3cbaf" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "03e9f1dc-c6f5-47c5-be9f-14d027db6047" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190754Z:03e9f1dc-c6f5-47c5-be9f-14d027db6047" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-1440/providers/Microsoft.Sql/servers/sqlcrudtest-4128/jobAgents/agent/jobs/job1/steps/step1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTE0NDAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00MTI4L2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvc3RlcHMvc3RlcDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b6033cc0-9c09-4d27-90b4-0077708625a0" + ], + "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 19:07:54 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "47fb39cd-c94f-480a-ba7b-24381940f95b" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "a7818401-e331-4a14-8ed2-f37fab9e4f75" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190754Z:a7818401-e331-4a14-8ed2-f37fab9e4f75" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-1440?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTE0NDA/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a4c126bf-0e8a-4f57-b0ca-2d330b0d7da4" + ], + "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 19:07:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDE0NDAtTk9SVEhDRU5UUkFMVVMiLCJqb2JMb2NhdGlvbiI6Im5vcnRoY2VudHJhbHVzIn0?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "cc5b9b56-f1ea-4894-90e3-bee6766d8349" + ], + "x-ms-correlation-request-id": [ + "cc5b9b56-f1ea-4894-90e3-bee6766d8349" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190756Z:cc5b9b56-f1ea-4894-90e3-bee6766d8349" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-1440?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTE0NDA/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5b030ed7-6c4c-4613-bdce-082ca633d893" + ], + "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 19:07:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDE0NDAtTk9SVEhDRU5UUkFMVVMiLCJqb2JMb2NhdGlvbiI6Im5vcnRoY2VudHJhbHVzIn0?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14998" + ], + "x-ms-request-id": [ + "0f704444-a96a-4d47-8a21-19bca409e905" + ], + "x-ms-correlation-request-id": [ + "0f704444-a96a-4d47-8a21-19bca409e905" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T190757Z:0f704444-a96a-4d47-8a21-19bca409e905" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + } + ], + "Names": { + "CreateResourceGroup": [ + "sqlcrudtest-1440" + ], + "CreateServer": [ + "sqlcrudtest-4128" + ], + "TestCreateUpdateDropJobStep": [ + "sqlcrudtest-4846" + ] + }, + "Variables": { + "DefaultLocation": "north central us", + "SubscriptionId": "f28872d6-4a93-4bb1-84b9-aecb02b6af4c" + } +} \ 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 0000000000000..6019a7ffe401d --- /dev/null +++ b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ElasticJobAgentScenarioTests/TestCreateUpdateDropTargetGroup.json @@ -0,0 +1,1970 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-8780?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTg3ODA/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"north central us\",\r\n \"tags\": {\r\n \"sqlcrudtest-8780\": \"2018-05-22 18:54:57Z\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "105" + ], + "x-ms-client-request-id": [ + "d24d8d71-2e8c-400a-8e29-a16f735bd77e" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780\",\r\n \"name\": \"sqlcrudtest-8780\",\r\n \"location\": \"northcentralus\",\r\n \"tags\": {\r\n \"sqlcrudtest-8780\": \"2018-05-22 18:54:57Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "244" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 18:54:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "6129102f-658f-401f-981e-74ac6e8814b9" + ], + "x-ms-correlation-request-id": [ + "6129102f-658f-401f-981e-74ac6e8814b9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185459Z:6129102f-658f-401f-981e-74ac6e8814b9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg3ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04OTE5P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "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\": \"north central us\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "190" + ], + "x-ms-client-request-id": [ + "4443d350-b812-4440-be43-88ad53d8e761" + ], + "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-22T18:55:01.03Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "73" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 18:55:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/locations/northcentralus/serverOperationResults/5880f94e-0ea9-4841-b920-348b76ced940?api-version=2015-05-01-preview" + ], + "Retry-After": [ + "1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/5880f94e-0ea9-4841-b920-348b76ced940?api-version=2015-05-01-preview" + ], + "x-ms-request-id": [ + "5880f94e-0ea9-4841-b920-348b76ced940" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "2331ccab-3e3f-4a5e-9a88-57aa0ea6e539" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185501Z:2331ccab-3e3f-4a5e-9a88-57aa0ea6e539" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/5880f94e-0ea9-4841-b920-348b76ced940?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg3ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vNTg4MGY5NGUtMGVhOS00ODQxLWI5MjAtMzQ4Yjc2Y2VkOTQwP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"5880f94e-0ea9-4841-b920-348b76ced940\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T18:55:01.03Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 18:55:10 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "656bf69c-9e13-4618-ae50-7c9c109abef1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "cb6669cd-cc81-44d3-a110-1f9c1085c363" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185511Z:cb6669cd-cc81-44d3-a110-1f9c1085c363" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/5880f94e-0ea9-4841-b920-348b76ced940?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg3ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vNTg4MGY5NGUtMGVhOS00ODQxLWI5MjAtMzQ4Yjc2Y2VkOTQwP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"5880f94e-0ea9-4841-b920-348b76ced940\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T18:55:01.03Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 18:55:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "4f2b32fa-e754-49ce-8247-a20e5bad963e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "0bf19283-0f62-48b0-84a3-b7265c7e3afd" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185531Z:0bf19283-0f62-48b0-84a3-b7265c7e3afd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/5880f94e-0ea9-4841-b920-348b76ced940?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg3ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vNTg4MGY5NGUtMGVhOS00ODQxLWI5MjAtMzQ4Yjc2Y2VkOTQwP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"5880f94e-0ea9-4841-b920-348b76ced940\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T18:55:01.03Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 18:55:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "0074b6db-21ef-408a-b878-409607af4362" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "c3578bdd-acdb-4312-9b3c-07949bf41670" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185551Z:c3578bdd-acdb-4312-9b3c-07949bf41670" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg3ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04OTE5P2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "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-8919.database.windows.net\"\r\n },\r\n \"location\": \"northcentralus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919\",\r\n \"name\": \"sqlcrudtest-8919\",\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 18:55:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "94a98990-755b-48b9-b12f-cc1e04e5e331" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "f0621de9-e929-4b3b-adcb-e83d22e0cccf" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185551Z:f0621de9-e929-4b3b-adcb-e83d22e0cccf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919/databases/sqlcrudtest-2891?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg3ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04OTE5L2RhdGFiYXNlcy9zcWxjcnVkdGVzdC0yODkxP2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"northcentralus\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "36" + ], + "x-ms-client-request-id": [ + "e31cc880-be6a-4762-bdaa-ad26518073a3" + ], + "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-22T18:55:53.27Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "75" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 18:55:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/locations/northcentralus/databaseOperationResults/d8593ae5-1325-4fac-a9e8-9af97950c715?api-version=2017-10-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/d8593ae5-1325-4fac-a9e8-9af97950c715?api-version=2017-10-01-preview" + ], + "x-ms-request-id": [ + "b5b4e5c2-cd56-4325-bdc5-59e996eaf54d" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "bfe4d79b-79ee-45e5-bbf2-bfd11ba15ecc" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185553Z:bfe4d79b-79ee-45e5-bbf2-bfd11ba15ecc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/d8593ae5-1325-4fac-a9e8-9af97950c715?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg3ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi9kODU5M2FlNS0xMzI1LTRmYWMtYTllOC05YWY5Nzk1MGM3MTU/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"d8593ae5-1325-4fac-a9e8-9af97950c715\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T18:55:53.27Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 18:56:07 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "bc2b7e4f-3217-4d4a-9fbf-5063f92c06ea" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "9c9bd83c-cec5-4f57-be73-bc02a9a2f560" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185608Z:9c9bd83c-cec5-4f57-be73-bc02a9a2f560" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/d8593ae5-1325-4fac-a9e8-9af97950c715?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg3ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi9kODU5M2FlNS0xMzI1LTRmYWMtYTllOC05YWY5Nzk1MGM3MTU/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"d8593ae5-1325-4fac-a9e8-9af97950c715\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T18:55:53.27Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 18:56:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "50b38e82-740e-4f06-b1db-be170b5e1733" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "a00db764-ed0f-4b00-baed-f20632597a6e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185623Z:a00db764-ed0f-4b00-baed-f20632597a6e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/d8593ae5-1325-4fac-a9e8-9af97950c715?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg3ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi9kODU5M2FlNS0xMzI1LTRmYWMtYTllOC05YWY5Nzk1MGM3MTU/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"d8593ae5-1325-4fac-a9e8-9af97950c715\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T18:55:53.27Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 18:56:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "fd2cc606-647d-407f-b0ac-6a2cec7a4e07" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "0a41d32c-9b54-415b-a4e2-58aeea9f0825" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185638Z:0a41d32c-9b54-415b-a4e2-58aeea9f0825" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/d8593ae5-1325-4fac-a9e8-9af97950c715?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg3ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi9kODU5M2FlNS0xMzI1LTRmYWMtYTllOC05YWY5Nzk1MGM3MTU/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"d8593ae5-1325-4fac-a9e8-9af97950c715\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T18:55:53.27Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 18:56:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7b18b008-d583-4c65-842b-9976e4b62f37" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "ef3e8936-dd78-434c-b402-5b5fe70b15a1" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185654Z:ef3e8936-dd78-434c-b402-5b5fe70b15a1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919/databases/sqlcrudtest-2891?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg3ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04OTE5L2RhdGFiYXNlcy9zcWxjcnVkdGVzdC0yODkxP2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "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\": \"3f5b6fd8-9589-4258-b39d-3b7b17944239\",\r\n \"creationDate\": \"2018-05-22T18:55:53.583Z\",\r\n \"currentServiceObjectiveName\": \"S0\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"defaultSecondaryLocation\": \"South Central US\",\r\n \"catalogCollation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"zoneRedundant\": false,\r\n \"earliestRestoreDate\": \"2018-05-22T19:26:39.213Z\",\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\": \"northcentralus\",\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919/databases/sqlcrudtest-2891\",\r\n \"name\": \"sqlcrudtest-2891\",\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 18:56:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e4d416ed-6eb0-46f3-9ec2-18ec4d9d83d7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "9b418316-3f13-48a2-b2d2-a91ee834dba4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185654Z:9b418316-3f13-48a2-b2d2-a91ee834dba4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919/jobAgents/agent?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg3ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04OTE5L2pvYkFnZW50cy9hZ2VudD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919/databases/sqlcrudtest-2891\"\r\n },\r\n \"location\": \"northcentralus\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "242" + ], + "x-ms-client-request-id": [ + "9b911d89-80ba-40d2-8a9f-0d62b989c74b" + ], + "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-22T18:56:55.653Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "71" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 18:56:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/locations/northcentralus/jobAgentOperationResults/acdf3f44-06e4-4e49-880e-be966434b6cc?api-version=2017-03-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/acdf3f44-06e4-4e49-880e-be966434b6cc?api-version=2017-03-01-preview" + ], + "x-ms-request-id": [ + "e1d4f16a-c229-4231-9957-a680a2dadb24" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "aa33f4cf-489e-4b02-a3b3-02f3b2e76797" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185655Z:aa33f4cf-489e-4b02-a3b3-02f3b2e76797" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/acdf3f44-06e4-4e49-880e-be966434b6cc?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg3ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi9hY2RmM2Y0NC0wNmU0LTRlNDktODgwZS1iZTk2NjQzNGI2Y2M/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"acdf3f44-06e4-4e49-880e-be966434b6cc\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T18:56:55.653Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 18:57:10 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "c756522f-a082-42bd-9d39-c05388042359" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "6e56ea79-f134-4cc0-a386-2205ca0f399b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185710Z:6e56ea79-f134-4cc0-a386-2205ca0f399b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/acdf3f44-06e4-4e49-880e-be966434b6cc?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg3ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi9hY2RmM2Y0NC0wNmU0LTRlNDktODgwZS1iZTk2NjQzNGI2Y2M/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"acdf3f44-06e4-4e49-880e-be966434b6cc\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T18:56:55.653Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 18:57:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "35de3bdb-3fa7-4d55-8b1f-38a464a44053" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "4c022b07-1af3-4790-b55c-3c030fe94c26" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185726Z:4c022b07-1af3-4790-b55c-3c030fe94c26" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/acdf3f44-06e4-4e49-880e-be966434b6cc?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg3ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi9hY2RmM2Y0NC0wNmU0LTRlNDktODgwZS1iZTk2NjQzNGI2Y2M/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"acdf3f44-06e4-4e49-880e-be966434b6cc\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T18:56:55.653Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 18:57:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "982314d8-4402-42cf-bc64-9d4bfc86ef22" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "48f52494-e63c-4089-9802-f00cce6a59b0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185741Z:48f52494-e63c-4089-9802-f00cce6a59b0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/acdf3f44-06e4-4e49-880e-be966434b6cc?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg3ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi9hY2RmM2Y0NC0wNmU0LTRlNDktODgwZS1iZTk2NjQzNGI2Y2M/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"acdf3f44-06e4-4e49-880e-be966434b6cc\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T18:56:55.653Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 18:57:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "d62bcfa1-2657-4b39-b0de-857e995eb79d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "822024c6-807b-4737-b96c-5a1abb8aab26" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185756Z:822024c6-807b-4737-b96c-5a1abb8aab26" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/acdf3f44-06e4-4e49-880e-be966434b6cc?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg3ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi9hY2RmM2Y0NC0wNmU0LTRlNDktODgwZS1iZTk2NjQzNGI2Y2M/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"acdf3f44-06e4-4e49-880e-be966434b6cc\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T18:56:55.653Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 18:58:10 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "a1483374-b9fa-4727-9faa-21cfbddecfc7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "b97378b6-6405-4869-b3c4-58a44adbe047" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185811Z:b97378b6-6405-4869-b3c4-58a44adbe047" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/acdf3f44-06e4-4e49-880e-be966434b6cc?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg3ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi9hY2RmM2Y0NC0wNmU0LTRlNDktODgwZS1iZTk2NjQzNGI2Y2M/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"acdf3f44-06e4-4e49-880e-be966434b6cc\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T18:56:55.653Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 18:58:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "09d07a5a-8eaa-4509-9da1-eb515295649f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "08e4f681-c103-4e96-8a3c-74c8f5366589" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185826Z:08e4f681-c103-4e96-8a3c-74c8f5366589" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/acdf3f44-06e4-4e49-880e-be966434b6cc?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg3ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi9hY2RmM2Y0NC0wNmU0LTRlNDktODgwZS1iZTk2NjQzNGI2Y2M/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"acdf3f44-06e4-4e49-880e-be966434b6cc\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T18:56:55.653Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 18:58:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "469f78cb-6df3-41c1-a8b6-11d41d13402f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "5e9df99d-de19-4bb0-a068-97aca477729f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185841Z:5e9df99d-de19-4bb0-a068-97aca477729f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/acdf3f44-06e4-4e49-880e-be966434b6cc?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg3ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi9hY2RmM2Y0NC0wNmU0LTRlNDktODgwZS1iZTk2NjQzNGI2Y2M/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"acdf3f44-06e4-4e49-880e-be966434b6cc\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T18:56:55.653Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 18:58:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "3738d892-b0d4-435b-a52f-e2bb3a53ccc6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "1d09e69e-af75-496d-ba92-de2ba58e3292" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185856Z:1d09e69e-af75-496d-ba92-de2ba58e3292" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/acdf3f44-06e4-4e49-880e-be966434b6cc?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg3ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi9hY2RmM2Y0NC0wNmU0LTRlNDktODgwZS1iZTk2NjQzNGI2Y2M/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"acdf3f44-06e4-4e49-880e-be966434b6cc\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T18:56:55.653Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 18:59:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9edeb421-d1b8-4f4b-b8b7-bba62f4c5472" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "0c51ea37-eab2-43e6-a127-1dba82b63983" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185911Z:0c51ea37-eab2-43e6-a127-1dba82b63983" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/acdf3f44-06e4-4e49-880e-be966434b6cc?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg3ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi9hY2RmM2Y0NC0wNmU0LTRlNDktODgwZS1iZTk2NjQzNGI2Y2M/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"acdf3f44-06e4-4e49-880e-be966434b6cc\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T18:56:55.653Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 18:59:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7388545f-426e-4f93-a213-a1b26441f66b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-correlation-request-id": [ + "20a27351-3c02-4107-99c9-e48fd89f1f5a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185927Z:20a27351-3c02-4107-99c9-e48fd89f1f5a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919/jobAgents/agent?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg3ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04OTE5L2pvYkFnZW50cy9hZ2VudD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919/databases/sqlcrudtest-2891\",\r\n \"state\": \"Ready\"\r\n },\r\n \"location\": \"northcentralus\",\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919/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 18:59:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7dfde613-ef7a-44b9-90cb-a734adf0dd51" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-correlation-request-id": [ + "ac998827-8a4c-40b6-8457-2f9f969fb581" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185927Z:ac998827-8a4c-40b6-8457-2f9f969fb581" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919/jobAgents/agent/credentials/dummylogin?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg3ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04OTE5L2pvYkFnZW50cy9hZ2VudC9jcmVkZW50aWFscy9kdW1teWxvZ2luP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "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": [ + "de339951-b5c4-494f-8c59-b0fa38a967c3" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919/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 18:59:27 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "1b5765d5-4937-46dc-bf65-8630fd815087" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "de733a63-8033-48f4-8c6f-c95dc7c7a83a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185928Z:de733a63-8033-48f4-8c6f-c95dc7c7a83a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919/jobAgents/agent/targetGroups/tg1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg3ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04OTE5L2pvYkFnZW50cy9hZ2VudC90YXJnZXRHcm91cHMvdGcxP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919/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": [ + "117be19e-c242-4f96-86be-04e371b038bb" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919/jobAgents/agent/credentials/dummylogin\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919/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 18:59:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "6e9c8483-7e9b-45a8-abe4-878d79b37f63" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "7d18f7d0-2554-443b-a517-ea01e2ce1aca" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185929Z:7d18f7d0-2554-443b-a517-ea01e2ce1aca" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919/jobAgents/agent/targetGroups/tg1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg3ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04OTE5L2pvYkFnZW50cy9hZ2VudC90YXJnZXRHcm91cHMvdGcxP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919/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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919/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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919/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": [ + "9d535bc1-518a-417d-84e5-a89734104ae2" + ], + "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\": \"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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919/jobAgents/agent/credentials/dummylogin\"\r\n },\r\n {\r\n \"membershipType\": \"Include\",\r\n \"type\": \"SqlServer\",\r\n \"serverName\": \"s1\",\r\n \"refreshCredential\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919/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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919/jobAgents/agent/credentials/dummylogin\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919/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 18:59:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "70ffddf4-d38c-41bd-8fcf-3bbeaee2e6a8" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "3e9bc2ff-c13f-40db-8b9d-cbfea61639ea" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185930Z:3e9bc2ff-c13f-40db-8b9d-cbfea61639ea" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919/jobAgents/agent/targetGroups?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg3ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04OTE5L2pvYkFnZW50cy9hZ2VudC90YXJnZXRHcm91cHM/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "84282622-f9f8-4303-965b-80a25c628cb6" + ], + "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\": \"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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919/jobAgents/agent/credentials/dummylogin\"\r\n },\r\n {\r\n \"membershipType\": \"Include\",\r\n \"type\": \"SqlServer\",\r\n \"serverName\": \"s1\",\r\n \"refreshCredential\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919/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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919/jobAgents/agent/credentials/dummylogin\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919/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 18:59:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "917935ff-3f7d-453a-a645-6378871f2e01" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14979" + ], + "x-ms-correlation-request-id": [ + "73122dfc-2f37-47b7-ab61-283f9daac3ff" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185930Z:73122dfc-2f37-47b7-ab61-283f9daac3ff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-8780/providers/Microsoft.Sql/servers/sqlcrudtest-8919/jobAgents/agent/targetGroups/tg1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTg3ODAvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC04OTE5L2pvYkFnZW50cy9hZ2VudC90YXJnZXRHcm91cHMvdGcxP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "8b77cd1a-613c-441d-afc4-c1e35574f0c9" + ], + "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 18:59:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "d223d35b-3790-4476-85a8-e23e1789cd06" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "314fb538-6d94-425b-9b0d-cfaf47c719b5" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185931Z:314fb538-6d94-425b-9b0d-cfaf47c719b5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-8780?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTg3ODA/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "cc72b317-8bef-4a29-a377-d89a3144df56" + ], + "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 18:59:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDg3ODAtTk9SVEhDRU5UUkFMVVMiLCJqb2JMb2NhdGlvbiI6Im5vcnRoY2VudHJhbHVzIn0?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "fc899254-c602-4e58-aae9-5c184e7685b8" + ], + "x-ms-correlation-request-id": [ + "fc899254-c602-4e58-aae9-5c184e7685b8" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185932Z:fc899254-c602-4e58-aae9-5c184e7685b8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-8780?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTg3ODA/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "dfe200f8-01cd-4cdc-9a91-d9387be80cb4" + ], + "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 18:59:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDg3ODAtTk9SVEhDRU5UUkFMVVMiLCJqb2JMb2NhdGlvbiI6Im5vcnRoY2VudHJhbHVzIn0?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14998" + ], + "x-ms-request-id": [ + "91b3777c-7c12-4ca5-a0c3-d043245eb0bd" + ], + "x-ms-correlation-request-id": [ + "91b3777c-7c12-4ca5-a0c3-d043245eb0bd" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T185933Z:91b3777c-7c12-4ca5-a0c3-d043245eb0bd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + } + ], + "Names": { + "CreateResourceGroup": [ + "sqlcrudtest-8780" + ], + "CreateServer": [ + "sqlcrudtest-8919" + ], + "TestCreateUpdateDropTargetGroup": [ + "sqlcrudtest-2891" + ] + }, + "Variables": { + "SubscriptionId": "f28872d6-4a93-4bb1-84b9-aecb02b6af4c", + "DefaultLocation": "north central us" + } +} \ 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 0000000000000..509349e969c28 --- /dev/null +++ b/src/SDKs/SqlManagement/Sql.Tests/SessionRecords/Sql.Tests.ElasticJobAgentScenarioTests/TestStartStopGetJobExecution.json @@ -0,0 +1,2857 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-2298?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTIyOTg/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"north central us\",\r\n \"tags\": {\r\n \"sqlcrudtest-2298\": \"2018-05-22 19:16:56Z\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "105" + ], + "x-ms-client-request-id": [ + "6dc1a73e-47f6-4ad2-b659-5736c11532bb" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298\",\r\n \"name\": \"sqlcrudtest-2298\",\r\n \"location\": \"northcentralus\",\r\n \"tags\": {\r\n \"sqlcrudtest-2298\": \"2018-05-22 19:16:56Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "244" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:16:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "f6c3930d-39d1-4af0-9e14-972aa3fc61c6" + ], + "x-ms-correlation-request-id": [ + "f6c3930d-39d1-4af0-9e14-972aa3fc61c6" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191657Z:f6c3930d-39d1-4af0-9e14-972aa3fc61c6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00NjIzP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "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\": \"north central us\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "190" + ], + "x-ms-client-request-id": [ + "071e238a-50ff-4935-888f-ec6a1709c534" + ], + "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-22T19:16:59.623Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "74" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:16:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/locations/northcentralus/serverOperationResults/5d8cc7d9-feb2-4fbe-a681-560b76803fc1?api-version=2015-05-01-preview" + ], + "Retry-After": [ + "1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/5d8cc7d9-feb2-4fbe-a681-560b76803fc1?api-version=2015-05-01-preview" + ], + "x-ms-request-id": [ + "5d8cc7d9-feb2-4fbe-a681-560b76803fc1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "013a3e40-7285-47bb-9b7b-ae0367c16f38" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191659Z:013a3e40-7285-47bb-9b7b-ae0367c16f38" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/5d8cc7d9-feb2-4fbe-a681-560b76803fc1?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vNWQ4Y2M3ZDktZmViMi00ZmJlLWE2ODEtNTYwYjc2ODAzZmMxP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"5d8cc7d9-feb2-4fbe-a681-560b76803fc1\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:16:59.623Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:17:09 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "06748a51-f5c0-4f2e-a8c9-8b1693000742" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "49c177b4-0b97-47eb-98a4-3a274b3afe47" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191709Z:49c177b4-0b97-47eb-98a4-3a274b3afe47" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/5d8cc7d9-feb2-4fbe-a681-560b76803fc1?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vNWQ4Y2M3ZDktZmViMi00ZmJlLWE2ODEtNTYwYjc2ODAzZmMxP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"5d8cc7d9-feb2-4fbe-a681-560b76803fc1\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:16:59.623Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:17:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "5b0e75d8-f832-404b-ab77-b198406f4b5e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "58d57f17-d105-4da1-aac6-f6732074bfe7" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191730Z:58d57f17-d105-4da1-aac6-f6732074bfe7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/5d8cc7d9-feb2-4fbe-a681-560b76803fc1?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vNWQ4Y2M3ZDktZmViMi00ZmJlLWE2ODEtNTYwYjc2ODAzZmMxP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"5d8cc7d9-feb2-4fbe-a681-560b76803fc1\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:16:59.623Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:17:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "20" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "efaed5e4-6474-4f1a-a2e0-827a9da53d4b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "be8f2e0e-73a0-472b-b934-67518d8a5082" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191750Z:be8f2e0e-73a0-472b-b934-67518d8a5082" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/locations/northcentralus/serverAzureAsyncOperation/5d8cc7d9-feb2-4fbe-a681-560b76803fc1?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL3NlcnZlckF6dXJlQXN5bmNPcGVyYXRpb24vNWQ4Y2M3ZDktZmViMi00ZmJlLWE2ODEtNTYwYjc2ODAzZmMxP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"5d8cc7d9-feb2-4fbe-a681-560b76803fc1\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T19:16:59.623Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:18:09 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "5e201b90-8998-4f6b-9853-fb144e01c584" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "0b206a55-e3a3-43dd-bdce-7cdf97992958" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191810Z:0b206a55-e3a3-43dd-bdce-7cdf97992958" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623?api-version=2015-05-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00NjIzP2FwaS12ZXJzaW9uPTIwMTUtMDUtMDEtcHJldmlldw==", + "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-4623.database.windows.net\"\r\n },\r\n \"location\": \"northcentralus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623\",\r\n \"name\": \"sqlcrudtest-4623\",\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 19:18:10 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "27911e75-2198-4efd-94db-9426206b4490" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "2b2bf374-3ef0-4738-88d9-39057e75935c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191810Z:2b2bf374-3ef0-4738-88d9-39057e75935c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/firewallRules/allowAll?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00NjIzL2ZpcmV3YWxsUnVsZXMvYWxsb3dBbGw/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": [ + "20fa4336-4941-4bcd-91f0-860510cbad42" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/firewallRules/allowAll\",\r\n \"name\": \"allowAll\",\r\n \"type\": \"Microsoft.Sql/servers/firewallRules\",\r\n \"location\": \"North Central US\",\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": [ + "347" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:18:11 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "06874554-e909-4e60-a14a-68ab28d11fb6" + ], + "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": [ + "625235ff-4ca0-4bc5-ad00-2eb64c64aef3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191812Z:625235ff-4ca0-4bc5-ad00-2eb64c64aef3" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/databases/sqlcrudtest-4805?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00NjIzL2RhdGFiYXNlcy9zcWxjcnVkdGVzdC00ODA1P2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"northcentralus\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "36" + ], + "x-ms-client-request-id": [ + "23660e48-0fe4-4e82-b0cd-a6400e93c93d" + ], + "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-22T19:18:13.42Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "75" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:18:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/locations/northcentralus/databaseOperationResults/fe093bcf-1211-460c-8ea1-7b8dc0d04a39?api-version=2017-10-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/fe093bcf-1211-460c-8ea1-7b8dc0d04a39?api-version=2017-10-01-preview" + ], + "x-ms-request-id": [ + "dd5158ef-b47c-4532-b563-de6bf2c1f673" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "b8d1f6a0-fd38-4f65-bfaa-5a04b55fb135" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191813Z:b8d1f6a0-fd38-4f65-bfaa-5a04b55fb135" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/fe093bcf-1211-460c-8ea1-7b8dc0d04a39?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi9mZTA5M2JjZi0xMjExLTQ2MGMtOGVhMS03YjhkYzBkMDRhMzk/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"fe093bcf-1211-460c-8ea1-7b8dc0d04a39\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:18:13.42Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:18:27 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7076e6e6-d8ec-4ce2-8c4d-a4365c49f2dd" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "df2c3d96-1c6c-4ab3-b31e-fe66af1b8ef3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191828Z:df2c3d96-1c6c-4ab3-b31e-fe66af1b8ef3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/fe093bcf-1211-460c-8ea1-7b8dc0d04a39?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi9mZTA5M2JjZi0xMjExLTQ2MGMtOGVhMS03YjhkYzBkMDRhMzk/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"fe093bcf-1211-460c-8ea1-7b8dc0d04a39\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:18:13.42Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:18:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b07ec574-12c0-4bc1-a1c1-5c7917070cc5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "7c46bc64-717c-4281-9cad-42c844352fcf" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191843Z:7c46bc64-717c-4281-9cad-42c844352fcf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/fe093bcf-1211-460c-8ea1-7b8dc0d04a39?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi9mZTA5M2JjZi0xMjExLTQ2MGMtOGVhMS03YjhkYzBkMDRhMzk/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"fe093bcf-1211-460c-8ea1-7b8dc0d04a39\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:18:13.42Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:18:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e6776f22-7166-498c-82f0-119f4a5e95ba" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "c49044a8-a42e-4211-a765-8669c35ad47b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191858Z:c49044a8-a42e-4211-a765-8669c35ad47b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/locations/northcentralus/databaseAzureAsyncOperation/fe093bcf-1211-460c-8ea1-7b8dc0d04a39?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2RhdGFiYXNlQXp1cmVBc3luY09wZXJhdGlvbi9mZTA5M2JjZi0xMjExLTQ2MGMtOGVhMS03YjhkYzBkMDRhMzk/YXBpLXZlcnNpb249MjAxNy0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"fe093bcf-1211-460c-8ea1-7b8dc0d04a39\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T19:18:13.42Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:19:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9a4f43bf-85dc-4d69-9a26-daacb138ecc0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "17bab56a-884b-4aac-9564-d9788ef0f3f5" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191913Z:17bab56a-884b-4aac-9564-d9788ef0f3f5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/databases/sqlcrudtest-4805?api-version=2017-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00NjIzL2RhdGFiYXNlcy9zcWxjcnVkdGVzdC00ODA1P2FwaS12ZXJzaW9uPTIwMTctMTAtMDEtcHJldmlldw==", + "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\": \"9646a878-2331-4ef5-8910-6be147e68cb5\",\r\n \"creationDate\": \"2018-05-22T19:18:13.763Z\",\r\n \"currentServiceObjectiveName\": \"S0\",\r\n \"requestedServiceObjectiveName\": \"S0\",\r\n \"defaultSecondaryLocation\": \"South Central US\",\r\n \"catalogCollation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"zoneRedundant\": false,\r\n \"earliestRestoreDate\": \"2018-05-22T19:49:01.873Z\",\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\": \"northcentralus\",\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/databases/sqlcrudtest-4805\",\r\n \"name\": \"sqlcrudtest-4805\",\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 19:19:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ed9623fe-34ea-4636-b353-4c806f132d1d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "0d0c5943-c9e1-4503-b52a-d9022869cd85" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191914Z:0d0c5943-c9e1-4503-b52a-d9022869cd85" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00NjIzL2pvYkFnZW50cy9hZ2VudD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"databaseId\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/databases/sqlcrudtest-4805\"\r\n },\r\n \"location\": \"northcentralus\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "242" + ], + "x-ms-client-request-id": [ + "976f26c5-b2fc-4cb3-af5c-28d1d0e8b23d" + ], + "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-22T19:19:15.233Z\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "71" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:19:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/locations/northcentralus/jobAgentOperationResults/3e4481ac-2cc2-4d82-aa1e-e3b78d26fe0b?api-version=2017-03-01-preview" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/3e4481ac-2cc2-4d82-aa1e-e3b78d26fe0b?api-version=2017-03-01-preview" + ], + "x-ms-request-id": [ + "dfd61b4e-f778-4dd3-adcf-4708d6640c58" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "ecb4334d-4c4f-44c0-8e1a-c766de59a557" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191915Z:ecb4334d-4c4f-44c0-8e1a-c766de59a557" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/3e4481ac-2cc2-4d82-aa1e-e3b78d26fe0b?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi8zZTQ0ODFhYy0yY2MyLTRkODItYWExZS1lM2I3OGQyNmZlMGI/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"3e4481ac-2cc2-4d82-aa1e-e3b78d26fe0b\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:19:15.233Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:19:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "bc137912-89aa-44e9-9919-e636bd8ae98e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "6d74a7c0-65d7-4bfb-8fea-96eb5d8b155f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191930Z:6d74a7c0-65d7-4bfb-8fea-96eb5d8b155f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/3e4481ac-2cc2-4d82-aa1e-e3b78d26fe0b?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi8zZTQ0ODFhYy0yY2MyLTRkODItYWExZS1lM2I3OGQyNmZlMGI/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"3e4481ac-2cc2-4d82-aa1e-e3b78d26fe0b\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:19:15.233Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:19:44 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "cbbc8261-a8c5-446e-88da-edb3dedce4fc" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "7fa2cb47-8191-4235-9648-f200025706ec" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T191945Z:7fa2cb47-8191-4235-9648-f200025706ec" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/3e4481ac-2cc2-4d82-aa1e-e3b78d26fe0b?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi8zZTQ0ODFhYy0yY2MyLTRkODItYWExZS1lM2I3OGQyNmZlMGI/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"3e4481ac-2cc2-4d82-aa1e-e3b78d26fe0b\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:19:15.233Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:20:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f7a7597a-2e9f-49eb-af4f-8243eb93b005" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "c8c99e5b-3ca3-4117-b146-4cdb220616ac" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T192000Z:c8c99e5b-3ca3-4117-b146-4cdb220616ac" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/3e4481ac-2cc2-4d82-aa1e-e3b78d26fe0b?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi8zZTQ0ODFhYy0yY2MyLTRkODItYWExZS1lM2I3OGQyNmZlMGI/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"3e4481ac-2cc2-4d82-aa1e-e3b78d26fe0b\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:19:15.233Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:20:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "dad6e9f7-227b-4a82-9aac-9924445dd41b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "0b6bc271-db86-4ae3-9679-50d5117bff50" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T192015Z:0b6bc271-db86-4ae3-9679-50d5117bff50" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/3e4481ac-2cc2-4d82-aa1e-e3b78d26fe0b?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi8zZTQ0ODFhYy0yY2MyLTRkODItYWExZS1lM2I3OGQyNmZlMGI/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"3e4481ac-2cc2-4d82-aa1e-e3b78d26fe0b\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:19:15.233Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:20:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "a5feed77-a952-4396-b6ea-7ba43ea16f3a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "b2ee1165-4cc9-4d7c-9999-3a6494f85eed" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T192031Z:b2ee1165-4cc9-4d7c-9999-3a6494f85eed" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/3e4481ac-2cc2-4d82-aa1e-e3b78d26fe0b?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi8zZTQ0ODFhYy0yY2MyLTRkODItYWExZS1lM2I3OGQyNmZlMGI/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"3e4481ac-2cc2-4d82-aa1e-e3b78d26fe0b\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:19:15.233Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:20:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "cb90d2d3-6904-4d05-8a64-d4ddc9a4504b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "f420afae-5e7a-4c73-972d-9d61e0e14f4a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T192046Z:f420afae-5e7a-4c73-972d-9d61e0e14f4a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/3e4481ac-2cc2-4d82-aa1e-e3b78d26fe0b?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi8zZTQ0ODFhYy0yY2MyLTRkODItYWExZS1lM2I3OGQyNmZlMGI/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"3e4481ac-2cc2-4d82-aa1e-e3b78d26fe0b\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:19:15.233Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:21:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "8c140254-970c-44b7-b39d-343cafa6baa9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "c47bad5c-718f-4956-b76b-3c38a5af5112" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T192101Z:c47bad5c-718f-4956-b76b-3c38a5af5112" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/3e4481ac-2cc2-4d82-aa1e-e3b78d26fe0b?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi8zZTQ0ODFhYy0yY2MyLTRkODItYWExZS1lM2I3OGQyNmZlMGI/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"3e4481ac-2cc2-4d82-aa1e-e3b78d26fe0b\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:19:15.233Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:21:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "6a4ee965-61c9-47e6-9eb3-d10ff5aea1ab" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "7dbee6ec-bbb8-4cdc-867d-7a25a252ddbd" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T192116Z:7dbee6ec-bbb8-4cdc-867d-7a25a252ddbd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/3e4481ac-2cc2-4d82-aa1e-e3b78d26fe0b?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi8zZTQ0ODFhYy0yY2MyLTRkODItYWExZS1lM2I3OGQyNmZlMGI/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"3e4481ac-2cc2-4d82-aa1e-e3b78d26fe0b\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:19:15.233Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:21:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "0d7becad-db8a-410d-a3d3-3c57c339e6df" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-correlation-request-id": [ + "c22cb09f-bd6f-4c33-9dea-8f3b1ba10fdd" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T192131Z:c22cb09f-bd6f-4c33-9dea-8f3b1ba10fdd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/3e4481ac-2cc2-4d82-aa1e-e3b78d26fe0b?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi8zZTQ0ODFhYy0yY2MyLTRkODItYWExZS1lM2I3OGQyNmZlMGI/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"3e4481ac-2cc2-4d82-aa1e-e3b78d26fe0b\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2018-05-22T19:19:15.233Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:21:46 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "42157fe1-42e8-45b3-9278-1a39f44392cb" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-correlation-request-id": [ + "d8111176-e1a4-4315-bdc2-274d28292880" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T192146Z:d8111176-e1a4-4315-bdc2-274d28292880" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/locations/northcentralus/jobAgentAzureAsyncOperation/3e4481ac-2cc2-4d82-aa1e-e3b78d26fe0b?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL25vcnRoY2VudHJhbHVzL2pvYkFnZW50QXp1cmVBc3luY09wZXJhdGlvbi8zZTQ0ODFhYy0yY2MyLTRkODItYWExZS1lM2I3OGQyNmZlMGI/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.16.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"3e4481ac-2cc2-4d82-aa1e-e3b78d26fe0b\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2018-05-22T19:19:15.233Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 22 May 2018 19:22:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Retry-After": [ + "15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "c0ea748b-3a6b-4504-92c3-7f6187a6af72" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14979" + ], + "x-ms-correlation-request-id": [ + "d4b5187e-40ac-4400-8742-8e4b13e91401" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T192201Z:d4b5187e-40ac-4400-8742-8e4b13e91401" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00NjIzL2pvYkFnZW50cy9hZ2VudD9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/databases/sqlcrudtest-4805\",\r\n \"state\": \"Ready\"\r\n },\r\n \"location\": \"northcentralus\",\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/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 19:22:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "268ba79b-9b98-4437-a92e-34af6dd9df7a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14978" + ], + "x-ms-correlation-request-id": [ + "5ec1f36e-e5cb-48b7-a7ca-5da551a86e3b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T192201Z:5ec1f36e-e5cb-48b7-a7ca-5da551a86e3b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/credentials/dummylogin?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00NjIzL2pvYkFnZW50cy9hZ2VudC9jcmVkZW50aWFscy9kdW1teWxvZ2luP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "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": [ + "b39801b9-ae0e-470c-99ee-da1f55dff9ba" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/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 19:22:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "eff67061-203b-43af-a1b1-a4e67ac8b2f3" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "3e38fa28-a38d-48cd-a67f-2e86294c8e08" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T192202Z:3e38fa28-a38d-48cd-a67f-2e86294c8e08" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/targetGroups/tg1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00NjIzL2pvYkFnZW50cy9hZ2VudC90YXJnZXRHcm91cHMvdGcxP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"members\": [\r\n {\r\n \"membershipType\": \"Include\",\r\n \"type\": \"SqlDatabase\",\r\n \"serverName\": \"sqlcrudtest-4623\",\r\n \"databaseName\": \"sqlcrudtest-4805\"\r\n }\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "228" + ], + "x-ms-client-request-id": [ + "97af3b91-1f8f-48fc-a3d6-7fd606c63a5c" + ], + "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-4623\",\r\n \"databaseName\": \"sqlcrudtest-4805\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/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": [ + "Tue, 22 May 2018 19:22:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "271ae33e-91b3-46cf-932e-a9b657a188ad" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "abc3323e-b51a-4f8e-a572-f46984bc51e2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T192205Z:abc3323e-b51a-4f8e-a572-f46984bc51e2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/jobs/job1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00NjIzL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjE/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": [ + "b7bec48a-90f0-48e5-a85e-ea790c3d62ff" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/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 19:22:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "74f511b8-4010-4c1b-8749-cacd7a7a6e42" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-correlation-request-id": [ + "36a609b7-0537-45fc-864d-f37bcca70d89" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T192206Z:36a609b7-0537-45fc-864d-f37bcca70d89" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/jobs/job1/steps/step1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00NjIzL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvc3RlcHMvc3RlcDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"targetGroup\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/targetGroups/tg1\",\r\n \"credential\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/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": [ + "50106a66-eb12-4178-9232-1094c265c837" + ], + "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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/targetGroups/tg1\",\r\n \"credential\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/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/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/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 19:22:07 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "7038b789-129f-4c29-ba4d-368dcc793391" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1192" + ], + "x-ms-correlation-request-id": [ + "0e911ee6-e11f-41bf-bef6-ba51cfca06df" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T192207Z:0e911ee6-e11f-41bf-bef6-ba51cfca06df" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/jobs/job1/start?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00NjIzL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvc3RhcnQ/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "94c1571a-c9ed-42cf-81eb-626b49f80d23" + ], + "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\": \"20cb0c22-a168-4b8f-9bd2-049ca6ed68bf\",\r\n \"lifecycle\": \"Created\",\r\n \"provisioningState\": \"Created\",\r\n \"createTime\": \"2018-05-22T19:22:07.92Z\",\r\n \"currentAttempts\": 0,\r\n \"lastMessage\": \"Job execution created.\"\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/jobs/job1/executions/20cb0c22-a168-4b8f-9bd2-049ca6ed68bf\",\r\n \"name\": \"20cb0c22-a168-4b8f-9bd2-049ca6ed68bf\",\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 19:22:07 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/jobs/job1/executions/20cb0c22-a168-4b8f-9bd2-049ca6ed68bf?api-version=2017-03-01-preview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "8976f3d9-ce66-42d7-9f74-dd77e26566ce" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1191" + ], + "x-ms-correlation-request-id": [ + "c92682da-cd3f-4147-b11e-fb562d53d7bb" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T192208Z:c92682da-cd3f-4147-b11e-fb562d53d7bb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/jobs/job1/executions/20cb0c22-a168-4b8f-9bd2-049ca6ed68bf?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00NjIzL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvZXhlY3V0aW9ucy8yMGNiMGMyMi1hMTY4LTRiOGYtOWJkMi0wNDljYTZlZDY4YmY/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\": \"20cb0c22-a168-4b8f-9bd2-049ca6ed68bf\",\r\n \"lifecycle\": \"WaitingForChildJobExecutions\",\r\n \"provisioningState\": \"InProgress\",\r\n \"createTime\": \"2018-05-22T19:22:07.92Z\",\r\n \"startTime\": \"2018-05-22T19:22:14.5979998Z\",\r\n \"currentAttempts\": 0,\r\n \"lastMessage\": \"Job execution waiting for job steps to complete.\"\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/jobs/job1/executions/20cb0c22-a168-4b8f-9bd2-049ca6ed68bf\",\r\n \"name\": \"20cb0c22-a168-4b8f-9bd2-049ca6ed68bf\",\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 19:22:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b33b21f8-2cd4-44d0-851c-95b5158bb5a5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14977" + ], + "x-ms-correlation-request-id": [ + "238e330a-b51a-41b6-99c6-317c8f424088" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T192238Z:238e330a-b51a-41b6-99c6-317c8f424088" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/jobs/job1/executions/20cb0c22-a168-4b8f-9bd2-049ca6ed68bf?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00NjIzL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvZXhlY3V0aW9ucy8yMGNiMGMyMi1hMTY4LTRiOGYtOWJkMi0wNDljYTZlZDY4YmY/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\": \"20cb0c22-a168-4b8f-9bd2-049ca6ed68bf\",\r\n \"lifecycle\": \"Succeeded\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"createTime\": \"2018-05-22T19:22:07.92Z\",\r\n \"startTime\": \"2018-05-22T19:22:14.5979998Z\",\r\n \"endTime\": \"2018-05-22T19:22:41.8803248Z\",\r\n \"currentAttempts\": 0,\r\n \"lastMessage\": \"Job execution succeeded.\"\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/jobs/job1/executions/20cb0c22-a168-4b8f-9bd2-049ca6ed68bf\",\r\n \"name\": \"20cb0c22-a168-4b8f-9bd2-049ca6ed68bf\",\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 19:23:09 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "bb458367-c074-41f6-a60a-ed342d443b5c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14976" + ], + "x-ms-correlation-request-id": [ + "9eabb94d-5935-4299-bbae-0f4c3a381118" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T192309Z:9eabb94d-5935-4299-bbae-0f4c3a381118" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/jobs/job1/executions/20cb0c22-a168-4b8f-9bd2-049ca6ed68bf?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00NjIzL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvZXhlY3V0aW9ucy8yMGNiMGMyMi1hMTY4LTRiOGYtOWJkMi0wNDljYTZlZDY4YmY/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e8424b44-2a31-4225-ae60-bcbf96d48183" + ], + "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\": \"20cb0c22-a168-4b8f-9bd2-049ca6ed68bf\",\r\n \"lifecycle\": \"Succeeded\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"createTime\": \"2018-05-22T19:22:07.92Z\",\r\n \"startTime\": \"2018-05-22T19:22:14.5979998Z\",\r\n \"endTime\": \"2018-05-22T19:22:41.8803248Z\",\r\n \"currentAttempts\": 0,\r\n \"lastMessage\": \"Job execution succeeded.\"\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/jobs/job1/executions/20cb0c22-a168-4b8f-9bd2-049ca6ed68bf\",\r\n \"name\": \"20cb0c22-a168-4b8f-9bd2-049ca6ed68bf\",\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 19:23:10 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9bf2060e-5ef2-41f6-8a43-8a85a746e2b7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14973" + ], + "x-ms-correlation-request-id": [ + "141dd7b8-d3b0-4f97-8d17-97750f674b78" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T192310Z:141dd7b8-d3b0-4f97-8d17-97750f674b78" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/executions?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00NjIzL2pvYkFnZW50cy9hZ2VudC9leGVjdXRpb25zP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f745b5c2-b682-438e-a172-1f70801ba50c" + ], + "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\": \"20cb0c22-a168-4b8f-9bd2-049ca6ed68bf\",\r\n \"lifecycle\": \"Succeeded\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"createTime\": \"2018-05-22T19:22:07.92Z\",\r\n \"startTime\": \"2018-05-22T19:22:14.5979998Z\",\r\n \"endTime\": \"2018-05-22T19:22:41.8803248Z\",\r\n \"currentAttempts\": 0,\r\n \"lastMessage\": \"Job execution succeeded.\"\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/jobs/job1/executions/20cb0c22-a168-4b8f-9bd2-049ca6ed68bf\",\r\n \"name\": \"20cb0c22-a168-4b8f-9bd2-049ca6ed68bf\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/executions\"\r\n },\r\n {\r\n \"properties\": {\r\n \"jobVersion\": 1,\r\n \"jobExecutionId\": \"73132fac-8dce-4142-869d-48e4667e58b9\",\r\n \"lifecycle\": \"Skipped\",\r\n \"provisioningState\": \"Canceled\",\r\n \"createTime\": \"2018-05-22T19:22:17.098088Z\",\r\n \"startTime\": \"2018-05-22T19:22:24.1466374Z\",\r\n \"endTime\": \"2018-05-22T19:22:37.2238776Z\",\r\n \"currentAttempts\": 0,\r\n \"lastMessage\": \"Job execution skipped.\"\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/jobs/job1/executions/73132fac-8dce-4142-869d-48e4667e58b9\",\r\n \"name\": \"73132fac-8dce-4142-869d-48e4667e58b9\",\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 19:23:09 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ea8ee0ad-4419-4c05-b537-ae8939a54692" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14975" + ], + "x-ms-correlation-request-id": [ + "a6d03a4b-2928-4d11-b152-f896e532b6bb" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T192309Z:a6d03a4b-2928-4d11-b152-f896e532b6bb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/jobs/job1/executions?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00NjIzL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvZXhlY3V0aW9ucz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "db37a6a9-44ac-4137-84bf-9f079b2fd0e9" + ], + "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\": \"20cb0c22-a168-4b8f-9bd2-049ca6ed68bf\",\r\n \"lifecycle\": \"Succeeded\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"createTime\": \"2018-05-22T19:22:07.92Z\",\r\n \"startTime\": \"2018-05-22T19:22:14.5979998Z\",\r\n \"endTime\": \"2018-05-22T19:22:41.8803248Z\",\r\n \"currentAttempts\": 0,\r\n \"lastMessage\": \"Job execution succeeded.\"\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/jobs/job1/executions/20cb0c22-a168-4b8f-9bd2-049ca6ed68bf\",\r\n \"name\": \"20cb0c22-a168-4b8f-9bd2-049ca6ed68bf\",\r\n \"type\": \"Microsoft.Sql/servers/jobAgents/jobs/executions\"\r\n },\r\n {\r\n \"properties\": {\r\n \"jobVersion\": 1,\r\n \"jobExecutionId\": \"73132fac-8dce-4142-869d-48e4667e58b9\",\r\n \"lifecycle\": \"Skipped\",\r\n \"provisioningState\": \"Canceled\",\r\n \"createTime\": \"2018-05-22T19:22:17.098088Z\",\r\n \"startTime\": \"2018-05-22T19:22:24.1466374Z\",\r\n \"endTime\": \"2018-05-22T19:22:37.2238776Z\",\r\n \"currentAttempts\": 0,\r\n \"lastMessage\": \"Job execution skipped.\"\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/jobs/job1/executions/73132fac-8dce-4142-869d-48e4667e58b9\",\r\n \"name\": \"73132fac-8dce-4142-869d-48e4667e58b9\",\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 19:23:10 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "79932c46-d2e1-4404-9a71-c54a76e694cb" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14974" + ], + "x-ms-correlation-request-id": [ + "b023f841-8145-4196-aeb1-d9585b48f4be" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T192310Z:b023f841-8145-4196-aeb1-d9585b48f4be" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/jobs/job1/executions/20cb0c22-a168-4b8f-9bd2-049ca6ed68bf/steps?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00NjIzL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvZXhlY3V0aW9ucy8yMGNiMGMyMi1hMTY4LTRiOGYtOWJkMi0wNDljYTZlZDY4YmYvc3RlcHM/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "84d0f79d-42aa-40e4-a673-3472b01f25bb" + ], + "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\": \"20cb0c22-a168-4b8f-9bd2-049ca6ed68bf\",\r\n \"lifecycle\": \"Succeeded\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"createTime\": \"2018-05-22T19:22:14.5979998Z\",\r\n \"startTime\": \"2018-05-22T19:22:18.2700156Z\",\r\n \"endTime\": \"2018-05-22T19:22:40.7083879Z\",\r\n \"currentAttempts\": 1,\r\n \"currentAttemptStartTime\": \"2018-05-22T19:22:31.3955439Z\",\r\n \"lastMessage\": \"Step 1 succeeded.\"\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/jobs/job1/executions/20cb0c22-a168-4b8f-9bd2-049ca6ed68bf/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 19:23:10 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e6162370-534f-4539-a04a-74f48fc5ea96" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14972" + ], + "x-ms-correlation-request-id": [ + "6602cf8d-f24a-44c8-a384-b2d2e36b1dc4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T192311Z:6602cf8d-f24a-44c8-a384-b2d2e36b1dc4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/jobs/job1/executions/20cb0c22-a168-4b8f-9bd2-049ca6ed68bf/steps/step1?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00NjIzL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvZXhlY3V0aW9ucy8yMGNiMGMyMi1hMTY4LTRiOGYtOWJkMi0wNDljYTZlZDY4YmYvc3RlcHMvc3RlcDE/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "63be0c4c-f186-47e2-9937-e8e8076fea11" + ], + "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\": \"20cb0c22-a168-4b8f-9bd2-049ca6ed68bf\",\r\n \"lifecycle\": \"Succeeded\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"createTime\": \"2018-05-22T19:22:14.5979998Z\",\r\n \"startTime\": \"2018-05-22T19:22:18.2700156Z\",\r\n \"endTime\": \"2018-05-22T19:22:40.7083879Z\",\r\n \"currentAttempts\": 1,\r\n \"currentAttemptStartTime\": \"2018-05-22T19:22:31.3955439Z\",\r\n \"lastMessage\": \"Step 1 succeeded.\"\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/jobs/job1/executions/20cb0c22-a168-4b8f-9bd2-049ca6ed68bf/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 19:23:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9fa641fe-0fe7-4ad1-a57a-b0c067ca3679" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14971" + ], + "x-ms-correlation-request-id": [ + "ee72455e-554f-465a-b962-93e1c126725a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T192311Z:ee72455e-554f-465a-b962-93e1c126725a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/jobs/job1/executions/20cb0c22-a168-4b8f-9bd2-049ca6ed68bf/targets?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00NjIzL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvZXhlY3V0aW9ucy8yMGNiMGMyMi1hMTY4LTRiOGYtOWJkMi0wNDljYTZlZDY4YmYvdGFyZ2V0cz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "fdcefea2-70c5-499a-9945-c1b9b0062944" + ], + "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\": \"20cb0c22-a168-4b8f-9bd2-049ca6ed68bf\",\r\n \"lifecycle\": \"Succeeded\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"createTime\": \"2018-05-22T19:22:31.84Z\",\r\n \"startTime\": \"2018-05-22T19:22:33.7393596Z\",\r\n \"endTime\": \"2018-05-22T19:22:39.5833301Z\",\r\n \"currentAttempts\": 1,\r\n \"currentAttemptStartTime\": \"2018-05-22T19:22:33.8018689Z\",\r\n \"lastMessage\": \"Step 1 succeeded execution on target (server 'sqlcrudtest-4623', database 'sqlcrudtest-4805').\",\r\n \"target\": {\r\n \"type\": \"SqlDatabase\",\r\n \"serverName\": \"sqlcrudtest-4623\",\r\n \"databaseName\": \"sqlcrudtest-4805\"\r\n }\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/jobs/job1/executions/20cb0c22-a168-4b8f-9bd2-049ca6ed68bf/steps/step1/targets/fde97207-0ba1-4765-afcf-0eb38d685627\",\r\n \"name\": \"fde97207-0ba1-4765-afcf-0eb38d685627\",\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 19:23:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "1cefe400-a1a4-4408-be12-b58e44d75027" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14970" + ], + "x-ms-correlation-request-id": [ + "16f4932d-6b3f-4462-9dee-03fd581ebedc" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T192311Z:16f4932d-6b3f-4462-9dee-03fd581ebedc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/jobs/job1/executions/20cb0c22-a168-4b8f-9bd2-049ca6ed68bf/steps/step1/targets?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00NjIzL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvZXhlY3V0aW9ucy8yMGNiMGMyMi1hMTY4LTRiOGYtOWJkMi0wNDljYTZlZDY4YmYvc3RlcHMvc3RlcDEvdGFyZ2V0cz9hcGktdmVyc2lvbj0yMDE3LTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3f692826-1277-4552-a740-1c16dfd4279c" + ], + "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\": \"20cb0c22-a168-4b8f-9bd2-049ca6ed68bf\",\r\n \"lifecycle\": \"Succeeded\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"createTime\": \"2018-05-22T19:22:31.84Z\",\r\n \"startTime\": \"2018-05-22T19:22:33.7393596Z\",\r\n \"endTime\": \"2018-05-22T19:22:39.5833301Z\",\r\n \"currentAttempts\": 1,\r\n \"currentAttemptStartTime\": \"2018-05-22T19:22:33.8018689Z\",\r\n \"lastMessage\": \"Step 1 succeeded execution on target (server 'sqlcrudtest-4623', database 'sqlcrudtest-4805').\",\r\n \"target\": {\r\n \"type\": \"SqlDatabase\",\r\n \"serverName\": \"sqlcrudtest-4623\",\r\n \"databaseName\": \"sqlcrudtest-4805\"\r\n }\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/jobs/job1/executions/20cb0c22-a168-4b8f-9bd2-049ca6ed68bf/steps/step1/targets/fde97207-0ba1-4765-afcf-0eb38d685627\",\r\n \"name\": \"fde97207-0ba1-4765-afcf-0eb38d685627\",\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 19:23:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e02e8299-f960-46ea-a192-235a58ba246d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14969" + ], + "x-ms-correlation-request-id": [ + "eb6a85de-c847-442f-9fcd-a09c00b69363" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T192312Z:eb6a85de-c847-442f-9fcd-a09c00b69363" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/jobs/job1/executions/20cb0c22-a168-4b8f-9bd2-049ca6ed68bf/steps/step1/targets/fde97207-0ba1-4765-afcf-0eb38d685627?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00NjIzL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvZXhlY3V0aW9ucy8yMGNiMGMyMi1hMTY4LTRiOGYtOWJkMi0wNDljYTZlZDY4YmYvc3RlcHMvc3RlcDEvdGFyZ2V0cy9mZGU5NzIwNy0wYmExLTQ3NjUtYWZjZi0wZWIzOGQ2ODU2Mjc/YXBpLXZlcnNpb249MjAxNy0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4eaef6d8-3061-4558-88fd-e0429a91d624" + ], + "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\": \"20cb0c22-a168-4b8f-9bd2-049ca6ed68bf\",\r\n \"lifecycle\": \"Succeeded\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"createTime\": \"2018-05-22T19:22:31.84Z\",\r\n \"startTime\": \"2018-05-22T19:22:33.7393596Z\",\r\n \"endTime\": \"2018-05-22T19:22:39.5833301Z\",\r\n \"currentAttempts\": 1,\r\n \"currentAttemptStartTime\": \"2018-05-22T19:22:33.8018689Z\",\r\n \"lastMessage\": \"Step 1 succeeded execution on target (server 'sqlcrudtest-4623', database 'sqlcrudtest-4805').\",\r\n \"target\": {\r\n \"type\": \"SqlDatabase\",\r\n \"serverName\": \"sqlcrudtest-4623\",\r\n \"databaseName\": \"sqlcrudtest-4805\"\r\n }\r\n },\r\n \"id\": \"/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/jobs/job1/executions/20cb0c22-a168-4b8f-9bd2-049ca6ed68bf/steps/step1/targets/fde97207-0ba1-4765-afcf-0eb38d685627\",\r\n \"name\": \"fde97207-0ba1-4765-afcf-0eb38d685627\",\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 19:23:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e19ed5b2-c75b-4fe4-88c1-ce827a09cddb" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14968" + ], + "x-ms-correlation-request-id": [ + "8c6830f9-5c83-465e-b3e6-b694b5abf055" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T192312Z:8c6830f9-5c83-465e-b3e6-b694b5abf055" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/jobs/job1/executions/20cb0c22-a168-4b8f-9bd2-049ca6ed68bf/cancel?api-version=2017-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTIyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC00NjIzL2pvYkFnZW50cy9hZ2VudC9qb2JzL2pvYjEvZXhlY3V0aW9ucy8yMGNiMGMyMi1hMTY4LTRiOGYtOWJkMi0wNDljYTZlZDY4YmYvY2FuY2VsP2FwaS12ZXJzaW9uPTIwMTctMDMtMDEtcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4fb603fd-4127-4003-abdf-e6fd4c9fa343" + ], + "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 19:23:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourceGroups/sqlcrudtest-2298/providers/Microsoft.Sql/servers/sqlcrudtest-4623/jobAgents/agent/jobs/job1/executions/20cb0c22-a168-4b8f-9bd2-049ca6ed68bf?api-version=2017-03-01-preview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "493bccd7-e539-4868-9772-f19be7fd26e6" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1190" + ], + "x-ms-correlation-request-id": [ + "fe54f0ca-3f00-49ee-8270-d3725f0a9aa9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T192313Z:fe54f0ca-3f00-49ee-8270-d3725f0a9aa9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-2298?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTIyOTg/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "fe65b974-b450-46d7-b031-fb6d4ea80e27" + ], + "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 19:23:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDIyOTgtTk9SVEhDRU5UUkFMVVMiLCJqb2JMb2NhdGlvbiI6Im5vcnRoY2VudHJhbHVzIn0?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "cd578ae9-635d-43c4-a463-30bc7643302f" + ], + "x-ms-correlation-request-id": [ + "cd578ae9-635d-43c4-a463-30bc7643302f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T192315Z:cd578ae9-635d-43c4-a463-30bc7643302f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/resourcegroups/sqlcrudtest-2298?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjI4ODcyZDYtNGE5My00YmIxLTg0YjktYWVjYjAyYjZhZjRjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTIyOTg/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b6c0d46c-e46b-468b-b783-bbc2bf7835a9" + ], + "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 19:23:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/f28872d6-4a93-4bb1-84b9-aecb02b6af4c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDIyOTgtTk9SVEhDRU5UUkFMVVMiLCJqb2JMb2NhdGlvbiI6Im5vcnRoY2VudHJhbHVzIn0?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14998" + ], + "x-ms-request-id": [ + "5104f64d-bdff-4b93-9d98-105bb707fe50" + ], + "x-ms-correlation-request-id": [ + "5104f64d-bdff-4b93-9d98-105bb707fe50" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20180522T192316Z:5104f64d-bdff-4b93-9d98-105bb707fe50" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ] + }, + "StatusCode": 202 + } + ], + "Names": { + "CreateResourceGroup": [ + "sqlcrudtest-2298" + ], + "CreateServer": [ + "sqlcrudtest-4623" + ], + "TestStartStopGetJobExecution": [ + "sqlcrudtest-4805" + ] + }, + "Variables": { + "DefaultLocation": "north central us", + "SubscriptionId": "f28872d6-4a93-4bb1-84b9-aecb02b6af4c" + } +} \ 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 0000000000000..5c7a6de253b4e --- /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 0000000000000..b0550be8fdafd --- /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 0000000000000..e4c04bfe5be43 --- /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 0000000000000..cb108b449e7ca --- /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 0000000000000..221e731530016 --- /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 0000000000000..d01d9f61b4db1 --- /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 5941ef96d5896..e278f2814205c 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 b2957616c3b08..a64607df0ba1d 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 b5a6936ab9c62..5c573adcd6aaa 100644 --- a/src/SDKs/_metadata/sql_resource-manager.txt +++ b/src/SDKs/_metadata/sql_resource-manager.txt @@ -1,11 +1,17 @@ -2018-04-18 23:35:28 UTC - +Executing AutoRest command +cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/sql/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=C:\git\azure-sdk-for-net\tools\..\src\SDKs\ +2018-05-23 21:15:50 UTC 1) azure-rest-api-specs repository information -GitHub user: jugeorge +GitHub fork: Azure Branch: master -Commit: d08c7f54a125819caaa8c5f553206d1adbae60f9 +Commit: edc50f1d3df16e6f639596de583243b12c20f9a0 2) AutoRest information Requested version: latest -Bootstrapper version: C:\Users\jugeorge\AppData\Roaming\npm `-- autorest@2.0.4262 +Bootstrapper version: C:\Users\jaredmoo\AppData\Roaming\npm `-- autorest@2.0.4262 + + Latest installed version: +.\tools\generate.ps1 was invoked by generate.ps1 + +