diff --git a/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/AzSdk.RP.props b/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/AzSdk.RP.props index 09e6e29b17c1..9ae9274ab461 100644 --- a/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/AzSdk.RP.props +++ b/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/AzSdk.RP.props @@ -1,7 +1,7 @@ - Sql_2017-03-01-preview;Sql_2017-10-01-preview;Sql_2014-04-01;Sql_2015-05-01-preview;Sql_2018-06-01-preview;Sql_2019-06-01-preview;Sql_2020-02-02-preview;Sql_2020-08-01-preview; + Sql_2017-03-01-preview;Sql_2017-10-01-preview;Sql_2018-06-01-preview;Sql_2014-04-01;Sql_2015-05-01-preview;Sql_2020-08-01-preview;Sql_2020-02-02-preview;Sql_2019-06-01-preview; $(PackageTags);$(CommonTags);$(AzureApiTag); \ No newline at end of file diff --git a/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Generated/IServerDevOpsAuditSettingsOperations.cs b/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Generated/IServerDevOpsAuditSettingsOperations.cs new file mode 100644 index 000000000000..17992f89712f --- /dev/null +++ b/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Generated/IServerDevOpsAuditSettingsOperations.cs @@ -0,0 +1,175 @@ +// +// 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; + + /// + /// ServerDevOpsAuditSettingsOperations operations. + /// + public partial interface IServerDevOpsAuditSettingsOperations + { + /// + /// Gets a server's DevOps audit settings. + /// + /// + /// The name of the resource group that contains the resource. You can + /// obtain this value from the Azure Resource Manager API or the + /// portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the devops audit settings. This should always be + /// 'default'. + /// + /// + /// 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 devOpsAuditingSettingsName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a server's DevOps audit settings. + /// + /// + /// The name of the resource group that contains the resource. You can + /// obtain this value from the Azure Resource Manager API or the + /// portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the devops audit settings. This should always be + /// 'default'. + /// + /// + /// Properties of DevOps audit settings + /// + /// + /// 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 devOpsAuditingSettingsName, ServerDevOpsAuditingSettings parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists DevOps audit settings of 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)); + /// + /// Creates or updates a server's DevOps audit settings. + /// + /// + /// The name of the resource group that contains the resource. You can + /// obtain this value from the Azure Resource Manager API or the + /// portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the devops audit settings. This should always be + /// 'default'. + /// + /// + /// Properties of DevOps audit settings + /// + /// + /// 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 devOpsAuditingSettingsName, ServerDevOpsAuditingSettings parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists DevOps audit settings of 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/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Generated/ISqlManagementClient.cs b/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Generated/ISqlManagementClient.cs index fe8469f5c556..4a8de77206cd 100644 --- a/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Generated/ISqlManagementClient.cs +++ b/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Generated/ISqlManagementClient.cs @@ -542,5 +542,10 @@ public partial interface ISqlManagementClient : System.IDisposable /// IServerTrustGroupsOperations ServerTrustGroups { get; } + /// + /// Gets the IServerDevOpsAuditSettingsOperations. + /// + IServerDevOpsAuditSettingsOperations ServerDevOpsAuditSettings { get; } + } } diff --git a/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Generated/Models/ServerDevOpsAuditingSettings.cs b/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Generated/Models/ServerDevOpsAuditingSettings.cs new file mode 100644 index 000000000000..0a8e7d51fe7e --- /dev/null +++ b/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Generated/Models/ServerDevOpsAuditingSettings.cs @@ -0,0 +1,180 @@ +// +// 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 server DevOps auditing settings. + /// + [Rest.Serialization.JsonTransformation] + public partial class ServerDevOpsAuditingSettings : ProxyResource + { + /// + /// Initializes a new instance of the ServerDevOpsAuditingSettings + /// class. + /// + public ServerDevOpsAuditingSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ServerDevOpsAuditingSettings + /// class. + /// + /// Specifies the state of the audit. If state is + /// Enabled, storageEndpoint or isAzureMonitorTargetEnabled are + /// required. Possible values include: 'Enabled', 'Disabled' + /// Resource ID. + /// Resource name. + /// Resource type. + /// SystemData of + /// ServerDevOpsAuditSettingsResource. + /// Specifies whether DevOps + /// audit events are sent to Azure Monitor. + /// In order to send the events to Azure Monitor, specify 'State' as + /// 'Enabled' and 'IsAzureMonitorTargetEnabled' as true. + /// + /// When using REST API to configure DevOps audit, Diagnostic Settings + /// with 'DevOpsOperationsAudit' diagnostic logs category on the master + /// database should be also created. + /// + /// Diagnostic Settings URI format: + /// PUT + /// https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + /// + /// For more information, see [Diagnostic Settings REST + /// API](https://go.microsoft.com/fwlink/?linkid=2033207) + /// or [Diagnostic Settings + /// PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + /// + /// Specifies the blob storage endpoint + /// (e.g. https://MyAccount.blob.core.windows.net). If state is + /// Enabled, storageEndpoint or isAzureMonitorTargetEnabled is + /// required. + /// Specifies the identifier key + /// of the auditing storage account. + /// If state is Enabled and storageEndpoint is specified, not + /// specifying the storageAccountAccessKey will use SQL server + /// system-assigned managed identity to access the storage. + /// Prerequisites for using managed identity authentication: + /// 1. Assign SQL Server a system-assigned managed identity in Azure + /// Active Directory (AAD). + /// 2. Grant SQL Server identity access to the storage account by + /// adding 'Storage Blob Data Contributor' RBAC role to the server + /// identity. + /// For more information, see [Auditing to storage using Managed + /// Identity + /// authentication](https://go.microsoft.com/fwlink/?linkid=2114355) + /// Specifies the blob + /// storage subscription Id. + public ServerDevOpsAuditingSettings(BlobAuditingPolicyState state, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), bool? isAzureMonitorTargetEnabled = default(bool?), string storageEndpoint = default(string), string storageAccountAccessKey = default(string), System.Guid? storageAccountSubscriptionId = default(System.Guid?)) + : base(id, name, type) + { + SystemData = systemData; + IsAzureMonitorTargetEnabled = isAzureMonitorTargetEnabled; + State = state; + StorageEndpoint = storageEndpoint; + StorageAccountAccessKey = storageAccountAccessKey; + StorageAccountSubscriptionId = storageAccountSubscriptionId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets systemData of ServerDevOpsAuditSettingsResource. + /// + [JsonProperty(PropertyName = "systemData")] + public SystemData SystemData { get; private set; } + + /// + /// Gets or sets specifies whether DevOps audit events are sent to + /// Azure Monitor. + /// In order to send the events to Azure Monitor, specify 'State' as + /// 'Enabled' and 'IsAzureMonitorTargetEnabled' as true. + /// + /// When using REST API to configure DevOps audit, Diagnostic Settings + /// with 'DevOpsOperationsAudit' diagnostic logs category on the master + /// database should be also created. + /// + /// Diagnostic Settings URI format: + /// PUT + /// https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + /// + /// For more information, see [Diagnostic Settings REST + /// API](https://go.microsoft.com/fwlink/?linkid=2033207) + /// or [Diagnostic Settings + /// PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + /// + /// + [JsonProperty(PropertyName = "properties.isAzureMonitorTargetEnabled")] + public bool? IsAzureMonitorTargetEnabled { get; set; } + + /// + /// Gets or sets specifies the state of the audit. If state is Enabled, + /// storageEndpoint or isAzureMonitorTargetEnabled are required. + /// Possible values include: 'Enabled', 'Disabled' + /// + [JsonProperty(PropertyName = "properties.state")] + public BlobAuditingPolicyState State { get; set; } + + /// + /// Gets or sets specifies the blob storage endpoint (e.g. + /// https://MyAccount.blob.core.windows.net). If state is Enabled, + /// storageEndpoint or isAzureMonitorTargetEnabled is required. + /// + [JsonProperty(PropertyName = "properties.storageEndpoint")] + public string StorageEndpoint { get; set; } + + /// + /// Gets or sets specifies the identifier key of the auditing storage + /// account. + /// If state is Enabled and storageEndpoint is specified, not + /// specifying the storageAccountAccessKey will use SQL server + /// system-assigned managed identity to access the storage. + /// Prerequisites for using managed identity authentication: + /// 1. Assign SQL Server a system-assigned managed identity in Azure + /// Active Directory (AAD). + /// 2. Grant SQL Server identity access to the storage account by + /// adding 'Storage Blob Data Contributor' RBAC role to the server + /// identity. + /// For more information, see [Auditing to storage using Managed + /// Identity + /// authentication](https://go.microsoft.com/fwlink/?linkid=2114355) + /// + [JsonProperty(PropertyName = "properties.storageAccountAccessKey")] + public string StorageAccountAccessKey { get; set; } + + /// + /// Gets or sets specifies the blob storage subscription Id. + /// + [JsonProperty(PropertyName = "properties.storageAccountSubscriptionId")] + public System.Guid? StorageAccountSubscriptionId { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + } + } +} diff --git a/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Generated/Models/SystemData.cs b/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Generated/Models/SystemData.cs new file mode 100644 index 000000000000..45f99b7eeb0f --- /dev/null +++ b/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Generated/Models/SystemData.cs @@ -0,0 +1,109 @@ +// +// 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.Azure; + using Newtonsoft.Json; + using System.Linq; + + /// + /// ARM System Data. + /// + public partial class SystemData : IResource + { + /// + /// Initializes a new instance of the SystemData class. + /// + public SystemData() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SystemData class. + /// + /// A string identifier for the identity that + /// created the resource. + /// The type of identity that created the + /// resource: <User|Application|ManagedIdentity|Key>. Possible + /// values include: 'User', 'Application', 'ManagedIdentity', + /// 'Key' + /// The timestamp of resource creation + /// (UTC). + /// A string identifier for the identity + /// that last modified the resource. + /// The type of identity that last + /// modified the resource: + /// <User|Application|ManagedIdentity|Key>. Possible values + /// include: 'User', 'Application', 'ManagedIdentity', 'Key' + /// The timestamp of last modification + /// (UTC). + public SystemData(string createdBy = default(string), string createdByType = default(string), System.DateTime? createdAt = default(System.DateTime?), string lastModifiedBy = default(string), string lastModifiedByType = default(string), System.DateTime? lastModifiedAt = default(System.DateTime?)) + { + CreatedBy = createdBy; + CreatedByType = createdByType; + CreatedAt = createdAt; + LastModifiedBy = lastModifiedBy; + LastModifiedByType = lastModifiedByType; + LastModifiedAt = lastModifiedAt; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets a string identifier for the identity that created the + /// resource. + /// + [JsonProperty(PropertyName = "createdBy")] + public string CreatedBy { get; private set; } + + /// + /// Gets the type of identity that created the resource: + /// &lt;User|Application|ManagedIdentity|Key&gt;. Possible + /// values include: 'User', 'Application', 'ManagedIdentity', 'Key' + /// + [JsonProperty(PropertyName = "createdByType")] + public string CreatedByType { get; private set; } + + /// + /// Gets the timestamp of resource creation (UTC). + /// + [JsonProperty(PropertyName = "createdAt")] + public System.DateTime? CreatedAt { get; private set; } + + /// + /// Gets a string identifier for the identity that last modified the + /// resource. + /// + [JsonProperty(PropertyName = "lastModifiedBy")] + public string LastModifiedBy { get; private set; } + + /// + /// Gets the type of identity that last modified the resource: + /// &lt;User|Application|ManagedIdentity|Key&gt;. Possible + /// values include: 'User', 'Application', 'ManagedIdentity', 'Key' + /// + [JsonProperty(PropertyName = "lastModifiedByType")] + public string LastModifiedByType { get; private set; } + + /// + /// Gets the timestamp of last modification (UTC). + /// + [JsonProperty(PropertyName = "lastModifiedAt")] + public System.DateTime? LastModifiedAt { get; private set; } + + } +} diff --git a/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Generated/SdkInfo_SqlManagementClient.cs b/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Generated/SdkInfo_SqlManagementClient.cs index ebf80b4ac1d6..c21b476aaff7 100644 --- a/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Generated/SdkInfo_SqlManagementClient.cs +++ b/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Generated/SdkInfo_SqlManagementClient.cs @@ -97,6 +97,7 @@ public static IEnumerable> ApiInfo_SqlManagementCl new Tuple("Sql", "ServerBlobAuditingPolicies", "2017-03-01-preview"), new Tuple("Sql", "ServerCommunicationLinks", "2014-04-01"), new Tuple("Sql", "ServerConnectionPolicies", "2014-04-01"), + new Tuple("Sql", "ServerDevOpsAuditSettings", "2020-08-01-preview"), new Tuple("Sql", "ServerDnsAliases", "2017-03-01-preview"), new Tuple("Sql", "ServerKeys", "2015-05-01-preview"), new Tuple("Sql", "ServerSecurityAlertPolicies", "2017-03-01-preview"), @@ -132,6 +133,6 @@ public static IEnumerable> ApiInfo_SqlManagementCl public static readonly String CodeGenerationErrors = ""; public static readonly String GithubRepoName = "azure-rest-api-specs"; // END: Code Generation Metadata Section - } + } } diff --git a/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Generated/ServerDevOpsAuditSettingsOperations.cs b/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Generated/ServerDevOpsAuditSettingsOperations.cs new file mode 100644 index 000000000000..deda3a3b4202 --- /dev/null +++ b/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Generated/ServerDevOpsAuditSettingsOperations.cs @@ -0,0 +1,877 @@ +// +// 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; + + /// + /// ServerDevOpsAuditSettingsOperations operations. + /// + internal partial class ServerDevOpsAuditSettingsOperations : IServiceOperations, IServerDevOpsAuditSettingsOperations + { + /// + /// Initializes a new instance of the ServerDevOpsAuditSettingsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ServerDevOpsAuditSettingsOperations(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 server's DevOps audit settings. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the devops audit settings. This should always be 'default'. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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 devOpsAuditingSettingsName, 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 (devOpsAuditingSettingsName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "devOpsAuditingSettingsName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2020-08-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("devOpsAuditingSettingsName", devOpsAuditingSettingsName); + 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}/devOpsAuditingSettings/{devOpsAuditingSettingsName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{devOpsAuditingSettingsName}", System.Uri.EscapeDataString(devOpsAuditingSettingsName)); + _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 server's DevOps audit settings. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the devops audit settings. This should always be 'default'. + /// + /// + /// Properties of DevOps audit settings + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string devOpsAuditingSettingsName, ServerDevOpsAuditingSettings parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, devOpsAuditingSettingsName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Lists DevOps audit settings of 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 = "2020-08-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}/devOpsAuditingSettings").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; + } + + /// + /// Creates or updates a server's DevOps audit settings. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the devops audit settings. This should always be 'default'. + /// + /// + /// Properties of DevOps audit settings + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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 devOpsAuditingSettingsName, ServerDevOpsAuditingSettings 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 (devOpsAuditingSettingsName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "devOpsAuditingSettingsName"); + } + 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 = "2020-08-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("devOpsAuditingSettingsName", devOpsAuditingSettingsName); + 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}/devOpsAuditingSettings/{devOpsAuditingSettingsName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); + _url = _url.Replace("{devOpsAuditingSettingsName}", System.Uri.EscapeDataString(devOpsAuditingSettingsName)); + _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; + } + + /// + /// Lists DevOps audit settings of 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/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Generated/ServerDevOpsAuditSettingsOperationsExtensions.cs b/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Generated/ServerDevOpsAuditSettingsOperationsExtensions.cs new file mode 100644 index 000000000000..c7c3df458970 --- /dev/null +++ b/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Generated/ServerDevOpsAuditSettingsOperationsExtensions.cs @@ -0,0 +1,257 @@ +// +// 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 ServerDevOpsAuditSettingsOperations. + /// + public static partial class ServerDevOpsAuditSettingsOperationsExtensions + { + /// + /// Gets a server's DevOps audit settings. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the devops audit settings. This should always be 'default'. + /// + public static ServerDevOpsAuditingSettings Get(this IServerDevOpsAuditSettingsOperations operations, string resourceGroupName, string serverName, string devOpsAuditingSettingsName) + { + return operations.GetAsync(resourceGroupName, serverName, devOpsAuditingSettingsName).GetAwaiter().GetResult(); + } + + /// + /// Gets a server's DevOps audit settings. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the devops audit settings. This should always be 'default'. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IServerDevOpsAuditSettingsOperations operations, string resourceGroupName, string serverName, string devOpsAuditingSettingsName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, devOpsAuditingSettingsName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a server's DevOps audit settings. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the devops audit settings. This should always be 'default'. + /// + /// + /// Properties of DevOps audit settings + /// + public static ServerDevOpsAuditingSettings CreateOrUpdate(this IServerDevOpsAuditSettingsOperations operations, string resourceGroupName, string serverName, string devOpsAuditingSettingsName, ServerDevOpsAuditingSettings parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serverName, devOpsAuditingSettingsName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a server's DevOps audit settings. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the devops audit settings. This should always be 'default'. + /// + /// + /// Properties of DevOps audit settings + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IServerDevOpsAuditSettingsOperations operations, string resourceGroupName, string serverName, string devOpsAuditingSettingsName, ServerDevOpsAuditingSettings parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, devOpsAuditingSettingsName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists DevOps audit settings of 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 IServerDevOpsAuditSettingsOperations operations, string resourceGroupName, string serverName) + { + return operations.ListByServerAsync(resourceGroupName, serverName).GetAwaiter().GetResult(); + } + + /// + /// Lists DevOps audit settings of 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 IServerDevOpsAuditSettingsOperations operations, string resourceGroupName, string serverName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServerWithHttpMessagesAsync(resourceGroupName, serverName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a server's DevOps audit settings. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the devops audit settings. This should always be 'default'. + /// + /// + /// Properties of DevOps audit settings + /// + public static ServerDevOpsAuditingSettings BeginCreateOrUpdate(this IServerDevOpsAuditSettingsOperations operations, string resourceGroupName, string serverName, string devOpsAuditingSettingsName, ServerDevOpsAuditingSettings parameters) + { + return operations.BeginCreateOrUpdateAsync(resourceGroupName, serverName, devOpsAuditingSettingsName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a server's DevOps audit settings. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the devops audit settings. This should always be 'default'. + /// + /// + /// Properties of DevOps audit settings + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateOrUpdateAsync(this IServerDevOpsAuditSettingsOperations operations, string resourceGroupName, string serverName, string devOpsAuditingSettingsName, ServerDevOpsAuditingSettings parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, devOpsAuditingSettingsName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists DevOps audit settings of a server. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByServerNext(this IServerDevOpsAuditSettingsOperations operations, string nextPageLink) + { + return operations.ListByServerNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists DevOps audit settings of 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 IServerDevOpsAuditSettingsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServerNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Generated/SqlManagementClient.cs b/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Generated/SqlManagementClient.cs index ca51c38a4b7a..fa3b09201ba7 100644 --- a/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Generated/SqlManagementClient.cs +++ b/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Generated/SqlManagementClient.cs @@ -547,6 +547,24 @@ public partial class SqlManagementClient : ServiceClient, I /// public virtual IServerTrustGroupsOperations ServerTrustGroups { get; private set; } + /// + /// Gets the IServerDevOpsAuditSettingsOperations. + /// + public virtual IServerDevOpsAuditSettingsOperations ServerDevOpsAuditSettings { get; private set; } + + /// + /// Initializes a new instance of the SqlManagementClient class. + /// + /// + /// HttpClient to be used + /// + /// + /// True: will dispose the provided httpClient on calling SqlManagementClient.Dispose(). False: will not dispose provided httpClient + protected SqlManagementClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) + { + Initialize(); + } + /// /// Initializes a new instance of the SqlManagementClient class. /// @@ -642,6 +660,33 @@ public SqlManagementClient(ServiceClientCredentials credentials, params Delegati } } + /// + /// Initializes a new instance of the SqlManagementClient class. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// HttpClient to be used + /// + /// + /// True: will dispose the provided httpClient on calling SqlManagementClient.Dispose(). False: will not dispose provided httpClient + /// + /// Thrown when a required parameter is null + /// + public SqlManagementClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + /// /// Initializes a new instance of the SqlManagementClient class. /// @@ -843,6 +888,7 @@ private void Initialize() ImportExport = new ImportExportOperations(this); ManagedInstanceAzureADOnlyAuthentications = new ManagedInstanceAzureADOnlyAuthenticationsOperations(this); ServerTrustGroups = new ServerTrustGroupsOperations(this); + ServerDevOpsAuditSettings = new ServerDevOpsAuditSettingsOperations(this); BaseUri = new System.Uri("https://management.azure.com"); AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; diff --git a/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Microsoft.Azure.Management.Sql.csproj b/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Microsoft.Azure.Management.Sql.csproj index f9e72094e279..9b69e71a3734 100644 --- a/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Microsoft.Azure.Management.Sql.csproj +++ b/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/src/Microsoft.Azure.Management.Sql.csproj @@ -7,7 +7,7 @@ Microsoft.Azure.Management.Sql Azure SQL Management SDK library Microsoft.Azure.Management.Sql - 1.47.0-preview + 1.48.0-preview Microsoft Azure SQL Management;SQL;SQL Management; (); + + ResourceGroup resourceGroup = context.CreateResourceGroup(); + Server server = context.CreateServer(resourceGroup); + StorageAccountInformation storageAccountInformation = await CreateStorageAccountAsync(context, resourceGroup); + + ServerDevOpsAuditingSettings devOpsSettings = new ServerDevOpsAuditingSettings + { + State = BlobAuditingPolicyState.Enabled, + StorageEndpoint = storageAccountInformation.Endpoint, + StorageAccountAccessKey = storageAccountInformation.PrimaryKey, + IsAzureMonitorTargetEnabled = true + }; + + ServerDevOpsAuditingSettings resultDevOpsSettings = await client.ServerDevOpsAuditSettings.CreateOrUpdateAsync(resourceGroup.Name, server.Name, PolicyName, devOpsSettings); + VerifyPolicy(devOpsSettings, resultDevOpsSettings); + + resultDevOpsSettings = await client.ServerDevOpsAuditSettings.GetAsync(resourceGroup.Name, server.Name, PolicyName); + VerifyPolicy(devOpsSettings, resultDevOpsSettings); + + IPage resultItems = await client.ServerDevOpsAuditSettings.ListByServerAsync(resourceGroup.Name, server.Name); + + foreach (ServerDevOpsAuditingSettings resultItem in resultItems) + { + VerifyPolicy(devOpsSettings, resultItem); + } + + Assert.Null(resultItems.NextPageLink); + + await client.Servers.DeleteAsync(resourceGroup.Name, server.Name); + await DeleteStorageAccountAsync(context, resourceGroup.Name, storageAccountInformation.Name); + } + } + + private static void VerifyPolicy(ServerDevOpsAuditingSettings devOpsSettings, ServerDevOpsAuditingSettings resultDevOpsSettings) + { + Assert.Equal(resultDevOpsSettings.State, devOpsSettings.State); + Assert.Equal(resultDevOpsSettings.StorageEndpoint, devOpsSettings.StorageEndpoint); + Assert.Null(resultDevOpsSettings.StorageAccountAccessKey); + Assert.Equal(resultDevOpsSettings.IsAzureMonitorTargetEnabled, devOpsSettings.IsAzureMonitorTargetEnabled); + } + + private async Task CreateStorageAccountAsync(SqlManagementTestContext context, ResourceGroup resourceGroup) + { + string accountName = SqlManagementTestUtilities.GenerateName(prefix: StorageNamePrefix); + StorageManagementClient client = context.GetClient(); + StorageAccount storageAccount = await client.StorageAccounts.CreateAsync( + resourceGroup.Name, + accountName: accountName, + parameters: new StorageAccountCreateParameters( + new Microsoft.Azure.Management.Storage.Models.Sku(SkuName.StandardLRS, SkuTier.Standard), + Kind.BlobStorage, + resourceGroup.Location, + accessTier: AccessTier.Cool)); + + StorageAccountListKeysResult keys = + client.StorageAccounts.ListKeys(resourceGroup.Name, storageAccount.Name); + + return new StorageAccountInformation + { + Name = accountName, + Endpoint = storageAccount.PrimaryEndpoints.Blob, + PrimaryKey = keys.Keys.First().Value + }; + } + + private async Task DeleteStorageAccountAsync(SqlManagementTestContext context, string resourceGroupName, string accountName) + { + StorageManagementClient storageClient = context.GetClient(); + await storageClient.StorageAccounts.DeleteAsync(resourceGroupName, accountName); + } + + private struct StorageAccountInformation + { + public string Name; + public string Endpoint; + public string PrimaryKey; + } + + private const string PolicyName = "default"; + private const string StorageNamePrefix = "sqldevopsaudittest"; + } +} \ No newline at end of file diff --git a/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/tests/SessionRecords/ServerDevOpsAuditingScenarioTests/TestServerDevOpsAuditingSettings.json b/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/tests/SessionRecords/ServerDevOpsAuditingScenarioTests/TestServerDevOpsAuditingSettings.json new file mode 100644 index 000000000000..ec199935f0a8 --- /dev/null +++ b/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/tests/SessionRecords/ServerDevOpsAuditingScenarioTests/TestServerDevOpsAuditingSettings.json @@ -0,0 +1,1465 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourcegroups/sqlcrudtest-3605?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTM2MDU/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West Europe\",\r\n \"tags\": {\r\n \"sqlcrudtest-3605\": \"2020-12-15 06:27:14Z\"\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a3f8451c-ed80-4f47-8e4c-9ea9a1ce7a71" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "100" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-request-id": [ + "0706494f-b3b7-4da8-85f8-1f0976180d25" + ], + "x-ms-correlation-request-id": [ + "0706494f-b3b7-4da8-85f8-1f0976180d25" + ], + "x-ms-routing-request-id": [ + "UAECENTRAL:20201215T062717Z:0706494f-b3b7-4da8-85f8-1f0976180d25" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 15 Dec 2020 06:27:16 GMT" + ], + "Content-Length": [ + "240" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/sqlcrudtest-3605\",\r\n \"name\": \"sqlcrudtest-3605\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"sqlcrudtest-3605\": \"2020-12-15 06:27:14Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/sqlcrudtest-3605/providers/Microsoft.Sql/servers/sqlcrudtest-7325?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC03MzI1P2FwaS12ZXJzaW9uPTIwMTktMDYtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"administratorLogin\": \"dummylogin\",\r\n \"administratorLoginPassword\": \"Un53cuRE!\",\r\n \"version\": \"12.0\"\r\n },\r\n \"location\": \"West Europe\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0353b88f-061c-40cb-bb29-8d2b1167435b" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.48.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "185" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/sqlcrudtest-3605/providers/Microsoft.Sql/locations/westeurope/serverOperationResults/85b682c7-27b2-4163-a239-ebe5161af399?api-version=2019-06-01-preview" + ], + "Retry-After": [ + "1" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/sqlcrudtest-3605/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/85b682c7-27b2-4163-a239-ebe5161af399?api-version=2019-06-01-preview" + ], + "x-ms-request-id": [ + "85b682c7-27b2-4163-a239-ebe5161af399" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "55ff2b41-8599-4c37-b282-08d52d40dc67" + ], + "x-ms-routing-request-id": [ + "UAECENTRAL:20201215T062722Z:55ff2b41-8599-4c37-b282-08d52d40dc67" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 15 Dec 2020 06:27:22 GMT" + ], + "Content-Length": [ + "73" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertLogicalServer\",\r\n \"startTime\": \"2020-12-15T06:27:22.65Z\"\r\n}", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/sqlcrudtest-3605/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/85b682c7-27b2-4163-a239-ebe5161af399?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3RldXJvcGUvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi84NWI2ODJjNy0yN2IyLTQxNjMtYTIzOS1lYmU1MTYxYWYzOTk/YXBpLXZlcnNpb249MjAxOS0wNi0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.48.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "1" + ], + "x-ms-request-id": [ + "d817d156-9496-4b25-a4bf-c7f5ad0ebdaa" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-correlation-request-id": [ + "58ed9d67-1708-438e-8a7e-95cd47a94195" + ], + "x-ms-routing-request-id": [ + "UAECENTRAL:20201215T062724Z:58ed9d67-1708-438e-8a7e-95cd47a94195" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 15 Dec 2020 06:27:23 GMT" + ], + "Content-Length": [ + "107" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"85b682c7-27b2-4163-a239-ebe5161af399\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2020-12-15T06:27:22.65Z\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/sqlcrudtest-3605/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/85b682c7-27b2-4163-a239-ebe5161af399?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3RldXJvcGUvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi84NWI2ODJjNy0yN2IyLTQxNjMtYTIzOS1lYmU1MTYxYWYzOTk/YXBpLXZlcnNpb249MjAxOS0wNi0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.48.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "1" + ], + "x-ms-request-id": [ + "64913e61-44ef-4148-b7fe-2091977e2879" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-correlation-request-id": [ + "c1334a8e-199f-4649-b114-21167e0dce06" + ], + "x-ms-routing-request-id": [ + "UAECENTRAL:20201215T062725Z:c1334a8e-199f-4649-b114-21167e0dce06" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 15 Dec 2020 06:27:24 GMT" + ], + "Content-Length": [ + "107" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"85b682c7-27b2-4163-a239-ebe5161af399\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2020-12-15T06:27:22.65Z\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/sqlcrudtest-3605/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/85b682c7-27b2-4163-a239-ebe5161af399?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3RldXJvcGUvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi84NWI2ODJjNy0yN2IyLTQxNjMtYTIzOS1lYmU1MTYxYWYzOTk/YXBpLXZlcnNpb249MjAxOS0wNi0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.48.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "1" + ], + "x-ms-request-id": [ + "b6d487fe-683e-47df-a6da-01444cee6ed1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11997" + ], + "x-ms-correlation-request-id": [ + "c83e9fb9-43f7-435d-a4d4-6af73eb62f33" + ], + "x-ms-routing-request-id": [ + "UAECENTRAL:20201215T062726Z:c83e9fb9-43f7-435d-a4d4-6af73eb62f33" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 15 Dec 2020 06:27:25 GMT" + ], + "Content-Length": [ + "107" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"85b682c7-27b2-4163-a239-ebe5161af399\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2020-12-15T06:27:22.65Z\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/sqlcrudtest-3605/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/85b682c7-27b2-4163-a239-ebe5161af399?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3RldXJvcGUvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi84NWI2ODJjNy0yN2IyLTQxNjMtYTIzOS1lYmU1MTYxYWYzOTk/YXBpLXZlcnNpb249MjAxOS0wNi0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.48.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "20" + ], + "x-ms-request-id": [ + "8740a9a4-444d-493d-bc15-c2c942a8981d" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11996" + ], + "x-ms-correlation-request-id": [ + "045543e3-14b2-45e0-adde-fde81ba45051" + ], + "x-ms-routing-request-id": [ + "UAECENTRAL:20201215T062728Z:045543e3-14b2-45e0-adde-fde81ba45051" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 15 Dec 2020 06:27:28 GMT" + ], + "Content-Length": [ + "107" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"85b682c7-27b2-4163-a239-ebe5161af399\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2020-12-15T06:27:22.65Z\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/sqlcrudtest-3605/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/85b682c7-27b2-4163-a239-ebe5161af399?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3RldXJvcGUvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi84NWI2ODJjNy0yN2IyLTQxNjMtYTIzOS1lYmU1MTYxYWYzOTk/YXBpLXZlcnNpb249MjAxOS0wNi0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.48.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "20" + ], + "x-ms-request-id": [ + "c17c2932-a071-4ee1-89e0-85462ef82dcc" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11995" + ], + "x-ms-correlation-request-id": [ + "d7333552-4a9e-4017-bfb2-490b01873a86" + ], + "x-ms-routing-request-id": [ + "UAECENTRAL:20201215T062748Z:d7333552-4a9e-4017-bfb2-490b01873a86" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 15 Dec 2020 06:27:47 GMT" + ], + "Content-Length": [ + "107" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"85b682c7-27b2-4163-a239-ebe5161af399\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2020-12-15T06:27:22.65Z\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/sqlcrudtest-3605/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/85b682c7-27b2-4163-a239-ebe5161af399?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3RldXJvcGUvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi84NWI2ODJjNy0yN2IyLTQxNjMtYTIzOS1lYmU1MTYxYWYzOTk/YXBpLXZlcnNpb249MjAxOS0wNi0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.48.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "20" + ], + "x-ms-request-id": [ + "5c26bd1d-d541-4dc2-823b-52a001473818" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11994" + ], + "x-ms-correlation-request-id": [ + "57f45466-4479-4280-8bae-22ccf2357f2d" + ], + "x-ms-routing-request-id": [ + "UAECENTRAL:20201215T062808Z:57f45466-4479-4280-8bae-22ccf2357f2d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 15 Dec 2020 06:28:08 GMT" + ], + "Content-Length": [ + "107" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"85b682c7-27b2-4163-a239-ebe5161af399\",\r\n \"status\": \"InProgress\",\r\n \"startTime\": \"2020-12-15T06:27:22.65Z\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/sqlcrudtest-3605/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/85b682c7-27b2-4163-a239-ebe5161af399?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3RldXJvcGUvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi84NWI2ODJjNy0yN2IyLTQxNjMtYTIzOS1lYmU1MTYxYWYzOTk/YXBpLXZlcnNpb249MjAxOS0wNi0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.48.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-request-id": [ + "0d585967-71b3-49ac-b0bd-6850f731dcae" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11993" + ], + "x-ms-correlation-request-id": [ + "39cc47cc-9d8b-497f-9264-9b980bb7dc85" + ], + "x-ms-routing-request-id": [ + "UAECENTRAL:20201215T062829Z:39cc47cc-9d8b-497f-9264-9b980bb7dc85" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 15 Dec 2020 06:28:28 GMT" + ], + "Content-Length": [ + "106" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"85b682c7-27b2-4163-a239-ebe5161af399\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2020-12-15T06:27:22.65Z\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/sqlcrudtest-3605/providers/Microsoft.Sql/servers/sqlcrudtest-7325?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC03MzI1P2FwaS12ZXJzaW9uPTIwMTktMDYtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.48.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "5567141b-324f-4824-8d3a-23acd4201a76" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11992" + ], + "x-ms-correlation-request-id": [ + "528f1a53-0fca-4f8c-967d-387a04f77238" + ], + "x-ms-routing-request-id": [ + "UAECENTRAL:20201215T062829Z:528f1a53-0fca-4f8c-967d-387a04f77238" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 15 Dec 2020 06:28:28 GMT" + ], + "Content-Length": [ + "460" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "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-7325.database.windows.net\",\r\n \"privateEndpointConnections\": [],\r\n \"publicNetworkAccess\": \"Enabled\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/sqlcrudtest-3605/providers/Microsoft.Sql/servers/sqlcrudtest-7325\",\r\n \"name\": \"sqlcrudtest-7325\",\r\n \"type\": \"Microsoft.Sql/servers\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/sqlcrudtest-3605/providers/Microsoft.Storage/storageAccounts/sqldevopsaudittest5063?api-version=2017-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9zcWxkZXZvcHNhdWRpdHRlc3Q1MDYzP2FwaS12ZXJzaW9uPTIwMTctMDYtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_LRS\"\r\n },\r\n \"kind\": \"BlobStorage\",\r\n \"location\": \"westeurope\",\r\n \"properties\": {\r\n \"accessTier\": \"Cool\"\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "66b63097-46f9-408d-8a59-e78e56f927b1" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/6.5.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "155" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/providers/Microsoft.Storage/locations/westeurope/asyncoperations/93c79ed3-d33b-4436-a581-6e7353bbe37a?monitor=true&api-version=2017-06-01" + ], + "Retry-After": [ + "17" + ], + "x-ms-request-id": [ + "93c79ed3-d33b-4436-a581-6e7353bbe37a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "79a66a49-2ca3-4e95-9ce3-2cbe8bb7b23a" + ], + "x-ms-routing-request-id": [ + "UAECENTRAL:20201215T062836Z:79a66a49-2ca3-4e95-9ce3-2cbe8bb7b23a" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 15 Dec 2020 06:28:36 GMT" + ], + "Content-Type": [ + "text/plain; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/providers/Microsoft.Storage/locations/westeurope/asyncoperations/93c79ed3-d33b-4436-a581-6e7353bbe37a?monitor=true&api-version=2017-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Byb3ZpZGVycy9NaWNyb3NvZnQuU3RvcmFnZS9sb2NhdGlvbnMvd2VzdGV1cm9wZS9hc3luY29wZXJhdGlvbnMvOTNjNzllZDMtZDMzYi00NDM2LWE1ODEtNmU3MzUzYmJlMzdhP21vbml0b3I9dHJ1ZSZhcGktdmVyc2lvbj0yMDE3LTA2LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/6.5.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "c8ed6418-ac3c-4977-bba0-ef4fd5fb1e82" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-correlation-request-id": [ + "1ea9d5bd-6237-4321-a79e-29faf8afbe66" + ], + "x-ms-routing-request-id": [ + "UAECENTRAL:20201215T062853Z:1ea9d5bd-6237-4321-a79e-29faf8afbe66" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 15 Dec 2020 06:28:52 GMT" + ], + "Content-Length": [ + "1002" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_LRS\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"kind\": \"BlobStorage\",\r\n \"id\": \"/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/sqlcrudtest-3605/providers/Microsoft.Storage/storageAccounts/sqldevopsaudittest5063\",\r\n \"name\": \"sqldevopsaudittest5063\",\r\n \"type\": \"Microsoft.Storage/storageAccounts\",\r\n \"location\": \"westeurope\",\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 \"supportsHttpsTrafficOnly\": false,\r\n \"encryption\": {\r\n \"services\": {\r\n \"file\": {\r\n \"enabled\": true,\r\n \"lastEnabledTime\": \"2020-12-15T06:28:35.5788502Z\"\r\n },\r\n \"blob\": {\r\n \"enabled\": true,\r\n \"lastEnabledTime\": \"2020-12-15T06:28:35.5788502Z\"\r\n }\r\n },\r\n \"keySource\": \"Microsoft.Storage\"\r\n },\r\n \"accessTier\": \"Cool\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"2020-12-15T06:28:35.4382304Z\",\r\n \"primaryEndpoints\": {\r\n \"blob\": \"https://sqldevopsaudittest5063.blob.core.windows.net/\",\r\n \"table\": \"https://sqldevopsaudittest5063.table.core.windows.net/\"\r\n },\r\n \"primaryLocation\": \"westeurope\",\r\n \"statusOfPrimary\": \"available\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/sqlcrudtest-3605/providers/Microsoft.Storage/storageAccounts/sqldevopsaudittest5063/listKeys?api-version=2017-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9zcWxkZXZvcHNhdWRpdHRlc3Q1MDYzL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTctMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "21ee2e43-058d-42a0-8618-1a5c92997bb4" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/6.5.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "ab12102a-58b7-4dd1-9a13-9154b256f70c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ + "11999" + ], + "x-ms-correlation-request-id": [ + "7254769e-efe2-47b7-9aae-275a0d22ddb8" + ], + "x-ms-routing-request-id": [ + "UAECENTRAL:20201215T062854Z:7254769e-efe2-47b7-9aae-275a0d22ddb8" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 15 Dec 2020 06:28:53 GMT" + ], + "Content-Length": [ + "288" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"keys\": [\r\n {\r\n \"keyName\": \"key1\",\r\n \"value\": \"TFOzO84VJX7DKEpKSaq3YNHPxZ9+BIB6J4HM0+R/Nw96MXdpRsVGLYtmdt6nCGRGxlIxhMCG2HBfPQIkdN41qQ==\",\r\n \"permissions\": \"FULL\"\r\n },\r\n {\r\n \"keyName\": \"key2\",\r\n \"value\": \"dvBbuJIdqQjeKePiCq5MZZj6QAH+ZBfq91B1ta4ZpFPP5aFrf3Qo9Zb1f4Q1T0d+s5nIR/WZklZFgOXXI9cYzA==\",\r\n \"permissions\": \"FULL\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/sqlcrudtest-3605/providers/Microsoft.Sql/servers/sqlcrudtest-7325/devOpsAuditingSettings/default?api-version=2020-08-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC03MzI1L2Rldk9wc0F1ZGl0aW5nU2V0dGluZ3MvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDIwLTA4LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAzureMonitorTargetEnabled\": true,\r\n \"state\": \"Enabled\",\r\n \"storageEndpoint\": \"https://sqldevopsaudittest5063.blob.core.windows.net/\",\r\n \"storageAccountAccessKey\": \"TFOzO84VJX7DKEpKSaq3YNHPxZ9+BIB6J4HM0+R/Nw96MXdpRsVGLYtmdt6nCGRGxlIxhMCG2HBfPQIkdN41qQ==\"\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "50b49663-adc5-4708-80fe-cb30dcc2ae9e" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.48.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "299" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/providers/Microsoft.Sql/locations/westeurope/devOpsAuditingSettingsOperationResults/2e6f35bf-ce14-4c28-91c6-a7a7bd4bce08?api-version=2020-08-01-preview" + ], + "Retry-After": [ + "60" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/providers/Microsoft.Sql/locations/westeurope/devOpsAuditingSettingsAzureAsyncOperation/2e6f35bf-ce14-4c28-91c6-a7a7bd4bce08?api-version=2020-08-01-preview" + ], + "x-ms-request-id": [ + "2e6f35bf-ce14-4c28-91c6-a7a7bd4bce08" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "cc682aae-7c50-437a-acc7-bea9eef8fab8" + ], + "x-ms-routing-request-id": [ + "UAECENTRAL:20201215T062855Z:cc682aae-7c50-437a-acc7-bea9eef8fab8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 15 Dec 2020 06:28:54 GMT" + ], + "Content-Length": [ + "84" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"UpsertServerDevOpsAuditPolicy\",\r\n \"startTime\": \"2020-12-15T06:28:55.103Z\"\r\n}", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/providers/Microsoft.Sql/locations/westeurope/devOpsAuditingSettingsAzureAsyncOperation/2e6f35bf-ce14-4c28-91c6-a7a7bd4bce08?api-version=2020-08-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Byb3ZpZGVycy9NaWNyb3NvZnQuU3FsL2xvY2F0aW9ucy93ZXN0ZXVyb3BlL2Rldk9wc0F1ZGl0aW5nU2V0dGluZ3NBenVyZUFzeW5jT3BlcmF0aW9uLzJlNmYzNWJmLWNlMTQtNGMyOC05MWM2LWE3YTdiZDRiY2UwOD9hcGktdmVyc2lvbj0yMDIwLTA4LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.48.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "cbe1f47e-39a0-4827-9abf-f9c2efa16387" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11991" + ], + "x-ms-correlation-request-id": [ + "e1bc83a5-b09e-4f0f-8fb0-25f937ece33f" + ], + "x-ms-routing-request-id": [ + "UAECENTRAL:20201215T062955Z:e1bc83a5-b09e-4f0f-8fb0-25f937ece33f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 15 Dec 2020 06:29:55 GMT" + ], + "Content-Length": [ + "107" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"2e6f35bf-ce14-4c28-91c6-a7a7bd4bce08\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2020-12-15T06:28:55.103Z\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/sqlcrudtest-3605/providers/Microsoft.Sql/servers/sqlcrudtest-7325/devOpsAuditingSettings/default?api-version=2020-08-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC03MzI1L2Rldk9wc0F1ZGl0aW5nU2V0dGluZ3MvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDIwLTA4LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.48.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "5d787688-2c9e-4398-8bdd-cd426eb6233a" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11990" + ], + "x-ms-correlation-request-id": [ + "74a65034-7758-4edc-8226-d82ee2062225" + ], + "x-ms-routing-request-id": [ + "UAECENTRAL:20201215T062957Z:74a65034-7758-4edc-8226-d82ee2062225" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 15 Dec 2020 06:29:56 GMT" + ], + "Content-Length": [ + "455" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAzureMonitorTargetEnabled\": true,\r\n \"state\": \"Enabled\",\r\n \"storageEndpoint\": \"https://sqldevopsaudittest5063.blob.core.windows.net/\",\r\n \"storageAccountSubscriptionId\": \"00000000-0000-0000-0000-000000000000\"\r\n },\r\n \"id\": \"/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/sqlcrudtest-3605/providers/Microsoft.Sql/servers/sqlcrudtest-7325/devOpsAuditingSettings/Default\",\r\n \"name\": \"Default\",\r\n \"type\": \"Microsoft.Sql/servers/devOpsAuditingSettings\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/sqlcrudtest-3605/providers/Microsoft.Sql/servers/sqlcrudtest-7325/devOpsAuditingSettings/default?api-version=2020-08-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC03MzI1L2Rldk9wc0F1ZGl0aW5nU2V0dGluZ3MvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDIwLTA4LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3e320256-79b7-4183-a76f-975b9b452120" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.48.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "0bf8f73b-241b-44a9-80a7-b049ae1fecdf" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11989" + ], + "x-ms-correlation-request-id": [ + "33c6e3e2-9452-41cf-ae1c-f3a23beb55b8" + ], + "x-ms-routing-request-id": [ + "UAECENTRAL:20201215T062958Z:33c6e3e2-9452-41cf-ae1c-f3a23beb55b8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 15 Dec 2020 06:29:58 GMT" + ], + "Content-Length": [ + "455" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAzureMonitorTargetEnabled\": true,\r\n \"state\": \"Enabled\",\r\n \"storageEndpoint\": \"https://sqldevopsaudittest5063.blob.core.windows.net/\",\r\n \"storageAccountSubscriptionId\": \"00000000-0000-0000-0000-000000000000\"\r\n },\r\n \"id\": \"/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/sqlcrudtest-3605/providers/Microsoft.Sql/servers/sqlcrudtest-7325/devOpsAuditingSettings/Default\",\r\n \"name\": \"Default\",\r\n \"type\": \"Microsoft.Sql/servers/devOpsAuditingSettings\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/sqlcrudtest-3605/providers/Microsoft.Sql/servers/sqlcrudtest-7325/devOpsAuditingSettings?api-version=2020-08-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC03MzI1L2Rldk9wc0F1ZGl0aW5nU2V0dGluZ3M/YXBpLXZlcnNpb249MjAyMC0wOC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "243ef04f-eaf3-4891-b32d-c3b5f3b0843e" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.48.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "6ed40ae8-3b07-4eb1-83b9-ceac49f18ed4" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11988" + ], + "x-ms-correlation-request-id": [ + "f5ea9214-827a-4707-8ee0-ccdb9b0a70c6" + ], + "x-ms-routing-request-id": [ + "UAECENTRAL:20201215T062958Z:f5ea9214-827a-4707-8ee0-ccdb9b0a70c6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 15 Dec 2020 06:29:58 GMT" + ], + "Content-Length": [ + "467" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"isAzureMonitorTargetEnabled\": true,\r\n \"state\": \"Enabled\",\r\n \"storageEndpoint\": \"https://sqldevopsaudittest5063.blob.core.windows.net/\",\r\n \"storageAccountSubscriptionId\": \"00000000-0000-0000-0000-000000000000\"\r\n },\r\n \"id\": \"/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/sqlcrudtest-3605/providers/Microsoft.Sql/servers/sqlcrudtest-7325/devOpsAuditingSettings/Default\",\r\n \"name\": \"Default\",\r\n \"type\": \"Microsoft.Sql/servers/devOpsAuditingSettings\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/sqlcrudtest-3605/providers/Microsoft.Sql/servers/sqlcrudtest-7325?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9zcWxjcnVkdGVzdC03MzI1P2FwaS12ZXJzaW9uPTIwMTktMDYtMDEtcHJldmlldw==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4fae3b3d-4e4f-4cb5-8e99-226ffb29f339" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.48.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/sqlcrudtest-3605/providers/Microsoft.Sql/locations/westeurope/serverOperationResults/381f9e8f-ec2e-458b-a71e-d01ce1bece9e?api-version=2019-06-01-preview" + ], + "Retry-After": [ + "15" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/sqlcrudtest-3605/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/381f9e8f-ec2e-458b-a71e-d01ce1bece9e?api-version=2019-06-01-preview" + ], + "x-ms-request-id": [ + "381f9e8f-ec2e-458b-a71e-d01ce1bece9e" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "ca5904ce-3139-4e55-9a51-d1af6ca32347" + ], + "x-ms-routing-request-id": [ + "UAECENTRAL:20201215T063000Z:ca5904ce-3139-4e55-9a51-d1af6ca32347" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 15 Dec 2020 06:30:00 GMT" + ], + "Content-Length": [ + "72" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"operation\": \"DropLogicalServer\",\r\n \"startTime\": \"2020-12-15T06:30:00.617Z\"\r\n}", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/sqlcrudtest-3605/providers/Microsoft.Sql/locations/westeurope/serverAzureAsyncOperation/381f9e8f-ec2e-458b-a71e-d01ce1bece9e?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3RldXJvcGUvc2VydmVyQXp1cmVBc3luY09wZXJhdGlvbi8zODFmOWU4Zi1lYzJlLTQ1OGItYTcxZS1kMDFjZTFiZWNlOWU/YXBpLXZlcnNpb249MjAxOS0wNi0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.48.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-request-id": [ + "d1693357-eba0-4dec-8538-569f127afe65" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11987" + ], + "x-ms-correlation-request-id": [ + "651123c3-a2b4-4d2f-b96e-f9be4aa10b0d" + ], + "x-ms-routing-request-id": [ + "UAECENTRAL:20201215T063016Z:651123c3-a2b4-4d2f-b96e-f9be4aa10b0d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 15 Dec 2020 06:30:15 GMT" + ], + "Content-Length": [ + "107" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"381f9e8f-ec2e-458b-a71e-d01ce1bece9e\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2020-12-15T06:30:00.617Z\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/sqlcrudtest-3605/providers/Microsoft.Sql/locations/westeurope/serverOperationResults/381f9e8f-ec2e-458b-a71e-d01ce1bece9e?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbG9jYXRpb25zL3dlc3RldXJvcGUvc2VydmVyT3BlcmF0aW9uUmVzdWx0cy8zODFmOWU4Zi1lYzJlLTQ1OGItYTcxZS1kMDFjZTFiZWNlOWU/YXBpLXZlcnNpb249MjAxOS0wNi0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.48.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "29651da3-35c5-40c0-bd5e-b0d7f404e3c7" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11986" + ], + "x-ms-correlation-request-id": [ + "157df503-8f73-4b51-a7f8-3cc343e726bc" + ], + "x-ms-routing-request-id": [ + "UAECENTRAL:20201215T063016Z:157df503-8f73-4b51-a7f8-3cc343e726bc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 15 Dec 2020 06:30:16 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourceGroups/sqlcrudtest-3605/providers/Microsoft.Storage/storageAccounts/sqldevopsaudittest5063?api-version=2017-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MDUvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9zcWxkZXZvcHNhdWRpdHRlc3Q1MDYzP2FwaS12ZXJzaW9uPTIwMTctMDYtMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c78fe8ff-687c-4be7-800f-9acceef4dfb1" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/6.5.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "70078873-fce8-4f27-9498-350a9436bb3c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "cd2a0fc2-b325-479d-a159-4b00eeac4dcf" + ], + "x-ms-routing-request-id": [ + "UAECENTRAL:20201215T063023Z:cd2a0fc2-b325-479d-a159-4b00eeac4dcf" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 15 Dec 2020 06:30:22 GMT" + ], + "Content-Type": [ + "text/plain; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/resourcegroups/sqlcrudtest-3605?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODU3MzU1ZjAtNTdkNS00NzU0LWI5MWEtMDM5M2RiZmY5YWZjL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTM2MDU/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0f29d4bb-0da9-4935-8cc3-399d495a6bbd" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29321.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/857355f0-57d5-4754-b91a-0393dbff9afc/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDM2MDUtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14998" + ], + "x-ms-request-id": [ + "c965d387-4de3-42e9-9789-797ee429cd5a" + ], + "x-ms-correlation-request-id": [ + "c965d387-4de3-42e9-9789-797ee429cd5a" + ], + "x-ms-routing-request-id": [ + "UAECENTRAL:20201215T063026Z:c965d387-4de3-42e9-9789-797ee429cd5a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 15 Dec 2020 06:30:25 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + } + ], + "Names": { + "CreateResourceGroup": [ + "sqlcrudtest-3605" + ], + "CreateServer": [ + "sqlcrudtest-7325" + ], + "CreateStorageAccountAsync": [ + "sqldevopsaudittest5063" + ] + }, + "Variables": { + "SubscriptionId": "857355f0-57d5-4754-b91a-0393dbff9afc", + "DefaultLocation": "West Europe" + } +} \ No newline at end of file