From 3fd9df4924e1b8b8208fdb5077f4790bdc8ee88a Mon Sep 17 00:00:00 2001 From: Wei Wei Date: Wed, 11 Sep 2019 12:21:02 +0800 Subject: [PATCH] [Storage] Support Manage File Share (#7550) --- .../mgmtmetadata/storage_resource-manager.txt | 4 +- .../changelog.md | 5 + .../src/Generated/FileServicesOperations.cs | 797 ++++++++ .../FileServicesOperationsExtensions.cs | 179 ++ .../src/Generated/FileSharesOperations.cs | 1597 +++++++++++++++++ .../FileSharesOperationsExtensions.cs | 394 ++++ .../src/Generated/IFileServicesOperations.cs | 119 ++ .../src/Generated/IFileSharesOperations.cs | 244 +++ .../src/Generated/IStorageManagementClient.cs | 10 + .../Generated/Models/BlobServiceProperties.cs | 11 +- .../src/Generated/Models/ChangeFeed.cs | 53 + .../src/Generated/Models/FileServiceItems.cs | 50 + .../Generated/Models/FileServiceProperties.cs | 68 + .../src/Generated/Models/FileShare.cs | 104 ++ .../src/Generated/Models/FileShareItem.cs | 103 ++ .../SdkInfo_StorageManagementClient.cs | 4 +- .../src/Generated/StorageManagementClient.cs | 12 + .../Microsoft.Azure.Management.Storage.csproj | 2 +- .../src/Properties/AssemblyInfo.cs | 4 +- .../FileServiceCorsTest.json | 1149 ++++++++++++ .../FileSharesCreateDeleteListTest.json | 1259 +++++++++++++ .../FileSharesUpdateGetTest.json | 823 +++++++++ .../tests/Tests/FileServiceTests.cs | 246 +++ 23 files changed, 7230 insertions(+), 7 deletions(-) create mode 100644 sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileServicesOperations.cs create mode 100644 sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileServicesOperationsExtensions.cs create mode 100644 sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileSharesOperations.cs create mode 100644 sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileSharesOperationsExtensions.cs create mode 100644 sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IFileServicesOperations.cs create mode 100644 sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IFileSharesOperations.cs create mode 100644 sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/ChangeFeed.cs create mode 100644 sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileServiceItems.cs create mode 100644 sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileServiceProperties.cs create mode 100644 sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShare.cs create mode 100644 sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShareItem.cs create mode 100644 sdk/storage/Microsoft.Azure.Management.Storage/tests/SessionRecords/Storage.Tests.FileServiceTests/FileServiceCorsTest.json create mode 100644 sdk/storage/Microsoft.Azure.Management.Storage/tests/SessionRecords/Storage.Tests.FileServiceTests/FileSharesCreateDeleteListTest.json create mode 100644 sdk/storage/Microsoft.Azure.Management.Storage/tests/SessionRecords/Storage.Tests.FileServiceTests/FileSharesUpdateGetTest.json create mode 100644 sdk/storage/Microsoft.Azure.Management.Storage/tests/Tests/FileServiceTests.cs diff --git a/eng/mgmt/mgmtmetadata/storage_resource-manager.txt b/eng/mgmt/mgmtmetadata/storage_resource-manager.txt index 212cf75c97082..316a9923a353f 100644 --- a/eng/mgmt/mgmtmetadata/storage_resource-manager.txt +++ b/eng/mgmt/mgmtmetadata/storage_resource-manager.txt @@ -4,11 +4,11 @@ Commencing code generation Generating CSharp code Executing AutoRest command cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/storage/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp.output-folder=C:\code\srpsdk\sdk\storage\Microsoft.Azure.Management.Storage\src\Generated -2019-08-09 07:46:40 UTC +2019-09-11 03:12:08 UTC Azure-rest-api-specs repository information GitHub fork: Azure Branch: master -Commit: d753d28f32643d8062e1f7863d8f8e188dac9556 +Commit: 6e6a651b6805d1811190025616f35e5a13194910 AutoRest information Requested version: latest Bootstrapper version: autorest@2.0.4283 diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/changelog.md b/sdk/storage/Microsoft.Azure.Management.Storage/changelog.md index 26cc974be0603..ade4b04f0ebd2 100644 --- a/sdk/storage/Microsoft.Azure.Management.Storage/changelog.md +++ b/sdk/storage/Microsoft.Azure.Management.Storage/changelog.md @@ -1,5 +1,10 @@ ## Microsoft.Azure.Management.Storage release notes +### Changes in 13.1.0 + +- Support Create/Get/List/Delete File share +- Support Get/Set File service properties + ### Changes in 13.0.0 - Add back StorageManagementClient constructor that takes HttpClient as a parameter diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileServicesOperations.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileServicesOperations.cs new file mode 100644 index 0000000000000..604e36859ce98 --- /dev/null +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileServicesOperations.cs @@ -0,0 +1,797 @@ +// +// 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.Storage +{ + 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; + + /// + /// FileServicesOperations operations. + /// + internal partial class FileServicesOperations : IServiceOperations, IFileServicesOperations + { + /// + /// Initializes a new instance of the FileServicesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal FileServicesOperations(StorageManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the StorageManagementClient + /// + public StorageManagementClient Client { get; private set; } + + /// + /// List all file services in storage accounts + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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> ListWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (accountName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); + } + if (accountName != null) + { + if (accountName.Length > 24) + { + throw new ValidationException(ValidationRules.MaxLength, "accountName", 24); + } + if (accountName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "accountName", 3); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("accountName", accountName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", 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.Storage/storageAccounts/{accountName}/fileServices").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.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; + } + + /// + /// Sets the properties of file services in storage accounts, including CORS + /// (Cross-Origin Resource Sharing) rules. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// Specifies CORS rules for the File service. You can include up to five + /// CorsRule elements in the request. If no CorsRule elements are included in + /// the request body, all CORS rules will be deleted, and CORS will be disabled + /// for the File service. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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> SetServicePropertiesWithHttpMessagesAsync(string resourceGroupName, string accountName, CorsRules cors = default(CorsRules), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (accountName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); + } + if (accountName != null) + { + if (accountName.Length > 24) + { + throw new ValidationException(ValidationRules.MaxLength, "accountName", 24); + } + if (accountName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "accountName", 3); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + string fileServicesName = "default"; + FileServiceProperties parameters = new FileServiceProperties(); + if (cors != null) + { + parameters.Cors = cors; + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("accountName", accountName); + tracingParameters.Add("fileServicesName", fileServicesName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "SetServiceProperties", 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.Storage/storageAccounts/{accountName}/fileServices/{FileServicesName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{FileServicesName}", System.Uri.EscapeDataString(fileServicesName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the properties of file services in storage accounts, including CORS + /// (Cross-Origin Resource Sharing) rules. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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> GetServicePropertiesWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (accountName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); + } + if (accountName != null) + { + if (accountName.Length > 24) + { + throw new ValidationException(ValidationRules.MaxLength, "accountName", 24); + } + if (accountName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "accountName", 3); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + string fileServicesName = "default"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("accountName", accountName); + tracingParameters.Add("fileServicesName", fileServicesName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetServiceProperties", 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.Storage/storageAccounts/{accountName}/fileServices/{FileServicesName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{FileServicesName}", System.Uri.EscapeDataString(fileServicesName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileServicesOperationsExtensions.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileServicesOperationsExtensions.cs new file mode 100644 index 0000000000000..ed383c8eccbf3 --- /dev/null +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileServicesOperationsExtensions.cs @@ -0,0 +1,179 @@ +// +// 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.Storage +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for FileServicesOperations. + /// + public static partial class FileServicesOperationsExtensions + { + /// + /// List all file services in storage accounts + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + public static FileServiceItems List(this IFileServicesOperations operations, string resourceGroupName, string accountName) + { + return operations.ListAsync(resourceGroupName, accountName).GetAwaiter().GetResult(); + } + + /// + /// List all file services in storage accounts + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// The cancellation token. + /// + public static async Task ListAsync(this IFileServicesOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Sets the properties of file services in storage accounts, including CORS + /// (Cross-Origin Resource Sharing) rules. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// Specifies CORS rules for the File service. You can include up to five + /// CorsRule elements in the request. If no CorsRule elements are included in + /// the request body, all CORS rules will be deleted, and CORS will be disabled + /// for the File service. + /// + public static FileServiceProperties SetServiceProperties(this IFileServicesOperations operations, string resourceGroupName, string accountName, CorsRules cors = default(CorsRules)) + { + return operations.SetServicePropertiesAsync(resourceGroupName, accountName, cors).GetAwaiter().GetResult(); + } + + /// + /// Sets the properties of file services in storage accounts, including CORS + /// (Cross-Origin Resource Sharing) rules. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// Specifies CORS rules for the File service. You can include up to five + /// CorsRule elements in the request. If no CorsRule elements are included in + /// the request body, all CORS rules will be deleted, and CORS will be disabled + /// for the File service. + /// + /// + /// The cancellation token. + /// + public static async Task SetServicePropertiesAsync(this IFileServicesOperations operations, string resourceGroupName, string accountName, CorsRules cors = default(CorsRules), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.SetServicePropertiesWithHttpMessagesAsync(resourceGroupName, accountName, cors, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the properties of file services in storage accounts, including CORS + /// (Cross-Origin Resource Sharing) rules. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + public static FileServiceProperties GetServiceProperties(this IFileServicesOperations operations, string resourceGroupName, string accountName) + { + return operations.GetServicePropertiesAsync(resourceGroupName, accountName).GetAwaiter().GetResult(); + } + + /// + /// Gets the properties of file services in storage accounts, including CORS + /// (Cross-Origin Resource Sharing) rules. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// The cancellation token. + /// + public static async Task GetServicePropertiesAsync(this IFileServicesOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetServicePropertiesWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileSharesOperations.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileSharesOperations.cs new file mode 100644 index 0000000000000..b84e593bbdbc5 --- /dev/null +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileSharesOperations.cs @@ -0,0 +1,1597 @@ +// +// 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.Storage +{ + 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; + + /// + /// FileSharesOperations operations. + /// + internal partial class FileSharesOperations : IServiceOperations, IFileSharesOperations + { + /// + /// Initializes a new instance of the FileSharesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal FileSharesOperations(StorageManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the StorageManagementClient + /// + public StorageManagementClient Client { get; private set; } + + /// + /// Lists all shares. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// Optional. Continuation token for the list operation. + /// + /// + /// Optional. Specified maximum number of shares that can be included in the + /// list. + /// + /// + /// Optional. When specified, only share names starting with the filter will be + /// listed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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>> ListWithHttpMessagesAsync(string resourceGroupName, string accountName, string skipToken = default(string), string maxpagesize = default(string), string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (accountName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); + } + if (accountName != null) + { + if (accountName.Length > 24) + { + throw new ValidationException(ValidationRules.MaxLength, "accountName", 24); + } + if (accountName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "accountName", 3); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("accountName", accountName); + tracingParameters.Add("skipToken", skipToken); + tracingParameters.Add("maxpagesize", maxpagesize); + tracingParameters.Add("filter", filter); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", 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.Storage/storageAccounts/{accountName}/fileServices/default/shares").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (skipToken != null) + { + _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken))); + } + if (maxpagesize != null) + { + _queryParameters.Add(string.Format("$maxpagesize={0}", System.Uri.EscapeDataString(maxpagesize))); + } + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates a new share under the specified account as described by request + /// body. The share resource includes metadata and properties for that share. + /// It does not include a list of the files contained by the share. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. File share + /// names must be between 3 and 63 characters in length and use numbers, + /// lower-case letters and dash (-) only. Every dash (-) character must be + /// immediately preceded and followed by a letter or number. + /// + /// + /// A name-value pair to associate with the share as metadata. + /// + /// + /// The maximum size of the share, in gigabytes. Must be greater than 0, and + /// less than or equal to 5TB (5120). + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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> CreateWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, IDictionary metadata = default(IDictionary), int? shareQuota = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (accountName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); + } + if (accountName != null) + { + if (accountName.Length > 24) + { + throw new ValidationException(ValidationRules.MaxLength, "accountName", 24); + } + if (accountName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "accountName", 3); + } + } + if (shareName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "shareName"); + } + if (shareName != null) + { + if (shareName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "shareName", 63); + } + if (shareName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "shareName", 3); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (shareQuota > 5120) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "shareQuota", 5120); + } + if (shareQuota < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "shareQuota", 1); + } + FileShare fileShare = new FileShare(); + if (metadata != null || shareQuota != null) + { + fileShare.Metadata = metadata; + fileShare.ShareQuota = shareQuota; + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("accountName", accountName); + tracingParameters.Add("shareName", shareName); + tracingParameters.Add("fileShare", fileShare); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Create", 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.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); + _url = _url.Replace("{shareName}", System.Uri.EscapeDataString(shareName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.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(fileShare != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(fileShare, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Updates share properties as specified in request body. Properties not + /// mentioned in the request will not be changed. Update fails if the specified + /// share does not already exist. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. File share + /// names must be between 3 and 63 characters in length and use numbers, + /// lower-case letters and dash (-) only. Every dash (-) character must be + /// immediately preceded and followed by a letter or number. + /// + /// + /// A name-value pair to associate with the share as metadata. + /// + /// + /// The maximum size of the share, in gigabytes. Must be greater than 0, and + /// less than or equal to 5TB (5120). + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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> UpdateWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, IDictionary metadata = default(IDictionary), int? shareQuota = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (accountName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); + } + if (accountName != null) + { + if (accountName.Length > 24) + { + throw new ValidationException(ValidationRules.MaxLength, "accountName", 24); + } + if (accountName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "accountName", 3); + } + } + if (shareName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "shareName"); + } + if (shareName != null) + { + if (shareName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "shareName", 63); + } + if (shareName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "shareName", 3); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (shareQuota > 5120) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "shareQuota", 5120); + } + if (shareQuota < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "shareQuota", 1); + } + FileShare fileShare = new FileShare(); + if (metadata != null || shareQuota != null) + { + fileShare.Metadata = metadata; + fileShare.ShareQuota = shareQuota; + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("accountName", accountName); + tracingParameters.Add("shareName", shareName); + tracingParameters.Add("fileShare", fileShare); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", 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.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); + _url = _url.Replace("{shareName}", System.Uri.EscapeDataString(shareName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(fileShare != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(fileShare, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets properties of a specified share. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. File share + /// names must be between 3 and 63 characters in length and use numbers, + /// lower-case letters and dash (-) only. Every dash (-) character must be + /// immediately preceded and followed by a letter or number. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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 accountName, string shareName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (accountName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); + } + if (accountName != null) + { + if (accountName.Length > 24) + { + throw new ValidationException(ValidationRules.MaxLength, "accountName", 24); + } + if (accountName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "accountName", 3); + } + } + if (shareName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "shareName"); + } + if (shareName != null) + { + if (shareName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "shareName", 63); + } + if (shareName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "shareName", 3); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("accountName", accountName); + tracingParameters.Add("shareName", shareName); + 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.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); + _url = _url.Replace("{shareName}", System.Uri.EscapeDataString(shareName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.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; + } + + /// + /// Deletes specified share under its account. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. File share + /// names must be between 3 and 63 characters in length and use numbers, + /// lower-case letters and dash (-) only. Every dash (-) character must be + /// immediately preceded and followed by a letter or number. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (accountName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); + } + if (accountName != null) + { + if (accountName.Length > 24) + { + throw new ValidationException(ValidationRules.MaxLength, "accountName", 24); + } + if (accountName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "accountName", 3); + } + } + if (shareName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "shareName"); + } + if (shareName != null) + { + if (shareName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "shareName", 63); + } + if (shareName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "shareName", 3); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("accountName", accountName); + tracingParameters.Add("shareName", shareName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); + _url = _url.Replace("{shareName}", System.Uri.EscapeDataString(shareName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists all shares. + /// + /// + /// 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>> ListNextWithHttpMessagesAsync(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, "ListNext", 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/storage/Microsoft.Azure.Management.Storage/src/Generated/FileSharesOperationsExtensions.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileSharesOperationsExtensions.cs new file mode 100644 index 0000000000000..a0b40883752a2 --- /dev/null +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileSharesOperationsExtensions.cs @@ -0,0 +1,394 @@ +// +// 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.Storage +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for FileSharesOperations. + /// + public static partial class FileSharesOperationsExtensions + { + /// + /// Lists all shares. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// Optional. Continuation token for the list operation. + /// + /// + /// Optional. Specified maximum number of shares that can be included in the + /// list. + /// + /// + /// Optional. When specified, only share names starting with the filter will be + /// listed. + /// + public static IPage List(this IFileSharesOperations operations, string resourceGroupName, string accountName, string skipToken = default(string), string maxpagesize = default(string), string filter = default(string)) + { + return operations.ListAsync(resourceGroupName, accountName, skipToken, maxpagesize, filter).GetAwaiter().GetResult(); + } + + /// + /// Lists all shares. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// Optional. Continuation token for the list operation. + /// + /// + /// Optional. Specified maximum number of shares that can be included in the + /// list. + /// + /// + /// Optional. When specified, only share names starting with the filter will be + /// listed. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IFileSharesOperations operations, string resourceGroupName, string accountName, string skipToken = default(string), string maxpagesize = default(string), string filter = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, accountName, skipToken, maxpagesize, filter, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates a new share under the specified account as described by request + /// body. The share resource includes metadata and properties for that share. + /// It does not include a list of the files contained by the share. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. File share + /// names must be between 3 and 63 characters in length and use numbers, + /// lower-case letters and dash (-) only. Every dash (-) character must be + /// immediately preceded and followed by a letter or number. + /// + /// + /// A name-value pair to associate with the share as metadata. + /// + /// + /// The maximum size of the share, in gigabytes. Must be greater than 0, and + /// less than or equal to 5TB (5120). + /// + public static FileShare Create(this IFileSharesOperations operations, string resourceGroupName, string accountName, string shareName, IDictionary metadata = default(IDictionary), int? shareQuota = default(int?)) + { + return operations.CreateAsync(resourceGroupName, accountName, shareName, metadata, shareQuota).GetAwaiter().GetResult(); + } + + /// + /// Creates a new share under the specified account as described by request + /// body. The share resource includes metadata and properties for that share. + /// It does not include a list of the files contained by the share. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. File share + /// names must be between 3 and 63 characters in length and use numbers, + /// lower-case letters and dash (-) only. Every dash (-) character must be + /// immediately preceded and followed by a letter or number. + /// + /// + /// A name-value pair to associate with the share as metadata. + /// + /// + /// The maximum size of the share, in gigabytes. Must be greater than 0, and + /// less than or equal to 5TB (5120). + /// + /// + /// The cancellation token. + /// + public static async Task CreateAsync(this IFileSharesOperations operations, string resourceGroupName, string accountName, string shareName, IDictionary metadata = default(IDictionary), int? shareQuota = default(int?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, accountName, shareName, metadata, shareQuota, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates share properties as specified in request body. Properties not + /// mentioned in the request will not be changed. Update fails if the specified + /// share does not already exist. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. File share + /// names must be between 3 and 63 characters in length and use numbers, + /// lower-case letters and dash (-) only. Every dash (-) character must be + /// immediately preceded and followed by a letter or number. + /// + /// + /// A name-value pair to associate with the share as metadata. + /// + /// + /// The maximum size of the share, in gigabytes. Must be greater than 0, and + /// less than or equal to 5TB (5120). + /// + public static FileShare Update(this IFileSharesOperations operations, string resourceGroupName, string accountName, string shareName, IDictionary metadata = default(IDictionary), int? shareQuota = default(int?)) + { + return operations.UpdateAsync(resourceGroupName, accountName, shareName, metadata, shareQuota).GetAwaiter().GetResult(); + } + + /// + /// Updates share properties as specified in request body. Properties not + /// mentioned in the request will not be changed. Update fails if the specified + /// share does not already exist. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. File share + /// names must be between 3 and 63 characters in length and use numbers, + /// lower-case letters and dash (-) only. Every dash (-) character must be + /// immediately preceded and followed by a letter or number. + /// + /// + /// A name-value pair to associate with the share as metadata. + /// + /// + /// The maximum size of the share, in gigabytes. Must be greater than 0, and + /// less than or equal to 5TB (5120). + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IFileSharesOperations operations, string resourceGroupName, string accountName, string shareName, IDictionary metadata = default(IDictionary), int? shareQuota = default(int?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, accountName, shareName, metadata, shareQuota, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets properties of a specified share. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. File share + /// names must be between 3 and 63 characters in length and use numbers, + /// lower-case letters and dash (-) only. Every dash (-) character must be + /// immediately preceded and followed by a letter or number. + /// + public static FileShare Get(this IFileSharesOperations operations, string resourceGroupName, string accountName, string shareName) + { + return operations.GetAsync(resourceGroupName, accountName, shareName).GetAwaiter().GetResult(); + } + + /// + /// Gets properties of a specified share. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. File share + /// names must be between 3 and 63 characters in length and use numbers, + /// lower-case letters and dash (-) only. Every dash (-) character must be + /// immediately preceded and followed by a letter or number. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IFileSharesOperations operations, string resourceGroupName, string accountName, string shareName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, accountName, shareName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes specified share under its account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. File share + /// names must be between 3 and 63 characters in length and use numbers, + /// lower-case letters and dash (-) only. Every dash (-) character must be + /// immediately preceded and followed by a letter or number. + /// + public static void Delete(this IFileSharesOperations operations, string resourceGroupName, string accountName, string shareName) + { + operations.DeleteAsync(resourceGroupName, accountName, shareName).GetAwaiter().GetResult(); + } + + /// + /// Deletes specified share under its account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. File share + /// names must be between 3 and 63 characters in length and use numbers, + /// lower-case letters and dash (-) only. Every dash (-) character must be + /// immediately preceded and followed by a letter or number. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IFileSharesOperations operations, string resourceGroupName, string accountName, string shareName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, accountName, shareName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Lists all shares. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IFileSharesOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists all shares. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this IFileSharesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IFileServicesOperations.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IFileServicesOperations.cs new file mode 100644 index 0000000000000..ceecae3721315 --- /dev/null +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IFileServicesOperations.cs @@ -0,0 +1,119 @@ +// +// 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.Storage +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// FileServicesOperations operations. + /// + public partial interface IFileServicesOperations + { + /// + /// List all file services in storage accounts + /// + /// + /// The name of the resource group within the user's subscription. The + /// name is case insensitive. + /// + /// + /// The name of the storage account within the specified resource + /// group. Storage account names must be between 3 and 24 characters in + /// length and use numbers and lower-case letters only. + /// + /// + /// 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> ListWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Sets the properties of file services in storage accounts, including + /// CORS (Cross-Origin Resource Sharing) rules. + /// + /// + /// The name of the resource group within the user's subscription. The + /// name is case insensitive. + /// + /// + /// The name of the storage account within the specified resource + /// group. Storage account names must be between 3 and 24 characters in + /// length and use numbers and lower-case letters only. + /// + /// + /// Specifies CORS rules for the File service. You can include up to + /// five CorsRule elements in the request. If no CorsRule elements are + /// included in the request body, all CORS rules will be deleted, and + /// CORS will be disabled for the File service. + /// + /// + /// 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> SetServicePropertiesWithHttpMessagesAsync(string resourceGroupName, string accountName, CorsRules cors = default(CorsRules), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the properties of file services in storage accounts, including + /// CORS (Cross-Origin Resource Sharing) rules. + /// + /// + /// The name of the resource group within the user's subscription. The + /// name is case insensitive. + /// + /// + /// The name of the storage account within the specified resource + /// group. Storage account names must be between 3 and 24 characters in + /// length and use numbers and lower-case letters only. + /// + /// + /// 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> GetServicePropertiesWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IFileSharesOperations.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IFileSharesOperations.cs new file mode 100644 index 0000000000000..7f99048ef5962 --- /dev/null +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IFileSharesOperations.cs @@ -0,0 +1,244 @@ +// +// 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.Storage +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// FileSharesOperations operations. + /// + public partial interface IFileSharesOperations + { + /// + /// Lists all shares. + /// + /// + /// The name of the resource group within the user's subscription. The + /// name is case insensitive. + /// + /// + /// The name of the storage account within the specified resource + /// group. Storage account names must be between 3 and 24 characters in + /// length and use numbers and lower-case letters only. + /// + /// + /// Optional. Continuation token for the list operation. + /// + /// + /// Optional. Specified maximum number of shares that can be included + /// in the list. + /// + /// + /// Optional. When specified, only share names starting with the filter + /// will be listed. + /// + /// + /// 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>> ListWithHttpMessagesAsync(string resourceGroupName, string accountName, string skipToken = default(string), string maxpagesize = default(string), string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates a new share under the specified account as described by + /// request body. The share resource includes metadata and properties + /// for that share. It does not include a list of the files contained + /// by the share. + /// + /// + /// The name of the resource group within the user's subscription. The + /// name is case insensitive. + /// + /// + /// The name of the storage account within the specified resource + /// group. Storage account names must be between 3 and 24 characters in + /// length and use numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. + /// File share names must be between 3 and 63 characters in length and + /// use numbers, lower-case letters and dash (-) only. Every dash (-) + /// character must be immediately preceded and followed by a letter or + /// number. + /// + /// + /// A name-value pair to associate with the share as metadata. + /// + /// + /// The maximum size of the share, in gigabytes. Must be greater than + /// 0, and less than or equal to 5TB (5120). + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, IDictionary metadata = default(IDictionary), int? shareQuota = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates share properties as specified in request body. Properties + /// not mentioned in the request will not be changed. Update fails if + /// the specified share does not already exist. + /// + /// + /// The name of the resource group within the user's subscription. The + /// name is case insensitive. + /// + /// + /// The name of the storage account within the specified resource + /// group. Storage account names must be between 3 and 24 characters in + /// length and use numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. + /// File share names must be between 3 and 63 characters in length and + /// use numbers, lower-case letters and dash (-) only. Every dash (-) + /// character must be immediately preceded and followed by a letter or + /// number. + /// + /// + /// A name-value pair to associate with the share as metadata. + /// + /// + /// The maximum size of the share, in gigabytes. Must be greater than + /// 0, and less than or equal to 5TB (5120). + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, IDictionary metadata = default(IDictionary), int? shareQuota = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets properties of a specified share. + /// + /// + /// The name of the resource group within the user's subscription. The + /// name is case insensitive. + /// + /// + /// The name of the storage account within the specified resource + /// group. Storage account names must be between 3 and 24 characters in + /// length and use numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. + /// File share names must be between 3 and 63 characters in length and + /// use numbers, lower-case letters and dash (-) only. Every dash (-) + /// character must be immediately preceded and followed by a letter or + /// number. + /// + /// + /// 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 accountName, string shareName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes specified share under its account. + /// + /// + /// The name of the resource group within the user's subscription. The + /// name is case insensitive. + /// + /// + /// The name of the storage account within the specified resource + /// group. Storage account names must be between 3 and 24 characters in + /// length and use numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. + /// File share names must be between 3 and 63 characters in length and + /// use numbers, lower-case letters and dash (-) only. Every dash (-) + /// character must be immediately preceded and followed by a letter or + /// number. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists all shares. + /// + /// + /// 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>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IStorageManagementClient.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IStorageManagementClient.cs index f64d6b4784443..54ad36c11da22 100644 --- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IStorageManagementClient.cs +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IStorageManagementClient.cs @@ -104,5 +104,15 @@ public partial interface IStorageManagementClient : System.IDisposable /// IBlobContainersOperations BlobContainers { get; } + /// + /// Gets the IFileServicesOperations. + /// + IFileServicesOperations FileServices { get; } + + /// + /// Gets the IFileSharesOperations. + /// + IFileSharesOperations FileShares { get; } + } } diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/BlobServiceProperties.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/BlobServiceProperties.cs index 641e73627c08b..53de67e58d014 100644 --- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/BlobServiceProperties.cs +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/BlobServiceProperties.cs @@ -51,13 +51,16 @@ public BlobServiceProperties() /// soft delete. /// Automatic Snapshot is /// enabled if set to true. - public BlobServiceProperties(string id = default(string), string name = default(string), string type = default(string), CorsRules cors = default(CorsRules), string defaultServiceVersion = default(string), DeleteRetentionPolicy deleteRetentionPolicy = default(DeleteRetentionPolicy), bool? automaticSnapshotPolicyEnabled = default(bool?)) + /// The blob service properties for change + /// feed events. + public BlobServiceProperties(string id = default(string), string name = default(string), string type = default(string), CorsRules cors = default(CorsRules), string defaultServiceVersion = default(string), DeleteRetentionPolicy deleteRetentionPolicy = default(DeleteRetentionPolicy), bool? automaticSnapshotPolicyEnabled = default(bool?), ChangeFeed changeFeed = default(ChangeFeed)) : base(id, name, type) { Cors = cors; DefaultServiceVersion = defaultServiceVersion; DeleteRetentionPolicy = deleteRetentionPolicy; AutomaticSnapshotPolicyEnabled = automaticSnapshotPolicyEnabled; + ChangeFeed = changeFeed; CustomInit(); } @@ -96,6 +99,12 @@ public BlobServiceProperties() [JsonProperty(PropertyName = "properties.automaticSnapshotPolicyEnabled")] public bool? AutomaticSnapshotPolicyEnabled { get; set; } + /// + /// Gets or sets the blob service properties for change feed events. + /// + [JsonProperty(PropertyName = "properties.changeFeed")] + public ChangeFeed ChangeFeed { get; set; } + /// /// Validate the object. /// diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/ChangeFeed.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/ChangeFeed.cs new file mode 100644 index 0000000000000..39234a57af5f1 --- /dev/null +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/ChangeFeed.cs @@ -0,0 +1,53 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Storage.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The blob service properties for change feed events. + /// + public partial class ChangeFeed + { + /// + /// Initializes a new instance of the ChangeFeed class. + /// + public ChangeFeed() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ChangeFeed class. + /// + /// Indicates whether change feed event logging + /// is enabled for the Blob service. + public ChangeFeed(bool? enabled = default(bool?)) + { + Enabled = enabled; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets indicates whether change feed event logging is enabled + /// for the Blob service. + /// + [JsonProperty(PropertyName = "enabled")] + public bool? Enabled { get; set; } + + } +} diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileServiceItems.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileServiceItems.cs new file mode 100644 index 0000000000000..b53826168db1e --- /dev/null +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileServiceItems.cs @@ -0,0 +1,50 @@ +// +// 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.Storage.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + public partial class FileServiceItems + { + /// + /// Initializes a new instance of the FileServiceItems class. + /// + public FileServiceItems() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FileServiceItems class. + /// + /// List of file services returned. + public FileServiceItems(IList value = default(IList)) + { + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets list of file services returned. + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; private set; } + + } +} diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileServiceProperties.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileServiceProperties.cs new file mode 100644 index 0000000000000..99f762c6efcf8 --- /dev/null +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileServiceProperties.cs @@ -0,0 +1,68 @@ +// +// 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.Storage.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The properties of File services in storage account. + /// + [Rest.Serialization.JsonTransformation] + public partial class FileServiceProperties : Resource + { + /// + /// Initializes a new instance of the FileServiceProperties class. + /// + public FileServiceProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FileServiceProperties class. + /// + /// Fully qualified resource Id for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. Ex- + /// Microsoft.Compute/virtualMachines or + /// Microsoft.Storage/storageAccounts. + /// Specifies CORS rules for the File service. You + /// can include up to five CorsRule elements in the request. If no + /// CorsRule elements are included in the request body, all CORS rules + /// will be deleted, and CORS will be disabled for the File + /// service. + public FileServiceProperties(string id = default(string), string name = default(string), string type = default(string), CorsRules cors = default(CorsRules)) + : base(id, name, type) + { + Cors = cors; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specifies CORS rules for the File service. You can + /// include up to five CorsRule elements in the request. If no CorsRule + /// elements are included in the request body, all CORS rules will be + /// deleted, and CORS will be disabled for the File service. + /// + [JsonProperty(PropertyName = "properties.cors")] + public CorsRules Cors { get; set; } + + } +} diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShare.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShare.cs new file mode 100644 index 0000000000000..dc868af4e1fc1 --- /dev/null +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShare.cs @@ -0,0 +1,104 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Storage.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Properties of the file share, including Id, resource name, resource + /// type, Etag. + /// + [Rest.Serialization.JsonTransformation] + public partial class FileShare : AzureEntityResource + { + /// + /// Initializes a new instance of the FileShare class. + /// + public FileShare() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FileShare class. + /// + /// Fully qualified resource Id for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. Ex- + /// Microsoft.Compute/virtualMachines or + /// Microsoft.Storage/storageAccounts. + /// Resource Etag. + /// Returns the date and time the share + /// was last modified. + /// A name-value pair to associate with the + /// share as metadata. + /// The maximum size of the share, in + /// gigabytes. Must be greater than 0, and less than or equal to 5TB + /// (5120). + public FileShare(string id = default(string), string name = default(string), string type = default(string), string etag = default(string), System.DateTime? lastModifiedTime = default(System.DateTime?), IDictionary metadata = default(IDictionary), int? shareQuota = default(int?)) + : base(id, name, type, etag) + { + LastModifiedTime = lastModifiedTime; + Metadata = metadata; + ShareQuota = shareQuota; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets returns the date and time the share was last modified. + /// + [JsonProperty(PropertyName = "properties.lastModifiedTime")] + public System.DateTime? LastModifiedTime { get; private set; } + + /// + /// Gets or sets a name-value pair to associate with the share as + /// metadata. + /// + [JsonProperty(PropertyName = "properties.metadata")] + public IDictionary Metadata { get; set; } + + /// + /// Gets or sets the maximum size of the share, in gigabytes. Must be + /// greater than 0, and less than or equal to 5TB (5120). + /// + [JsonProperty(PropertyName = "properties.shareQuota")] + public int? ShareQuota { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ShareQuota > 5120) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "ShareQuota", 5120); + } + if (ShareQuota < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "ShareQuota", 1); + } + } + } +} diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShareItem.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShareItem.cs new file mode 100644 index 0000000000000..4e7bc69bde8e0 --- /dev/null +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShareItem.cs @@ -0,0 +1,103 @@ +// +// 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.Storage.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The file share properties be listed out. + /// + [Rest.Serialization.JsonTransformation] + public partial class FileShareItem : AzureEntityResource + { + /// + /// Initializes a new instance of the FileShareItem class. + /// + public FileShareItem() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FileShareItem class. + /// + /// Fully qualified resource Id for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. Ex- + /// Microsoft.Compute/virtualMachines or + /// Microsoft.Storage/storageAccounts. + /// Resource Etag. + /// Returns the date and time the share + /// was last modified. + /// A name-value pair to associate with the + /// share as metadata. + /// The maximum size of the share, in + /// gigabytes. Must be greater than 0, and less than or equal to 5TB + /// (5120). + public FileShareItem(string id = default(string), string name = default(string), string type = default(string), string etag = default(string), System.DateTime? lastModifiedTime = default(System.DateTime?), IDictionary metadata = default(IDictionary), int? shareQuota = default(int?)) + : base(id, name, type, etag) + { + LastModifiedTime = lastModifiedTime; + Metadata = metadata; + ShareQuota = shareQuota; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets returns the date and time the share was last modified. + /// + [JsonProperty(PropertyName = "properties.lastModifiedTime")] + public System.DateTime? LastModifiedTime { get; private set; } + + /// + /// Gets or sets a name-value pair to associate with the share as + /// metadata. + /// + [JsonProperty(PropertyName = "properties.metadata")] + public IDictionary Metadata { get; set; } + + /// + /// Gets or sets the maximum size of the share, in gigabytes. Must be + /// greater than 0, and less than or equal to 5TB (5120). + /// + [JsonProperty(PropertyName = "properties.shareQuota")] + public int? ShareQuota { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ShareQuota > 5120) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "ShareQuota", 5120); + } + if (ShareQuota < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "ShareQuota", 1); + } + } + } +} diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SdkInfo_StorageManagementClient.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SdkInfo_StorageManagementClient.cs index 2e6668fd3764e..4e7117ff234d5 100644 --- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SdkInfo_StorageManagementClient.cs +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SdkInfo_StorageManagementClient.cs @@ -21,6 +21,8 @@ public static IEnumerable> ApiInfo_StorageManageme { new Tuple("Storage", "BlobContainers", "2019-04-01"), new Tuple("Storage", "BlobServices", "2019-04-01"), + new Tuple("Storage", "FileServices", "2019-04-01"), + new Tuple("Storage", "FileShares", "2019-04-01"), new Tuple("Storage", "ManagementPolicies", "2019-04-01"), new Tuple("Storage", "Operations", "2019-04-01"), new Tuple("Storage", "Skus", "2019-04-01"), @@ -35,7 +37,7 @@ public static IEnumerable> ApiInfo_StorageManageme public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/storage/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp.output-folder=C:\\code\\srpsdk\\sdk\\storage\\Microsoft.Azure.Management.Storage\\src\\Generated"; public static readonly String GithubForkName = "Azure"; public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "d753d28f32643d8062e1f7863d8f8e188dac9556"; + public static readonly String GithubCommidId = "6e6a651b6805d1811190025616f35e5a13194910"; public static readonly String CodeGenerationErrors = ""; public static readonly String GithubRepoName = "azure-rest-api-specs"; // END: Code Generation Metadata Section diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/StorageManagementClient.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/StorageManagementClient.cs index 52c34d78383d5..c89f3a08d1127 100644 --- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/StorageManagementClient.cs +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/StorageManagementClient.cs @@ -109,6 +109,16 @@ public partial class StorageManagementClient : ServiceClient public virtual IBlobContainersOperations BlobContainers { get; private set; } + /// + /// Gets the IFileServicesOperations. + /// + public virtual IFileServicesOperations FileServices { get; private set; } + + /// + /// Gets the IFileSharesOperations. + /// + public virtual IFileSharesOperations FileShares { get; private set; } + /// /// Initializes a new instance of the StorageManagementClient class. /// @@ -357,6 +367,8 @@ private void Initialize() ManagementPolicies = new ManagementPoliciesOperations(this); BlobServices = new BlobServicesOperations(this); BlobContainers = new BlobContainersOperations(this); + FileServices = new FileServicesOperations(this); + FileShares = new FileSharesOperations(this); BaseUri = new System.Uri("https://management.azure.com"); ApiVersion = "2019-04-01"; AcceptLanguage = "en-US"; diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Microsoft.Azure.Management.Storage.csproj b/sdk/storage/Microsoft.Azure.Management.Storage/src/Microsoft.Azure.Management.Storage.csproj index 6b5dbc7434707..91ecc1c543efa 100644 --- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Microsoft.Azure.Management.Storage.csproj +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Microsoft.Azure.Management.Storage.csproj @@ -7,7 +7,7 @@ Microsoft.Azure.Management.Storage Microsoft Azure Management Storage Library Microsoft.Azure.Management.Storage - 13.0.0 + 13.1.0 Microsoft Azure Storage management;Storage;Storage management; See https://aka.ms/asdotnetsdkchangelog for release notes. diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Properties/AssemblyInfo.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Properties/AssemblyInfo.cs index 0175852c71f17..080ab5589a88c 100644 --- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Properties/AssemblyInfo.cs +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. using System.Reflection; @@ -8,7 +8,7 @@ [assembly: AssemblyDescription("Provides Microsoft Azure Storage management functions for managing the Microsoft Azure Storage service.")] [assembly: AssemblyVersion("13.0.0.0")] -[assembly: AssemblyFileVersion("13.0.0.0")] +[assembly: AssemblyFileVersion("13.1.0.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft")] diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/tests/SessionRecords/Storage.Tests.FileServiceTests/FileServiceCorsTest.json b/sdk/storage/Microsoft.Azure.Management.Storage/tests/SessionRecords/Storage.Tests.FileServiceTests/FileServiceCorsTest.json new file mode 100644 index 0000000000000..322c646ac166b --- /dev/null +++ b/sdk/storage/Microsoft.Azure.Management.Storage/tests/SessionRecords/Storage.Tests.FileServiceTests/FileServiceCorsTest.json @@ -0,0 +1,1149 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourcegroups/res7556?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L3Jlc291cmNlZ3JvdXBzL3Jlczc1NTY/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"eastus2\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9153ced9-476a-49a2-944e-cac71fe0aa39" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "29" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-request-id": [ + "9adb2789-5ef4-400e-8a8e-5d4345d6c2d2" + ], + "x-ms-correlation-request-id": [ + "9adb2789-5ef4-400e-8a8e-5d4345d6c2d2" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T094304Z:9adb2789-5ef4-400e-8a8e-5d4345d6c2d2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:43:03 GMT" + ], + "Content-Length": [ + "168" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res7556\",\r\n \"name\": \"res7556\",\r\n \"location\": \"eastus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res7556/providers/Microsoft.Storage/storageAccounts/sto1299?api-version=2019-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L3Jlc291cmNlR3JvdXBzL3Jlczc1NTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9zdG8xMjk5P2FwaS12ZXJzaW9uPTIwMTktMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_GRS\"\r\n },\r\n \"kind\": \"Storage\",\r\n \"location\": \"eastus2(stage)\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5cc607c8-1862-4dc6-a196-c5b7a933e510" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/13.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "168" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/providers/Microsoft.Storage/locations/eastus2(stage)/asyncoperations/135ec2b7-f324-4b0c-81e7-54cfd7bdcc23?monitor=true&api-version=2019-04-01" + ], + "Retry-After": [ + "17" + ], + "x-ms-request-id": [ + "135ec2b7-f324-4b0c-81e7-54cfd7bdcc23" + ], + "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": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "c99562e6-4a8d-4596-9560-3f174b2cb9f3" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T094307Z:c99562e6-4a8d-4596-9560-3f174b2cb9f3" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:43:06 GMT" + ], + "Content-Type": [ + "text/plain; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/providers/Microsoft.Storage/locations/eastus2(stage)/asyncoperations/135ec2b7-f324-4b0c-81e7-54cfd7bdcc23?monitor=true&api-version=2019-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L3Byb3ZpZGVycy9NaWNyb3NvZnQuU3RvcmFnZS9sb2NhdGlvbnMvZWFzdHVzMihzdGFnZSkvYXN5bmNvcGVyYXRpb25zLzEzNWVjMmI3LWYzMjQtNGIwYy04MWU3LTU0Y2ZkN2JkY2MyMz9tb25pdG9yPXRydWUmYXBpLXZlcnNpb249MjAxOS0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/13.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "4a49d9ce-a43e-463f-b99b-88cacad0f16c" + ], + "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": [ + "11969" + ], + "x-ms-correlation-request-id": [ + "18c9f6a4-f636-4afc-850f-83b1703a6743" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T094324Z:18c9f6a4-f636-4afc-850f-83b1703a6743" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:43:23 GMT" + ], + "Content-Length": [ + "1121" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_GRS\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"kind\": \"Storage\",\r\n \"id\": \"/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res7556/providers/Microsoft.Storage/storageAccounts/sto1299\",\r\n \"name\": \"sto1299\",\r\n \"type\": \"Microsoft.Storage/storageAccounts\",\r\n \"location\": \"eastus2(stage)\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\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\": true,\r\n \"encryption\": {\r\n \"services\": {\r\n \"file\": {\r\n \"enabled\": true,\r\n \"lastEnabledTime\": \"2019-08-21T09:43:06.8100149Z\"\r\n },\r\n \"blob\": {\r\n \"enabled\": true,\r\n \"lastEnabledTime\": \"2019-08-21T09:43:06.8100149Z\"\r\n }\r\n },\r\n \"keySource\": \"Microsoft.Storage\"\r\n },\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"2019-08-21T09:43:06.7631241Z\",\r\n \"primaryEndpoints\": {\r\n \"blob\": \"https://sto1299.blob.core.windows.net/\",\r\n \"queue\": \"https://sto1299.queue.core.windows.net/\",\r\n \"table\": \"https://sto1299.table.core.windows.net/\",\r\n \"file\": \"https://sto1299.file.core.windows.net/\"\r\n },\r\n \"primaryLocation\": \"eastus2(stage)\",\r\n \"statusOfPrimary\": \"available\",\r\n \"secondaryLocation\": \"northcentralus(stage)\",\r\n \"statusOfSecondary\": \"available\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res7556/providers/Microsoft.Storage/storageAccounts/sto1299/fileServices/default?api-version=2019-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L3Jlc291cmNlR3JvdXBzL3Jlczc1NTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9zdG8xMjk5L2ZpbGVTZXJ2aWNlcy9kZWZhdWx0P2FwaS12ZXJzaW9uPTIwMTktMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "78463e2d-dea3-43ef-846f-5d8d7c9ce6d1" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/13.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "12c8989e-caab-4644-9de2-7126ba182757" + ], + "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": [ + "11968" + ], + "x-ms-correlation-request-id": [ + "2de419b7-a6c4-42e3-99e3-772254b711e2" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T094325Z:2de419b7-a6c4-42e3-99e3-772254b711e2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:43:24 GMT" + ], + "Content-Length": [ + "268" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res7556/providers/Microsoft.Storage/storageAccounts/sto1299/fileServices/default\",\r\n \"name\": \"default\",\r\n \"type\": \"Microsoft.Storage/storageAccounts/fileServices\",\r\n \"properties\": {\r\n \"cors\": {\r\n \"corsRules\": []\r\n }\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res7556/providers/Microsoft.Storage/storageAccounts/sto1299/fileServices/default?api-version=2019-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L3Jlc291cmNlR3JvdXBzL3Jlczc1NTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9zdG8xMjk5L2ZpbGVTZXJ2aWNlcy9kZWZhdWx0P2FwaS12ZXJzaW9uPTIwMTktMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b58c3da1-1975-4d92-b917-1c89bb020cb7" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/13.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "cb3b4961-59a3-4889-bd82-10b0130ebaf2" + ], + "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": [ + "11967" + ], + "x-ms-correlation-request-id": [ + "b80dec8d-5603-48c0-857b-a1073bbc8486" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T094326Z:b80dec8d-5603-48c0-857b-a1073bbc8486" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:43:25 GMT" + ], + "Content-Length": [ + "904" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res7556/providers/Microsoft.Storage/storageAccounts/sto1299/fileServices/default\",\r\n \"name\": \"default\",\r\n \"type\": \"Microsoft.Storage/storageAccounts/fileServices\",\r\n \"properties\": {\r\n \"cors\": {\r\n \"corsRules\": [\r\n {\r\n \"allowedOrigins\": [\r\n \"http://www.contoso.com\",\r\n \"http://www.fabrikam.com\"\r\n ],\r\n \"allowedMethods\": [\r\n \"GET\",\r\n \"HEAD\",\r\n \"POST\",\r\n \"OPTIONS\",\r\n \"MERGE\",\r\n \"PUT\"\r\n ],\r\n \"maxAgeInSeconds\": 100,\r\n \"exposedHeaders\": [\r\n \"x-ms-meta-*\"\r\n ],\r\n \"allowedHeaders\": [\r\n \"x-ms-meta-abc\",\r\n \"x-ms-meta-data*\",\r\n \"x-ms-meta-target*\"\r\n ]\r\n },\r\n {\r\n \"allowedOrigins\": [\r\n \"*\"\r\n ],\r\n \"allowedMethods\": [\r\n \"GET\"\r\n ],\r\n \"maxAgeInSeconds\": 2,\r\n \"exposedHeaders\": [\r\n \"*\"\r\n ],\r\n \"allowedHeaders\": [\r\n \"*\"\r\n ]\r\n },\r\n {\r\n \"allowedOrigins\": [\r\n \"http://www.abc23.com\",\r\n \"https://www.fabrikam.com/*\"\r\n ],\r\n \"allowedMethods\": [\r\n \"GET\",\r\n \"PUT\",\r\n \"CONNECT\"\r\n ],\r\n \"maxAgeInSeconds\": 2000,\r\n \"exposedHeaders\": [\r\n \"x-ms-meta-abc\",\r\n \"x-ms-meta-data*\",\r\n \"x -ms-meta-target*\"\r\n ],\r\n \"allowedHeaders\": [\r\n \"x-ms-meta-12345675754564*\"\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res7556/providers/Microsoft.Storage/storageAccounts/sto1299/fileServices/default?api-version=2019-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L3Jlc291cmNlR3JvdXBzL3Jlczc1NTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9zdG8xMjk5L2ZpbGVTZXJ2aWNlcy9kZWZhdWx0P2FwaS12ZXJzaW9uPTIwMTktMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"cors\": {\r\n \"corsRules\": [\r\n {\r\n \"allowedOrigins\": [\r\n \"http://www.contoso.com\",\r\n \"http://www.fabrikam.com\"\r\n ],\r\n \"allowedMethods\": [\r\n \"GET\",\r\n \"HEAD\",\r\n \"POST\",\r\n \"OPTIONS\",\r\n \"MERGE\",\r\n \"PUT\"\r\n ],\r\n \"maxAgeInSeconds\": 100,\r\n \"exposedHeaders\": [\r\n \"x-ms-meta-*\"\r\n ],\r\n \"allowedHeaders\": [\r\n \"x-ms-meta-abc\",\r\n \"x-ms-meta-data*\",\r\n \"x-ms-meta-target*\"\r\n ]\r\n },\r\n {\r\n \"allowedOrigins\": [\r\n \"*\"\r\n ],\r\n \"allowedMethods\": [\r\n \"GET\"\r\n ],\r\n \"maxAgeInSeconds\": 2,\r\n \"exposedHeaders\": [\r\n \"*\"\r\n ],\r\n \"allowedHeaders\": [\r\n \"*\"\r\n ]\r\n },\r\n {\r\n \"allowedOrigins\": [\r\n \"http://www.abc23.com\",\r\n \"https://www.fabrikam.com/*\"\r\n ],\r\n \"allowedMethods\": [\r\n \"GET\",\r\n \"PUT\",\r\n \"CONNECT\"\r\n ],\r\n \"maxAgeInSeconds\": 2000,\r\n \"exposedHeaders\": [\r\n \"x-ms-meta-abc\",\r\n \"x-ms-meta-data*\",\r\n \"x -ms-meta-target*\"\r\n ],\r\n \"allowedHeaders\": [\r\n \"x-ms-meta-12345675754564*\"\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "00d92476-3c16-49a9-a5dd-37b55c901210" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/13.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "1466" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "ca74650e-f109-49af-94f7-46d4d2973124" + ], + "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": [ + "1193" + ], + "x-ms-correlation-request-id": [ + "5b00ed89-23f6-4454-8adb-aa21d1128674" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T094326Z:5b00ed89-23f6-4454-8adb-aa21d1128674" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:43:25 GMT" + ], + "Content-Length": [ + "904" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res7556/providers/Microsoft.Storage/storageAccounts/sto1299/fileServices/default\",\r\n \"name\": \"default\",\r\n \"type\": \"Microsoft.Storage/storageAccounts/fileServices\",\r\n \"properties\": {\r\n \"cors\": {\r\n \"corsRules\": [\r\n {\r\n \"allowedOrigins\": [\r\n \"http://www.contoso.com\",\r\n \"http://www.fabrikam.com\"\r\n ],\r\n \"allowedMethods\": [\r\n \"GET\",\r\n \"HEAD\",\r\n \"POST\",\r\n \"OPTIONS\",\r\n \"MERGE\",\r\n \"PUT\"\r\n ],\r\n \"maxAgeInSeconds\": 100,\r\n \"exposedHeaders\": [\r\n \"x-ms-meta-*\"\r\n ],\r\n \"allowedHeaders\": [\r\n \"x-ms-meta-abc\",\r\n \"x-ms-meta-data*\",\r\n \"x-ms-meta-target*\"\r\n ]\r\n },\r\n {\r\n \"allowedOrigins\": [\r\n \"*\"\r\n ],\r\n \"allowedMethods\": [\r\n \"GET\"\r\n ],\r\n \"maxAgeInSeconds\": 2,\r\n \"exposedHeaders\": [\r\n \"*\"\r\n ],\r\n \"allowedHeaders\": [\r\n \"*\"\r\n ]\r\n },\r\n {\r\n \"allowedOrigins\": [\r\n \"http://www.abc23.com\",\r\n \"https://www.fabrikam.com/*\"\r\n ],\r\n \"allowedMethods\": [\r\n \"GET\",\r\n \"PUT\",\r\n \"CONNECT\"\r\n ],\r\n \"maxAgeInSeconds\": 2000,\r\n \"exposedHeaders\": [\r\n \"x-ms-meta-abc\",\r\n \"x-ms-meta-data*\",\r\n \"x -ms-meta-target*\"\r\n ],\r\n \"allowedHeaders\": [\r\n \"x-ms-meta-12345675754564*\"\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res7556/providers/Microsoft.Storage/storageAccounts/sto1299?api-version=2019-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L3Jlc291cmNlR3JvdXBzL3Jlczc1NTYvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9zdG8xMjk5P2FwaS12ZXJzaW9uPTIwMTktMDQtMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1261cdce-17f3-44ab-adc6-7dc782cd6199" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/13.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "286de070-4134-469c-a553-0d592b0892b5" + ], + "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": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "9362d77b-b34c-4b47-b9ec-0cad6f5bc0f2" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T094329Z:9362d77b-b34c-4b47-b9ec-0cad6f5bc0f2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:43:28 GMT" + ], + "Content-Type": [ + "text/plain; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourcegroups/res7556?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L3Jlc291cmNlZ3JvdXBzL3Jlczc1NTY/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "32146c79-8cbb-402c-b93b-844d3a492ebd" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM3NTU2LUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14992" + ], + "x-ms-request-id": [ + "8611ca37-d21a-4b39-aee4-4db4c478d5ac" + ], + "x-ms-correlation-request-id": [ + "8611ca37-d21a-4b39-aee4-4db4c478d5ac" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T094333Z:8611ca37-d21a-4b39-aee4-4db4c478d5ac" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:43:32 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM3NTU2LUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFTUlZNM05UVTJMVVZCVTFSVlV6SWlMQ0pxYjJKTWIyTmhkR2x2YmlJNkltVmhjM1IxY3pJaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM3NTU2LUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11966" + ], + "x-ms-request-id": [ + "8a9cadf4-af98-40e4-ae10-ea2bcfc9216b" + ], + "x-ms-correlation-request-id": [ + "8a9cadf4-af98-40e4-ae10-ea2bcfc9216b" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T094349Z:8a9cadf4-af98-40e4-ae10-ea2bcfc9216b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:43:49 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM3NTU2LUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFTUlZNM05UVTJMVVZCVTFSVlV6SWlMQ0pxYjJKTWIyTmhkR2x2YmlJNkltVmhjM1IxY3pJaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM3NTU2LUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11965" + ], + "x-ms-request-id": [ + "ccec6730-49e0-411c-83d3-ea1a399f18cd" + ], + "x-ms-correlation-request-id": [ + "ccec6730-49e0-411c-83d3-ea1a399f18cd" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T094405Z:ccec6730-49e0-411c-83d3-ea1a399f18cd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:44:04 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM3NTU2LUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFTUlZNM05UVTJMVVZCVTFSVlV6SWlMQ0pxYjJKTWIyTmhkR2x2YmlJNkltVmhjM1IxY3pJaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM3NTU2LUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11964" + ], + "x-ms-request-id": [ + "ff4c89a8-cc15-40a8-950c-66c63d5d5307" + ], + "x-ms-correlation-request-id": [ + "ff4c89a8-cc15-40a8-950c-66c63d5d5307" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T094420Z:ff4c89a8-cc15-40a8-950c-66c63d5d5307" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:44:20 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM3NTU2LUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFTUlZNM05UVTJMVVZCVTFSVlV6SWlMQ0pxYjJKTWIyTmhkR2x2YmlJNkltVmhjM1IxY3pJaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM3NTU2LUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11963" + ], + "x-ms-request-id": [ + "73c2a13d-a275-4a61-99eb-62bd70aeb4a7" + ], + "x-ms-correlation-request-id": [ + "73c2a13d-a275-4a61-99eb-62bd70aeb4a7" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T094436Z:73c2a13d-a275-4a61-99eb-62bd70aeb4a7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:44:35 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM3NTU2LUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFTUlZNM05UVTJMVVZCVTFSVlV6SWlMQ0pxYjJKTWIyTmhkR2x2YmlJNkltVmhjM1IxY3pJaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM3NTU2LUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11962" + ], + "x-ms-request-id": [ + "fb10f86b-82ee-4ab4-af4a-5404e47db005" + ], + "x-ms-correlation-request-id": [ + "fb10f86b-82ee-4ab4-af4a-5404e47db005" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T094451Z:fb10f86b-82ee-4ab4-af4a-5404e47db005" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:44:50 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM3NTU2LUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFTUlZNM05UVTJMVVZCVTFSVlV6SWlMQ0pxYjJKTWIyTmhkR2x2YmlJNkltVmhjM1IxY3pJaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM3NTU2LUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11961" + ], + "x-ms-request-id": [ + "090d9a58-2b06-46f9-a6aa-8ba572f8961f" + ], + "x-ms-correlation-request-id": [ + "090d9a58-2b06-46f9-a6aa-8ba572f8961f" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T094507Z:090d9a58-2b06-46f9-a6aa-8ba572f8961f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:45:07 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM3NTU2LUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFTUlZNM05UVTJMVVZCVTFSVlV6SWlMQ0pxYjJKTWIyTmhkR2x2YmlJNkltVmhjM1IxY3pJaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM3NTU2LUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11960" + ], + "x-ms-request-id": [ + "98f681ce-164c-49df-a08d-66cc87ef0f5f" + ], + "x-ms-correlation-request-id": [ + "98f681ce-164c-49df-a08d-66cc87ef0f5f" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T094522Z:98f681ce-164c-49df-a08d-66cc87ef0f5f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:45:22 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM3NTU2LUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFTUlZNM05UVTJMVVZCVTFSVlV6SWlMQ0pxYjJKTWIyTmhkR2x2YmlJNkltVmhjM1IxY3pJaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM3NTU2LUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11959" + ], + "x-ms-request-id": [ + "0c89b728-5ebc-4a29-826a-973f2c682dd9" + ], + "x-ms-correlation-request-id": [ + "0c89b728-5ebc-4a29-826a-973f2c682dd9" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T094538Z:0c89b728-5ebc-4a29-826a-973f2c682dd9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:45:37 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM3NTU2LUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFTUlZNM05UVTJMVVZCVTFSVlV6SWlMQ0pxYjJKTWIyTmhkR2x2YmlJNkltVmhjM1IxY3pJaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM3NTU2LUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11958" + ], + "x-ms-request-id": [ + "ed2db27b-4030-4aae-a000-bcd96f86c647" + ], + "x-ms-correlation-request-id": [ + "ed2db27b-4030-4aae-a000-bcd96f86c647" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T094553Z:ed2db27b-4030-4aae-a000-bcd96f86c647" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:45:53 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM3NTU2LUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFTUlZNM05UVTJMVVZCVTFSVlV6SWlMQ0pxYjJKTWIyTmhkR2x2YmlJNkltVmhjM1IxY3pJaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11957" + ], + "x-ms-request-id": [ + "14c086d6-c4d0-495b-aadf-2cb24ef799af" + ], + "x-ms-correlation-request-id": [ + "14c086d6-c4d0-495b-aadf-2cb24ef799af" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T094609Z:14c086d6-c4d0-495b-aadf-2cb24ef799af" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:46:08 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM3NTU2LUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFTUlZNM05UVTJMVVZCVTFSVlV6SWlMQ0pxYjJKTWIyTmhkR2x2YmlJNkltVmhjM1IxY3pJaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11956" + ], + "x-ms-request-id": [ + "df52aad7-34d3-4dd8-bfa4-a6f53ff92b49" + ], + "x-ms-correlation-request-id": [ + "df52aad7-34d3-4dd8-bfa4-a6f53ff92b49" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T094609Z:df52aad7-34d3-4dd8-bfa4-a6f53ff92b49" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:46:09 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + } + ], + "Names": { + "CreateResourceGroup": [ + "res7556" + ], + "FileServiceCorsTest": [ + "sto1299" + ] + }, + "Variables": { + "SubscriptionId": "ce4a7590-4722-4bcf-a2c6-e473e9f11778" + } +} \ No newline at end of file diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/tests/SessionRecords/Storage.Tests.FileServiceTests/FileSharesCreateDeleteListTest.json b/sdk/storage/Microsoft.Azure.Management.Storage/tests/SessionRecords/Storage.Tests.FileServiceTests/FileSharesCreateDeleteListTest.json new file mode 100644 index 0000000000000..d105978aa9680 --- /dev/null +++ b/sdk/storage/Microsoft.Azure.Management.Storage/tests/SessionRecords/Storage.Tests.FileServiceTests/FileSharesCreateDeleteListTest.json @@ -0,0 +1,1259 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourcegroups/res6963?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L3Jlc291cmNlZ3JvdXBzL3JlczY5NjM/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"eastus2\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "cc2bf77d-3c14-47b0-9912-fbc99aa85e33" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "29" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1183" + ], + "x-ms-request-id": [ + "c457a34e-6668-4844-959f-ab779a482ae4" + ], + "x-ms-correlation-request-id": [ + "c457a34e-6668-4844-959f-ab779a482ae4" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T100530Z:c457a34e-6668-4844-959f-ab779a482ae4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 10:05:29 GMT" + ], + "Content-Length": [ + "168" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res6963\",\r\n \"name\": \"res6963\",\r\n \"location\": \"eastus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res6963/providers/Microsoft.Storage/storageAccounts/sto7505?api-version=2019-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L3Jlc291cmNlR3JvdXBzL3JlczY5NjMvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9zdG83NTA1P2FwaS12ZXJzaW9uPTIwMTktMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_GRS\"\r\n },\r\n \"kind\": \"Storage\",\r\n \"location\": \"eastus2(stage)\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "648e4bd6-af7f-4196-9f1d-574632c3474d" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/13.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "168" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/providers/Microsoft.Storage/locations/eastus2(stage)/asyncoperations/c54a5dcf-7c0d-416c-bb55-09c60b261364?monitor=true&api-version=2019-04-01" + ], + "Retry-After": [ + "17" + ], + "x-ms-request-id": [ + "c54a5dcf-7c0d-416c-bb55-09c60b261364" + ], + "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": [ + "1182" + ], + "x-ms-correlation-request-id": [ + "5969f472-a9f1-416f-a994-2b82d66c2120" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T100533Z:5969f472-a9f1-416f-a994-2b82d66c2120" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 10:05:33 GMT" + ], + "Content-Type": [ + "text/plain; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/providers/Microsoft.Storage/locations/eastus2(stage)/asyncoperations/c54a5dcf-7c0d-416c-bb55-09c60b261364?monitor=true&api-version=2019-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L3Byb3ZpZGVycy9NaWNyb3NvZnQuU3RvcmFnZS9sb2NhdGlvbnMvZWFzdHVzMihzdGFnZSkvYXN5bmNvcGVyYXRpb25zL2M1NGE1ZGNmLTdjMGQtNDE2Yy1iYjU1LTA5YzYwYjI2MTM2ND9tb25pdG9yPXRydWUmYXBpLXZlcnNpb249MjAxOS0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/13.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "444ac6b8-fc5e-42aa-98d5-beecbb94cd37" + ], + "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": [ + "11970" + ], + "x-ms-correlation-request-id": [ + "4e948dd8-1905-4766-ac35-cf5b1358840a" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T100550Z:4e948dd8-1905-4766-ac35-cf5b1358840a" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 10:05:50 GMT" + ], + "Content-Length": [ + "1121" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_GRS\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"kind\": \"Storage\",\r\n \"id\": \"/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res6963/providers/Microsoft.Storage/storageAccounts/sto7505\",\r\n \"name\": \"sto7505\",\r\n \"type\": \"Microsoft.Storage/storageAccounts\",\r\n \"location\": \"eastus2(stage)\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\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\": true,\r\n \"encryption\": {\r\n \"services\": {\r\n \"file\": {\r\n \"enabled\": true,\r\n \"lastEnabledTime\": \"2019-08-21T10:05:32.8206275Z\"\r\n },\r\n \"blob\": {\r\n \"enabled\": true,\r\n \"lastEnabledTime\": \"2019-08-21T10:05:32.8206275Z\"\r\n }\r\n },\r\n \"keySource\": \"Microsoft.Storage\"\r\n },\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"2019-08-21T10:05:32.7580683Z\",\r\n \"primaryEndpoints\": {\r\n \"blob\": \"https://sto7505.blob.core.windows.net/\",\r\n \"queue\": \"https://sto7505.queue.core.windows.net/\",\r\n \"table\": \"https://sto7505.table.core.windows.net/\",\r\n \"file\": \"https://sto7505.file.core.windows.net/\"\r\n },\r\n \"primaryLocation\": \"eastus2(stage)\",\r\n \"statusOfPrimary\": \"available\",\r\n \"secondaryLocation\": \"northcentralus(stage)\",\r\n \"statusOfSecondary\": \"available\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res6963/providers/Microsoft.Storage/storageAccounts/sto7505/fileServices/default/shares/share5408?api-version=2019-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L3Jlc291cmNlR3JvdXBzL3JlczY5NjMvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9zdG83NTA1L2ZpbGVTZXJ2aWNlcy9kZWZhdWx0L3NoYXJlcy9zaGFyZTU0MDg/YXBpLXZlcnNpb249MjAxOS0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6cbb3ea7-6daf-4a97-9882-dcf1b88f31bc" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/13.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"0x8D7261F26012EB6\"" + ], + "x-ms-request-id": [ + "3b69bd5d-bb92-4245-80e7-8613e58e4b27" + ], + "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": [ + "1181" + ], + "x-ms-correlation-request-id": [ + "4e2c2d2c-45dd-49e3-82df-32b086cb002b" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T100552Z:4e2c2d2c-45dd-49e3-82df-32b086cb002b" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 10:05:51 GMT" + ], + "Content-Length": [ + "255" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res6963/providers/Microsoft.Storage/storageAccounts/sto7505/fileServices/default/shares/share5408\",\r\n \"name\": \"share5408\",\r\n \"type\": \"Microsoft.Storage/storageAccounts/fileServices/shares\"\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res6963/providers/Microsoft.Storage/storageAccounts/sto7505/fileServices/default/shares/share5408?api-version=2019-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L3Jlc291cmNlR3JvdXBzL3JlczY5NjMvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9zdG83NTA1L2ZpbGVTZXJ2aWNlcy9kZWZhdWx0L3NoYXJlcy9zaGFyZTU0MDg/YXBpLXZlcnNpb249MjAxOS0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "31fdaff6-2dd9-4bbb-a9c1-ce82bbd65985" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/13.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"0x8D7261F26012EB6\"" + ], + "x-ms-request-id": [ + "674638da-4843-445f-834e-ba3e4f65121d" + ], + "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": [ + "11969" + ], + "x-ms-correlation-request-id": [ + "bb8c29db-49b1-4771-bc96-d126e5a989b8" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T100552Z:bb8c29db-49b1-4771-bc96-d126e5a989b8" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 10:05:52 GMT" + ], + "Content-Length": [ + "369" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res6963/providers/Microsoft.Storage/storageAccounts/sto7505/fileServices/default/shares/share5408\",\r\n \"name\": \"share5408\",\r\n \"type\": \"Microsoft.Storage/storageAccounts/fileServices/shares\",\r\n \"etag\": \"\\\"0x8D7261F26012EB6\\\"\",\r\n \"properties\": {\r\n \"lastModifiedTime\": \"2019-08-21T10:05:51Z\",\r\n \"shareQuota\": 5120\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res6963/providers/Microsoft.Storage/storageAccounts/sto7505/fileServices/default/shares/share5361?api-version=2019-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L3Jlc291cmNlR3JvdXBzL3JlczY5NjMvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9zdG83NTA1L2ZpbGVTZXJ2aWNlcy9kZWZhdWx0L3NoYXJlcy9zaGFyZTUzNjE/YXBpLXZlcnNpb249MjAxOS0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"metadata\": {\r\n \"metadata1\": \"true\",\r\n \"metadata2\": \"value2\"\r\n },\r\n \"shareQuota\": 500\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b16c9111-e73e-4224-99f4-f2c4f81bd7e9" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/13.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "135" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"0x8D7261F26B53CCF\"" + ], + "x-ms-request-id": [ + "842e377d-6a13-4a88-bf50-d0cf3c5a8503" + ], + "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": [ + "1180" + ], + "x-ms-correlation-request-id": [ + "95e3b88c-1579-422f-8e8c-e95847c5224a" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T100553Z:95e3b88c-1579-422f-8e8c-e95847c5224a" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 10:05:52 GMT" + ], + "Content-Length": [ + "340" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res6963/providers/Microsoft.Storage/storageAccounts/sto7505/fileServices/default/shares/share5361\",\r\n \"name\": \"share5361\",\r\n \"type\": \"Microsoft.Storage/storageAccounts/fileServices/shares\",\r\n \"properties\": {\r\n \"metadata\": {\r\n \"metadata1\": \"true\",\r\n \"metadata2\": \"value2\"\r\n },\r\n \"shareQuota\": 500\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res6963/providers/Microsoft.Storage/storageAccounts/sto7505/fileServices/default/shares/share5361?api-version=2019-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L3Jlc291cmNlR3JvdXBzL3JlczY5NjMvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9zdG83NTA1L2ZpbGVTZXJ2aWNlcy9kZWZhdWx0L3NoYXJlcy9zaGFyZTUzNjE/YXBpLXZlcnNpb249MjAxOS0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "522bd684-d544-412f-9cc0-98d616f399d1" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/13.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"0x8D7261F26B53CCF\"" + ], + "x-ms-request-id": [ + "eb3d1037-6baf-4b43-91df-e8e3a99c73cc" + ], + "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": [ + "11968" + ], + "x-ms-correlation-request-id": [ + "bd8df358-d267-46a7-92ff-ba77bda642a3" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T100553Z:bd8df358-d267-46a7-92ff-ba77bda642a3" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 10:05:53 GMT" + ], + "Content-Length": [ + "421" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res6963/providers/Microsoft.Storage/storageAccounts/sto7505/fileServices/default/shares/share5361\",\r\n \"name\": \"share5361\",\r\n \"type\": \"Microsoft.Storage/storageAccounts/fileServices/shares\",\r\n \"etag\": \"\\\"0x8D7261F26B53CCF\\\"\",\r\n \"properties\": {\r\n \"metadata\": {\r\n \"metadata1\": \"true\",\r\n \"metadata2\": \"value2\"\r\n },\r\n \"lastModifiedTime\": \"2019-08-21T10:05:53Z\",\r\n \"shareQuota\": 500\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res6963/providers/Microsoft.Storage/storageAccounts/sto7505/fileServices/default/shares/share5408?api-version=2019-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L3Jlc291cmNlR3JvdXBzL3JlczY5NjMvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9zdG83NTA1L2ZpbGVTZXJ2aWNlcy9kZWZhdWx0L3NoYXJlcy9zaGFyZTU0MDg/YXBpLXZlcnNpb249MjAxOS0wNC0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a3d4f0fb-956e-4baa-8283-150b80feb5e7" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/13.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "26baf8e6-f8eb-4e44-8893-fd8009fad569" + ], + "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": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "a0e03500-e0c2-42d1-a4b4-af128abd28b2" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T100554Z:a0e03500-e0c2-42d1-a4b4-af128abd28b2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 10:05:53 GMT" + ], + "Content-Type": [ + "text/plain; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res6963/providers/Microsoft.Storage/storageAccounts/sto7505/fileServices/default/shares?api-version=2019-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L3Jlc291cmNlR3JvdXBzL3JlczY5NjMvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9zdG83NTA1L2ZpbGVTZXJ2aWNlcy9kZWZhdWx0L3NoYXJlcz9hcGktdmVyc2lvbj0yMDE5LTA0LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "21244032-f8c8-491d-a41b-1391472350cd" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/13.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "25752a6e-17f8-418c-bb24-87c9eacd017a" + ], + "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": [ + "11967" + ], + "x-ms-correlation-request-id": [ + "b0896e92-fd93-4078-a1e5-d6812613a9b2" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T100554Z:b0896e92-fd93-4078-a1e5-d6812613a9b2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 10:05:53 GMT" + ], + "Content-Length": [ + "380" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res6963/providers/Microsoft.Storage/storageAccounts/sto7505/fileServices/default/shares/share5361\",\r\n \"name\": \"share5361\",\r\n \"type\": \"Microsoft.Storage/storageAccounts/fileServices/shares\",\r\n \"etag\": \"\\\"0x8D7261F26B53CCF\\\"\",\r\n \"properties\": {\r\n \"lastModifiedTime\": \"2019-08-21T10:05:53Z\",\r\n \"shareQuota\": 500\r\n }\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res6963/providers/Microsoft.Storage/storageAccounts/sto7505/fileServices/default/shares?api-version=2019-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L3Jlc291cmNlR3JvdXBzL3JlczY5NjMvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9zdG83NTA1L2ZpbGVTZXJ2aWNlcy9kZWZhdWx0L3NoYXJlcz9hcGktdmVyc2lvbj0yMDE5LTA0LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9f7d439a-b55c-47d6-a432-1bd58fcb1d81" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/13.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "1a859a2e-281f-4818-b1ba-8ab55790fe9c" + ], + "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": [ + "11966" + ], + "x-ms-correlation-request-id": [ + "5d900636-b1b3-4dc4-a273-c70549170451" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T100555Z:5d900636-b1b3-4dc4-a273-c70549170451" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 10:05:54 GMT" + ], + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res6963/providers/Microsoft.Storage/storageAccounts/sto7505/fileServices/default/shares/share5361?api-version=2019-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L3Jlc291cmNlR3JvdXBzL3JlczY5NjMvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9zdG83NTA1L2ZpbGVTZXJ2aWNlcy9kZWZhdWx0L3NoYXJlcy9zaGFyZTUzNjE/YXBpLXZlcnNpb249MjAxOS0wNC0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b042aedd-e774-4d47-9ce0-5a91af37b94a" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/13.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "4f024fba-6f92-41fd-b9cf-fee6f9916356" + ], + "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": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "3ddd3f06-a99f-4313-94c1-bb1f7b3495c5" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T100555Z:3ddd3f06-a99f-4313-94c1-bb1f7b3495c5" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 10:05:54 GMT" + ], + "Content-Type": [ + "text/plain; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res6963/providers/Microsoft.Storage/storageAccounts/sto7505/fileServices/default/shares/notexistshare?api-version=2019-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L3Jlc291cmNlR3JvdXBzL3JlczY5NjMvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9zdG83NTA1L2ZpbGVTZXJ2aWNlcy9kZWZhdWx0L3NoYXJlcy9ub3RleGlzdHNoYXJlP2FwaS12ZXJzaW9uPTIwMTktMDQtMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "da599218-cb61-45c0-8bbf-037ba5b2f90e" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/13.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "11bc4327-1c03-4d5c-af18-1b42d2cda4a6" + ], + "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": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "9ff93653-7643-45c3-a1c6-f17edf7b42de" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T100555Z:9ff93653-7643-45c3-a1c6-f17edf7b42de" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 10:05:55 GMT" + ], + "Content-Type": [ + "text/plain; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "", + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res6963/providers/Microsoft.Storage/storageAccounts/sto7505?api-version=2019-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L3Jlc291cmNlR3JvdXBzL3JlczY5NjMvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9zdG83NTA1P2FwaS12ZXJzaW9uPTIwMTktMDQtMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7534c163-cac2-4043-aabb-b0c31680ae50" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/13.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "f4e0e8e5-b0b6-4306-9883-489ace12b9f4" + ], + "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": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "c35a63a5-9633-4508-aa6b-8ae97c8f1ca3" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T100558Z:c35a63a5-9633-4508-aa6b-8ae97c8f1ca3" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 10:05:58 GMT" + ], + "Content-Type": [ + "text/plain; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourcegroups/res6963?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L3Jlc291cmNlZ3JvdXBzL3JlczY5NjM/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "06d139e4-fda5-42ce-bf41-340bb8cca508" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM2OTYzLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14981" + ], + "x-ms-request-id": [ + "7c335492-9942-4920-b95f-fdf427d10d6a" + ], + "x-ms-correlation-request-id": [ + "7c335492-9942-4920-b95f-fdf427d10d6a" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T100603Z:7c335492-9942-4920-b95f-fdf427d10d6a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 10:06:02 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM2OTYzLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFTUlZNMk9UWXpMVVZCVTFSVlV6SWlMQ0pxYjJKTWIyTmhkR2x2YmlJNkltVmhjM1IxY3pJaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM2OTYzLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11965" + ], + "x-ms-request-id": [ + "a19dedc6-ec32-40f2-af58-087a6a94962e" + ], + "x-ms-correlation-request-id": [ + "a19dedc6-ec32-40f2-af58-087a6a94962e" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T100619Z:a19dedc6-ec32-40f2-af58-087a6a94962e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 10:06:19 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM2OTYzLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFTUlZNMk9UWXpMVVZCVTFSVlV6SWlMQ0pxYjJKTWIyTmhkR2x2YmlJNkltVmhjM1IxY3pJaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM2OTYzLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11964" + ], + "x-ms-request-id": [ + "6811b0a4-dd02-4d5d-9351-c11f8d6726d5" + ], + "x-ms-correlation-request-id": [ + "6811b0a4-dd02-4d5d-9351-c11f8d6726d5" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T100634Z:6811b0a4-dd02-4d5d-9351-c11f8d6726d5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 10:06:34 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM2OTYzLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFTUlZNMk9UWXpMVVZCVTFSVlV6SWlMQ0pxYjJKTWIyTmhkR2x2YmlJNkltVmhjM1IxY3pJaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM2OTYzLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11963" + ], + "x-ms-request-id": [ + "8bd284c6-2179-4a0c-bc80-d5ea9eef3a05" + ], + "x-ms-correlation-request-id": [ + "8bd284c6-2179-4a0c-bc80-d5ea9eef3a05" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T100650Z:8bd284c6-2179-4a0c-bc80-d5ea9eef3a05" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 10:06:49 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM2OTYzLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFTUlZNMk9UWXpMVVZCVTFSVlV6SWlMQ0pxYjJKTWIyTmhkR2x2YmlJNkltVmhjM1IxY3pJaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM2OTYzLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11962" + ], + "x-ms-request-id": [ + "719d0133-bcca-4d74-83bf-39534e1f2e60" + ], + "x-ms-correlation-request-id": [ + "719d0133-bcca-4d74-83bf-39534e1f2e60" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T100705Z:719d0133-bcca-4d74-83bf-39534e1f2e60" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 10:07:04 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM2OTYzLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFTUlZNMk9UWXpMVVZCVTFSVlV6SWlMQ0pxYjJKTWIyTmhkR2x2YmlJNkltVmhjM1IxY3pJaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11961" + ], + "x-ms-request-id": [ + "25975936-5110-4745-9d31-3efd4e68e07d" + ], + "x-ms-correlation-request-id": [ + "25975936-5110-4745-9d31-3efd4e68e07d" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T100721Z:25975936-5110-4745-9d31-3efd4e68e07d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 10:07:21 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVM2OTYzLUVBU1RVUzIiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czIifQ?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFTUlZNMk9UWXpMVVZCVTFSVlV6SWlMQ0pxYjJKTWIyTmhkR2x2YmlJNkltVmhjM1IxY3pJaWZRP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11960" + ], + "x-ms-request-id": [ + "af4ecb1a-e964-4eae-8485-30e4a363d0f4" + ], + "x-ms-correlation-request-id": [ + "af4ecb1a-e964-4eae-8485-30e4a363d0f4" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T100721Z:af4ecb1a-e964-4eae-8485-30e4a363d0f4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 10:07:21 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + } + ], + "Names": { + "CreateResourceGroup": [ + "res6963" + ], + "FileSharesCreateDeleteListTest": [ + "sto7505", + "share5408", + "share5361" + ] + }, + "Variables": { + "SubscriptionId": "ce4a7590-4722-4bcf-a2c6-e473e9f11778" + } +} \ No newline at end of file diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/tests/SessionRecords/Storage.Tests.FileServiceTests/FileSharesUpdateGetTest.json b/sdk/storage/Microsoft.Azure.Management.Storage/tests/SessionRecords/Storage.Tests.FileServiceTests/FileSharesUpdateGetTest.json new file mode 100644 index 0000000000000..7176b053fd229 --- /dev/null +++ b/sdk/storage/Microsoft.Azure.Management.Storage/tests/SessionRecords/Storage.Tests.FileServiceTests/FileSharesUpdateGetTest.json @@ -0,0 +1,823 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourcegroups/res282?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L3Jlc291cmNlZ3JvdXBzL3JlczI4Mj9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"eastus2\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2a4a2e49-c6b7-49c5-9672-fbe1531f1475" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "29" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-request-id": [ + "30927a24-02c5-411c-b872-b730acf6e7ab" + ], + "x-ms-correlation-request-id": [ + "30927a24-02c5-411c-b872-b730acf6e7ab" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T093818Z:30927a24-02c5-411c-b872-b730acf6e7ab" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:38:18 GMT" + ], + "Content-Length": [ + "166" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res282\",\r\n \"name\": \"res282\",\r\n \"location\": \"eastus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res282/providers/Microsoft.Storage/storageAccounts/sto423?api-version=2019-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L3Jlc291cmNlR3JvdXBzL3JlczI4Mi9wcm92aWRlcnMvTWljcm9zb2Z0LlN0b3JhZ2Uvc3RvcmFnZUFjY291bnRzL3N0bzQyMz9hcGktdmVyc2lvbj0yMDE5LTA0LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_GRS\"\r\n },\r\n \"kind\": \"Storage\",\r\n \"location\": \"eastus2(stage)\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "62fe853c-edd1-4b4d-8df0-69c3757bddc3" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/13.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "168" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/providers/Microsoft.Storage/locations/eastus2(stage)/asyncoperations/c63c3344-84fd-4db9-899e-afb2796dd654?monitor=true&api-version=2019-04-01" + ], + "Retry-After": [ + "17" + ], + "x-ms-request-id": [ + "c63c3344-84fd-4db9-899e-afb2796dd654" + ], + "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": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "051b69f4-0cad-4db9-97bf-387cb4162dbc" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T093821Z:051b69f4-0cad-4db9-97bf-387cb4162dbc" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:38:20 GMT" + ], + "Content-Type": [ + "text/plain; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/providers/Microsoft.Storage/locations/eastus2(stage)/asyncoperations/c63c3344-84fd-4db9-899e-afb2796dd654?monitor=true&api-version=2019-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L3Byb3ZpZGVycy9NaWNyb3NvZnQuU3RvcmFnZS9sb2NhdGlvbnMvZWFzdHVzMihzdGFnZSkvYXN5bmNvcGVyYXRpb25zL2M2M2MzMzQ0LTg0ZmQtNGRiOS04OTllLWFmYjI3OTZkZDY1ND9tb25pdG9yPXRydWUmYXBpLXZlcnNpb249MjAxOS0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/13.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "28abf83b-7e4b-42ff-8042-79c92ef20443" + ], + "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": [ + "11995" + ], + "x-ms-correlation-request-id": [ + "e3e5f341-012e-4dc8-bd9a-b075f84e9176" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T093838Z:e3e5f341-012e-4dc8-bd9a-b075f84e9176" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:38:37 GMT" + ], + "Content-Length": [ + "1114" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_GRS\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"kind\": \"Storage\",\r\n \"id\": \"/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res282/providers/Microsoft.Storage/storageAccounts/sto423\",\r\n \"name\": \"sto423\",\r\n \"type\": \"Microsoft.Storage/storageAccounts\",\r\n \"location\": \"eastus2(stage)\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\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\": true,\r\n \"encryption\": {\r\n \"services\": {\r\n \"file\": {\r\n \"enabled\": true,\r\n \"lastEnabledTime\": \"2019-08-21T09:38:20.3601206Z\"\r\n },\r\n \"blob\": {\r\n \"enabled\": true,\r\n \"lastEnabledTime\": \"2019-08-21T09:38:20.3601206Z\"\r\n }\r\n },\r\n \"keySource\": \"Microsoft.Storage\"\r\n },\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"2019-08-21T09:38:20.2976321Z\",\r\n \"primaryEndpoints\": {\r\n \"blob\": \"https://sto423.blob.core.windows.net/\",\r\n \"queue\": \"https://sto423.queue.core.windows.net/\",\r\n \"table\": \"https://sto423.table.core.windows.net/\",\r\n \"file\": \"https://sto423.file.core.windows.net/\"\r\n },\r\n \"primaryLocation\": \"eastus2(stage)\",\r\n \"statusOfPrimary\": \"available\",\r\n \"secondaryLocation\": \"northcentralus(stage)\",\r\n \"statusOfSecondary\": \"available\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res282/providers/Microsoft.Storage/storageAccounts/sto423/fileServices/default/shares/share3030?api-version=2019-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L3Jlc291cmNlR3JvdXBzL3JlczI4Mi9wcm92aWRlcnMvTWljcm9zb2Z0LlN0b3JhZ2Uvc3RvcmFnZUFjY291bnRzL3N0bzQyMy9maWxlU2VydmljZXMvZGVmYXVsdC9zaGFyZXMvc2hhcmUzMDMwP2FwaS12ZXJzaW9uPTIwMTktMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "15884a1b-64ce-4416-b534-107af69117be" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/13.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"0x8D7261B58D37A6E\"" + ], + "x-ms-request-id": [ + "445f7d80-e51f-448d-8ad3-ea0cb909cdcc" + ], + "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": [ + "1193" + ], + "x-ms-correlation-request-id": [ + "e68f95bc-e535-4579-909b-4fd64cad2ac5" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T093839Z:e68f95bc-e535-4579-909b-4fd64cad2ac5" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:38:39 GMT" + ], + "Content-Length": [ + "253" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res282/providers/Microsoft.Storage/storageAccounts/sto423/fileServices/default/shares/share3030\",\r\n \"name\": \"share3030\",\r\n \"type\": \"Microsoft.Storage/storageAccounts/fileServices/shares\"\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res282/providers/Microsoft.Storage/storageAccounts/sto423/fileServices/default/shares/share3030?api-version=2019-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L3Jlc291cmNlR3JvdXBzL3JlczI4Mi9wcm92aWRlcnMvTWljcm9zb2Z0LlN0b3JhZ2Uvc3RvcmFnZUFjY291bnRzL3N0bzQyMy9maWxlU2VydmljZXMvZGVmYXVsdC9zaGFyZXMvc2hhcmUzMDMwP2FwaS12ZXJzaW9uPTIwMTktMDQtMDE=", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"properties\": {\r\n \"metadata\": {\r\n \"metadata1\": \"true\",\r\n \"metadata2\": \"value2\"\r\n },\r\n \"shareQuota\": 501\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "79abe0ec-c3b8-487b-a022-f51826ef39cb" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/13.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "135" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"0x8D7261B5946D5FE\"" + ], + "x-ms-request-id": [ + "5cfcae66-f4b6-4ebe-b2e6-b055a5025d5e" + ], + "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": [ + "1192" + ], + "x-ms-correlation-request-id": [ + "19706789-4fa5-49ea-8eaf-e0636bf054f2" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T093840Z:19706789-4fa5-49ea-8eaf-e0636bf054f2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:38:39 GMT" + ], + "Content-Length": [ + "338" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res282/providers/Microsoft.Storage/storageAccounts/sto423/fileServices/default/shares/share3030\",\r\n \"name\": \"share3030\",\r\n \"type\": \"Microsoft.Storage/storageAccounts/fileServices/shares\",\r\n \"properties\": {\r\n \"metadata\": {\r\n \"metadata1\": \"true\",\r\n \"metadata2\": \"value2\"\r\n },\r\n \"shareQuota\": 501\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res282/providers/Microsoft.Storage/storageAccounts/sto423/fileServices/default/shares/share3030?api-version=2019-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L3Jlc291cmNlR3JvdXBzL3JlczI4Mi9wcm92aWRlcnMvTWljcm9zb2Z0LlN0b3JhZ2Uvc3RvcmFnZUFjY291bnRzL3N0bzQyMy9maWxlU2VydmljZXMvZGVmYXVsdC9zaGFyZXMvc2hhcmUzMDMwP2FwaS12ZXJzaW9uPTIwMTktMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "196b16e5-10ba-4f6d-840d-331532300426" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/13.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"0x8D7261B5946D5FE\"" + ], + "x-ms-request-id": [ + "abaa09b4-c1b6-4a18-8f99-e90d5e280709" + ], + "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": [ + "11994" + ], + "x-ms-correlation-request-id": [ + "3f9ffdfb-1568-4d1f-b394-15e604484dff" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T093840Z:3f9ffdfb-1568-4d1f-b394-15e604484dff" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:38:39 GMT" + ], + "Content-Length": [ + "419" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res282/providers/Microsoft.Storage/storageAccounts/sto423/fileServices/default/shares/share3030\",\r\n \"name\": \"share3030\",\r\n \"type\": \"Microsoft.Storage/storageAccounts/fileServices/shares\",\r\n \"etag\": \"\\\"0x8D7261B5946D5FE\\\"\",\r\n \"properties\": {\r\n \"metadata\": {\r\n \"metadata1\": \"true\",\r\n \"metadata2\": \"value2\"\r\n },\r\n \"lastModifiedTime\": \"2019-08-21T09:38:40Z\",\r\n \"shareQuota\": 501\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourceGroups/res282/providers/Microsoft.Storage/storageAccounts/sto423?api-version=2019-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L3Jlc291cmNlR3JvdXBzL3JlczI4Mi9wcm92aWRlcnMvTWljcm9zb2Z0LlN0b3JhZ2Uvc3RvcmFnZUFjY291bnRzL3N0bzQyMz9hcGktdmVyc2lvbj0yMDE5LTA0LTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6b2cb8f7-3586-4a66-88af-4fdd2134ff97" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/13.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "9da67185-a30f-4394-b1a0-9176481a0062" + ], + "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": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "844848a9-7c0b-41ae-be84-27fbcec90414" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T093843Z:844848a9-7c0b-41ae-be84-27fbcec90414" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:38:43 GMT" + ], + "Content-Type": [ + "text/plain; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/resourcegroups/res282?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L3Jlc291cmNlZ3JvdXBzL3JlczI4Mj9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9f7dccb1-46b3-4db4-8b2f-c1f63b7f62ee" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVMyODItRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14996" + ], + "x-ms-request-id": [ + "452dfa74-cc54-487b-9dec-39b6db291fda" + ], + "x-ms-correlation-request-id": [ + "452dfa74-cc54-487b-9dec-39b6db291fda" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T093847Z:452dfa74-cc54-487b-9dec-39b6db291fda" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:38:47 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVMyODItRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFTUlZNeU9ESXRSVUZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaVpXRnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVMyODItRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11993" + ], + "x-ms-request-id": [ + "9293fcd7-6526-40ba-a134-59891ea33bd4" + ], + "x-ms-correlation-request-id": [ + "9293fcd7-6526-40ba-a134-59891ea33bd4" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T093903Z:9293fcd7-6526-40ba-a134-59891ea33bd4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:39:02 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVMyODItRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFTUlZNeU9ESXRSVUZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaVpXRnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVMyODItRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11992" + ], + "x-ms-request-id": [ + "95d2fb97-191b-4261-9d29-93bb42a7482f" + ], + "x-ms-correlation-request-id": [ + "95d2fb97-191b-4261-9d29-93bb42a7482f" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T093918Z:95d2fb97-191b-4261-9d29-93bb42a7482f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:39:18 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVMyODItRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFTUlZNeU9ESXRSVUZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaVpXRnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVMyODItRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11991" + ], + "x-ms-request-id": [ + "c1fa9076-c1ed-494e-9b41-36763f1a7b55" + ], + "x-ms-correlation-request-id": [ + "c1fa9076-c1ed-494e-9b41-36763f1a7b55" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T093934Z:c1fa9076-c1ed-494e-9b41-36763f1a7b55" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:39:34 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVMyODItRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFTUlZNeU9ESXRSVUZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaVpXRnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11990" + ], + "x-ms-request-id": [ + "c19f8367-01db-4672-a30f-3800a22ea3be" + ], + "x-ms-correlation-request-id": [ + "c19f8367-01db-4672-a30f-3800a22ea3be" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T093950Z:c19f8367-01db-4672-a30f-3800a22ea3be" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:39:49 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ce4a7590-4722-4bcf-a2c6-e473e9f11778/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SRVMyODItRUFTVFVTMiIsImpvYkxvY2F0aW9uIjoiZWFzdHVzMiJ9?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2U0YTc1OTAtNDcyMi00YmNmLWEyYzYtZTQ3M2U5ZjExNzc4L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFTUlZNeU9ESXRSVUZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaVpXRnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27207.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11989" + ], + "x-ms-request-id": [ + "7d4dd613-32cc-431b-8e4c-e7b422fefe26" + ], + "x-ms-correlation-request-id": [ + "7d4dd613-32cc-431b-8e4c-e7b422fefe26" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20190821T093950Z:7d4dd613-32cc-431b-8e4c-e7b422fefe26" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 21 Aug 2019 09:39:50 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + } + ], + "Names": { + "CreateResourceGroup": [ + "res282" + ], + "FileSharesUpdateGetTest": [ + "sto423", + "share3030" + ] + }, + "Variables": { + "SubscriptionId": "ce4a7590-4722-4bcf-a2c6-e473e9f11778" + } +} \ No newline at end of file diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/tests/Tests/FileServiceTests.cs b/sdk/storage/Microsoft.Azure.Management.Storage/tests/Tests/FileServiceTests.cs new file mode 100644 index 0000000000000..3916bb9376e78 --- /dev/null +++ b/sdk/storage/Microsoft.Azure.Management.Storage/tests/Tests/FileServiceTests.cs @@ -0,0 +1,246 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using Microsoft.Azure.Management.Resources; +using Microsoft.Azure.Management.Storage; +using Microsoft.Azure.Management.Storage.Models; +using ResourceGroups.Tests; +using Storage.Tests.Helpers; +using Xunit; +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Microsoft.Rest.Azure; +using Microsoft.Azure.KeyVault; +using Microsoft.Azure.Management.KeyVault; +using Microsoft.Rest.Azure.Authentication; +using Microsoft.IdentityModel.Clients.ActiveDirectory; +using System.Threading.Tasks; +using Microsoft.Azure.Test.HttpRecorder; +using System.Net.Http; +using Microsoft.Azure.KeyVault.WebKey; + +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Auth; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Storage.Tests +{ + public class FileServiceTests + { + // create share + // delete share + [Fact] + public void FileSharesCreateDeleteListTest() + { + var handler = new RecordedDelegatingHandler { StatusCodeToReturn = HttpStatusCode.OK }; + + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var resourcesClient = StorageManagementTestUtilities.GetResourceManagementClient(context, handler); + var storageMgmtClient = StorageManagementTestUtilities.GetStorageManagementClient(context, handler); + + // Create resource group + var rgName = StorageManagementTestUtilities.CreateResourceGroup(resourcesClient); + + // Create storage account + string accountName = TestUtilities.GenerateName("sto"); + var parameters = StorageManagementTestUtilities.GetDefaultStorageAccountParameters(); + var account = storageMgmtClient.StorageAccounts.Create(rgName, accountName, parameters); + StorageManagementTestUtilities.VerifyAccountProperties(account, true); + + // implement case + try + { + string shareName = TestUtilities.GenerateName("share"); + FileShare share = storageMgmtClient.FileShares.Create(rgName, accountName, shareName); + Assert.Null(share.Metadata); + + share = storageMgmtClient.FileShares.Get(rgName, accountName, shareName); + Assert.Null(share.Metadata); + + string shareName2 = TestUtilities.GenerateName("share"); + Dictionary metaData = new Dictionary(); + metaData.Add("metadata1", "true"); + metaData.Add("metadata2", "value2"); + int shareQuota = 500; + FileShare share2 = storageMgmtClient.FileShares.Create(rgName, accountName, shareName2, metaData, shareQuota); + Assert.Equal(2, share2.Metadata.Count); + Assert.Equal(metaData, share2.Metadata); + Assert.Equal(shareQuota, share2.ShareQuota); + + share2 = storageMgmtClient.FileShares.Get(rgName, accountName, shareName2); + Assert.Equal(2, share2.Metadata.Count); + Assert.Equal(metaData, share2.Metadata); + Assert.Equal(shareQuota, share2.ShareQuota); + + //Delete share + storageMgmtClient.FileShares.Delete(rgName, accountName, shareName); + IPage fileShares = storageMgmtClient.FileShares.List(rgName, accountName); + Assert.Equal(1, fileShares.Count()); + + storageMgmtClient.FileShares.Delete(rgName, accountName, shareName2); + fileShares = storageMgmtClient.FileShares.List(rgName, accountName); + Assert.Equal(0, fileShares.Count()); + + //Delete not exist share, won't fail (return 204) + storageMgmtClient.FileShares.Delete(rgName, accountName, "notexistshare"); + } + finally + { + // clean up + storageMgmtClient.StorageAccounts.Delete(rgName, accountName); + resourcesClient.ResourceGroups.Delete(rgName); + } + } + } + + // update share + // get share properties + [Fact] + public void FileSharesUpdateGetTest() + { + var handler = new RecordedDelegatingHandler { StatusCodeToReturn = HttpStatusCode.OK }; + + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var resourcesClient = StorageManagementTestUtilities.GetResourceManagementClient(context, handler); + var storageMgmtClient = StorageManagementTestUtilities.GetStorageManagementClient(context, handler); + + // Create resource group + var rgName = StorageManagementTestUtilities.CreateResourceGroup(resourcesClient); + + // Create storage account + string accountName = TestUtilities.GenerateName("sto"); + var parameters = StorageManagementTestUtilities.GetDefaultStorageAccountParameters(); + var account = storageMgmtClient.StorageAccounts.Create(rgName, accountName, parameters); + StorageManagementTestUtilities.VerifyAccountProperties(account, true); + + // implement case + try + { + string shareName = TestUtilities.GenerateName("share"); + FileShare share = storageMgmtClient.FileShares.Create(rgName, accountName, shareName); + Assert.Null(share.Metadata); + + Dictionary metaData = new Dictionary(); + metaData.Add("metadata1", "true"); + metaData.Add("metadata2", "value2"); + int shareQuota = 501; + var shareSet = storageMgmtClient.FileShares.Update(rgName, accountName, shareName, metaData, shareQuota); + Assert.NotNull(shareSet.Metadata); + Assert.Equal(shareQuota, shareSet.ShareQuota); + Assert.Equal(metaData, shareSet.Metadata); + + var shareGet = storageMgmtClient.FileShares.Get(rgName, accountName, shareName); + Assert.NotNull(shareGet.Metadata); + Assert.Equal(metaData, shareGet.Metadata); + Assert.Equal(shareQuota, shareGet.ShareQuota); + } + finally + { + // clean up + storageMgmtClient.StorageAccounts.Delete(rgName, accountName); + resourcesClient.ResourceGroups.Delete(rgName); + } + } + } + + // Get/Set File Service Properties + [Fact] + public void FileServiceCorsTest() + { + var handler = new RecordedDelegatingHandler { StatusCodeToReturn = HttpStatusCode.OK }; + + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var resourcesClient = StorageManagementTestUtilities.GetResourceManagementClient(context, handler); + var storageMgmtClient = StorageManagementTestUtilities.GetStorageManagementClient(context, handler); + + // Create resource group + var rgName = StorageManagementTestUtilities.CreateResourceGroup(resourcesClient); + + // Create storage account + string accountName = TestUtilities.GenerateName("sto"); + var parameters = StorageManagementTestUtilities.GetDefaultStorageAccountParameters(); + var account = storageMgmtClient.StorageAccounts.Create(rgName, accountName, parameters); + StorageManagementTestUtilities.VerifyAccountProperties(account, true); + + // implement case + try + { + FileServiceProperties properties1 = storageMgmtClient.FileServices.GetServiceProperties(rgName, accountName); + Assert.Equal(0, properties1.Cors.CorsRulesProperty.Count); + + CorsRules cors = new CorsRules(); + cors.CorsRulesProperty = new List(); + cors.CorsRulesProperty.Add(new CorsRule() + { + AllowedHeaders = new string[] { "x-ms-meta-abc", "x-ms-meta-data*", "x-ms-meta-target*" }, + AllowedMethods = new string[] { "GET", "HEAD", "POST", "OPTIONS", "MERGE", "PUT" }, + AllowedOrigins = new string[] { "http://www.contoso.com", "http://www.fabrikam.com" }, + ExposedHeaders = new string[] { "x-ms-meta-*" }, + MaxAgeInSeconds = 100 + }); + cors.CorsRulesProperty.Add(new CorsRule() + { + AllowedHeaders = new string[] { "*" }, + AllowedMethods = new string[] { "GET" }, + AllowedOrigins = new string[] { "*" }, + ExposedHeaders = new string[] { "*" }, + MaxAgeInSeconds = 2 + }); + cors.CorsRulesProperty.Add(new CorsRule() + { + AllowedHeaders = new string[] { "x-ms-meta-12345675754564*" }, + AllowedMethods = new string[] { "GET", "PUT", "CONNECT" }, + AllowedOrigins = new string[] { "http://www.abc23.com", "https://www.fabrikam.com/*" }, + ExposedHeaders = new string[] { "x-ms-meta-abc", "x-ms-meta-data*", "x -ms-meta-target*" }, + MaxAgeInSeconds = 2000 + }); + + FileServiceProperties properties3 = storageMgmtClient.FileServices.SetServiceProperties(rgName, accountName, cors); + + //Validate CORS Rules + Assert.Equal(cors.CorsRulesProperty.Count, properties3.Cors.CorsRulesProperty.Count); + for (int i = 0; i < cors.CorsRulesProperty.Count; i++) + { + CorsRule putRule = cors.CorsRulesProperty[i]; + CorsRule getRule = properties3.Cors.CorsRulesProperty[i]; + + Assert.Equal(putRule.AllowedHeaders, getRule.AllowedHeaders); + Assert.Equal(putRule.AllowedMethods, getRule.AllowedMethods); + Assert.Equal(putRule.AllowedOrigins, getRule.AllowedOrigins); + Assert.Equal(putRule.ExposedHeaders, getRule.ExposedHeaders); + Assert.Equal(putRule.MaxAgeInSeconds, getRule.MaxAgeInSeconds); + } + + FileServiceProperties properties4 = storageMgmtClient.FileServices.GetServiceProperties(rgName, accountName); + + //Validate CORS Rules + Assert.Equal(cors.CorsRulesProperty.Count, properties4.Cors.CorsRulesProperty.Count); + for (int i = 0; i < cors.CorsRulesProperty.Count; i++) + { + CorsRule putRule = cors.CorsRulesProperty[i]; + CorsRule getRule = properties4.Cors.CorsRulesProperty[i]; + + Assert.Equal(putRule.AllowedHeaders, getRule.AllowedHeaders); + Assert.Equal(putRule.AllowedMethods, getRule.AllowedMethods); + Assert.Equal(putRule.AllowedOrigins, getRule.AllowedOrigins); + Assert.Equal(putRule.ExposedHeaders, getRule.ExposedHeaders); + Assert.Equal(putRule.MaxAgeInSeconds, getRule.MaxAgeInSeconds); + } + + } + finally + { + // clean up + storageMgmtClient.StorageAccounts.Delete(rgName, accountName); + resourcesClient.ResourceGroups.Delete(rgName); + } + } + } + } +}