diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/HybridConnectionsOperations.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/HybridConnectionsOperations.cs new file mode 100644 index 000000000000..d9217c50f000 --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/HybridConnectionsOperations.cs @@ -0,0 +1,2821 @@ +// 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 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay +{ + using Azure; + using Management; + using Rest; + using 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; + + /// + /// HybridConnectionsOperations operations. + /// + internal partial class HybridConnectionsOperations : IServiceOperations, IHybridConnectionsOperations + { + /// + /// Initializes a new instance of the HybridConnectionsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal HybridConnectionsOperations(RelayManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the RelayManagementClient + /// + public RelayManagementClient Client { get; private set; } + + /// + /// Lists the HybridConnection within the namespace. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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>> ListByNamespaceWithHttpMessagesAsync(string resourceGroupName, string namespaceName, 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 (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByNamespace", 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.Relay/namespaces/{namespaceName}/HybridConnections").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or Updates a service HybridConnection. This operation is + /// idempotent. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// Parameters supplied to create a HybridConnection. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string hybridConnectionName, HybridConnection parameters, 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 (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (hybridConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "hybridConnectionName"); + } + if (hybridConnectionName != null) + { + if (hybridConnectionName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "hybridConnectionName", 50); + } + if (hybridConnectionName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "hybridConnectionName", 1); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("hybridConnectionName", hybridConnectionName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{hybridConnectionName}", System.Uri.EscapeDataString(hybridConnectionName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.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 System.Net.Http.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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 a HybridConnection . + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// 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 namespaceName, string hybridConnectionName, 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 (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (hybridConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "hybridConnectionName"); + } + if (hybridConnectionName != null) + { + if (hybridConnectionName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "hybridConnectionName", 50); + } + if (hybridConnectionName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "hybridConnectionName", 1); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("hybridConnectionName", hybridConnectionName); + 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.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{hybridConnectionName}", System.Uri.EscapeDataString(hybridConnectionName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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; + } + + /// + /// Returns the description for the specified HybridConnection. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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 namespaceName, string hybridConnectionName, 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 (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (hybridConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "hybridConnectionName"); + } + if (hybridConnectionName != null) + { + if (hybridConnectionName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "hybridConnectionName", 50); + } + if (hybridConnectionName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "hybridConnectionName", 1); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("hybridConnectionName", hybridConnectionName); + 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.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{hybridConnectionName}", System.Uri.EscapeDataString(hybridConnectionName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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; + } + + /// + /// Authorization rules for a HybridConnection. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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>> ListAuthorizationRulesWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string hybridConnectionName, 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 (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (hybridConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "hybridConnectionName"); + } + if (hybridConnectionName != null) + { + if (hybridConnectionName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "hybridConnectionName", 50); + } + if (hybridConnectionName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "hybridConnectionName", 1); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("hybridConnectionName", hybridConnectionName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListAuthorizationRules", 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.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{hybridConnectionName}", System.Uri.EscapeDataString(hybridConnectionName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or Updates an authorization rule for a HybridConnection + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// The authorizationRule name. + /// + /// + /// The authorization rule parameters + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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> CreateOrUpdateAuthorizationRuleWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string hybridConnectionName, string authorizationRuleName, AuthorizationRule parameters, 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 (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (hybridConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "hybridConnectionName"); + } + if (hybridConnectionName != null) + { + if (hybridConnectionName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "hybridConnectionName", 50); + } + if (hybridConnectionName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "hybridConnectionName", 1); + } + } + if (authorizationRuleName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "authorizationRuleName"); + } + if (authorizationRuleName != null) + { + if (authorizationRuleName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "authorizationRuleName", 50); + } + if (authorizationRuleName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "authorizationRuleName", 1); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("hybridConnectionName", hybridConnectionName); + tracingParameters.Add("authorizationRuleName", authorizationRuleName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateAuthorizationRule", 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.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{hybridConnectionName}", System.Uri.EscapeDataString(hybridConnectionName)); + _url = _url.Replace("{authorizationRuleName}", System.Uri.EscapeDataString(authorizationRuleName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.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 System.Net.Http.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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 a HybridConnection authorization rule + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// The authorizationRule name. + /// + /// + /// 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 DeleteAuthorizationRuleWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string hybridConnectionName, string authorizationRuleName, 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 (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (hybridConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "hybridConnectionName"); + } + if (hybridConnectionName != null) + { + if (hybridConnectionName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "hybridConnectionName", 50); + } + if (hybridConnectionName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "hybridConnectionName", 1); + } + } + if (authorizationRuleName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "authorizationRuleName"); + } + if (authorizationRuleName != null) + { + if (authorizationRuleName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "authorizationRuleName", 50); + } + if (authorizationRuleName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "authorizationRuleName", 1); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("hybridConnectionName", hybridConnectionName); + tracingParameters.Add("authorizationRuleName", authorizationRuleName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteAuthorizationRule", 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.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{hybridConnectionName}", System.Uri.EscapeDataString(hybridConnectionName)); + _url = _url.Replace("{authorizationRuleName}", System.Uri.EscapeDataString(authorizationRuleName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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; + } + + /// + /// HybridConnection authorizationRule for a HybridConnection by name. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// The authorizationRule name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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> GetAuthorizationRuleWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string hybridConnectionName, string authorizationRuleName, 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 (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (hybridConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "hybridConnectionName"); + } + if (hybridConnectionName != null) + { + if (hybridConnectionName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "hybridConnectionName", 50); + } + if (hybridConnectionName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "hybridConnectionName", 1); + } + } + if (authorizationRuleName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "authorizationRuleName"); + } + if (authorizationRuleName != null) + { + if (authorizationRuleName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "authorizationRuleName", 50); + } + if (authorizationRuleName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "authorizationRuleName", 1); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("hybridConnectionName", hybridConnectionName); + tracingParameters.Add("authorizationRuleName", authorizationRuleName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAuthorizationRule", 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.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{hybridConnectionName}", System.Uri.EscapeDataString(hybridConnectionName)); + _url = _url.Replace("{authorizationRuleName}", System.Uri.EscapeDataString(authorizationRuleName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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; + } + + /// + /// Primary and Secondary ConnectionStrings to the HybridConnection. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// The authorizationRule name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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> ListKeysWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string hybridConnectionName, string authorizationRuleName, 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 (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (hybridConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "hybridConnectionName"); + } + if (hybridConnectionName != null) + { + if (hybridConnectionName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "hybridConnectionName", 50); + } + if (hybridConnectionName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "hybridConnectionName", 1); + } + } + if (authorizationRuleName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "authorizationRuleName"); + } + if (authorizationRuleName != null) + { + if (authorizationRuleName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "authorizationRuleName", 50); + } + if (authorizationRuleName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "authorizationRuleName", 1); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("hybridConnectionName", hybridConnectionName); + tracingParameters.Add("authorizationRuleName", authorizationRuleName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListKeys", 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.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}/ListKeys").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{hybridConnectionName}", System.Uri.EscapeDataString(hybridConnectionName)); + _url = _url.Replace("{authorizationRuleName}", System.Uri.EscapeDataString(authorizationRuleName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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; + } + + /// + /// Regenerates the Primary or Secondary ConnectionStrings to the + /// HybridConnection + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// The authorizationRule name. + /// + /// + /// Parameters supplied to regenerate Auth Rule. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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> RegenerateKeysWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string hybridConnectionName, string authorizationRuleName, RegenerateKeysParameters parameters, 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 (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (hybridConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "hybridConnectionName"); + } + if (hybridConnectionName != null) + { + if (hybridConnectionName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "hybridConnectionName", 50); + } + if (hybridConnectionName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "hybridConnectionName", 1); + } + } + if (authorizationRuleName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "authorizationRuleName"); + } + if (authorizationRuleName != null) + { + if (authorizationRuleName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "authorizationRuleName", 50); + } + if (authorizationRuleName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "authorizationRuleName", 1); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("hybridConnectionName", hybridConnectionName); + tracingParameters.Add("authorizationRuleName", authorizationRuleName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "RegenerateKeys", 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.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}/regenerateKeys").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{hybridConnectionName}", System.Uri.EscapeDataString(hybridConnectionName)); + _url = _url.Replace("{authorizationRuleName}", System.Uri.EscapeDataString(authorizationRuleName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists the HybridConnection within the namespace. + /// + /// + /// 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>> ListByNamespaceNextWithHttpMessagesAsync(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, "ListByNamespaceNext", 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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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; + } + + /// + /// Authorization rules for a HybridConnection. + /// + /// + /// 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>> ListAuthorizationRulesNextWithHttpMessagesAsync(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, "ListAuthorizationRulesNext", 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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/HybridConnectionsOperationsExtensions.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/HybridConnectionsOperationsExtensions.cs new file mode 100644 index 000000000000..9e2f65992eb8 --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/HybridConnectionsOperationsExtensions.cs @@ -0,0 +1,594 @@ +// 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 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay +{ + using Azure; + using Management; + using Rest; + using Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for HybridConnectionsOperations. + /// + public static partial class HybridConnectionsOperationsExtensions + { + /// + /// Lists the HybridConnection within the namespace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + public static IPage ListByNamespace(this IHybridConnectionsOperations operations, string resourceGroupName, string namespaceName) + { + return operations.ListByNamespaceAsync(resourceGroupName, namespaceName).GetAwaiter().GetResult(); + } + + /// + /// Lists the HybridConnection within the namespace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The cancellation token. + /// + public static async Task> ListByNamespaceAsync(this IHybridConnectionsOperations operations, string resourceGroupName, string namespaceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByNamespaceWithHttpMessagesAsync(resourceGroupName, namespaceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or Updates a service HybridConnection. This operation is + /// idempotent. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// Parameters supplied to create a HybridConnection. + /// + public static HybridConnection CreateOrUpdate(this IHybridConnectionsOperations operations, string resourceGroupName, string namespaceName, string hybridConnectionName, HybridConnection parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, namespaceName, hybridConnectionName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or Updates a service HybridConnection. This operation is + /// idempotent. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// Parameters supplied to create a HybridConnection. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IHybridConnectionsOperations operations, string resourceGroupName, string namespaceName, string hybridConnectionName, HybridConnection parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, namespaceName, hybridConnectionName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a HybridConnection . + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + public static void Delete(this IHybridConnectionsOperations operations, string resourceGroupName, string namespaceName, string hybridConnectionName) + { + operations.DeleteAsync(resourceGroupName, namespaceName, hybridConnectionName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a HybridConnection . + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IHybridConnectionsOperations operations, string resourceGroupName, string namespaceName, string hybridConnectionName, CancellationToken cancellationToken = default(CancellationToken)) + { + await operations.DeleteWithHttpMessagesAsync(resourceGroupName, namespaceName, hybridConnectionName, null, cancellationToken).ConfigureAwait(false); + } + + /// + /// Returns the description for the specified HybridConnection. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + public static HybridConnection Get(this IHybridConnectionsOperations operations, string resourceGroupName, string namespaceName, string hybridConnectionName) + { + return operations.GetAsync(resourceGroupName, namespaceName, hybridConnectionName).GetAwaiter().GetResult(); + } + + /// + /// Returns the description for the specified HybridConnection. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IHybridConnectionsOperations operations, string resourceGroupName, string namespaceName, string hybridConnectionName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, namespaceName, hybridConnectionName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Authorization rules for a HybridConnection. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + public static IPage ListAuthorizationRules(this IHybridConnectionsOperations operations, string resourceGroupName, string namespaceName, string hybridConnectionName) + { + return operations.ListAuthorizationRulesAsync(resourceGroupName, namespaceName, hybridConnectionName).GetAwaiter().GetResult(); + } + + /// + /// Authorization rules for a HybridConnection. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAuthorizationRulesAsync(this IHybridConnectionsOperations operations, string resourceGroupName, string namespaceName, string hybridConnectionName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListAuthorizationRulesWithHttpMessagesAsync(resourceGroupName, namespaceName, hybridConnectionName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or Updates an authorization rule for a HybridConnection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// The authorizationRule name. + /// + /// + /// The authorization rule parameters + /// + public static AuthorizationRule CreateOrUpdateAuthorizationRule(this IHybridConnectionsOperations operations, string resourceGroupName, string namespaceName, string hybridConnectionName, string authorizationRuleName, AuthorizationRule parameters) + { + return operations.CreateOrUpdateAuthorizationRuleAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or Updates an authorization rule for a HybridConnection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// The authorizationRule name. + /// + /// + /// The authorization rule parameters + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAuthorizationRuleAsync(this IHybridConnectionsOperations operations, string resourceGroupName, string namespaceName, string hybridConnectionName, string authorizationRuleName, AuthorizationRule parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateAuthorizationRuleWithHttpMessagesAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a HybridConnection authorization rule + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// The authorizationRule name. + /// + public static void DeleteAuthorizationRule(this IHybridConnectionsOperations operations, string resourceGroupName, string namespaceName, string hybridConnectionName, string authorizationRuleName) + { + operations.DeleteAuthorizationRuleAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a HybridConnection authorization rule + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// The authorizationRule name. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAuthorizationRuleAsync(this IHybridConnectionsOperations operations, string resourceGroupName, string namespaceName, string hybridConnectionName, string authorizationRuleName, CancellationToken cancellationToken = default(CancellationToken)) + { + await operations.DeleteAuthorizationRuleWithHttpMessagesAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName, null, cancellationToken).ConfigureAwait(false); + } + + /// + /// HybridConnection authorizationRule for a HybridConnection by name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// The authorizationRule name. + /// + public static AuthorizationRule GetAuthorizationRule(this IHybridConnectionsOperations operations, string resourceGroupName, string namespaceName, string hybridConnectionName, string authorizationRuleName) + { + return operations.GetAuthorizationRuleAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName).GetAwaiter().GetResult(); + } + + /// + /// HybridConnection authorizationRule for a HybridConnection by name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// The authorizationRule name. + /// + /// + /// The cancellation token. + /// + public static async Task GetAuthorizationRuleAsync(this IHybridConnectionsOperations operations, string resourceGroupName, string namespaceName, string hybridConnectionName, string authorizationRuleName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAuthorizationRuleWithHttpMessagesAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Primary and Secondary ConnectionStrings to the HybridConnection. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// The authorizationRule name. + /// + public static AuthorizationRuleKeys ListKeys(this IHybridConnectionsOperations operations, string resourceGroupName, string namespaceName, string hybridConnectionName, string authorizationRuleName) + { + return operations.ListKeysAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName).GetAwaiter().GetResult(); + } + + /// + /// Primary and Secondary ConnectionStrings to the HybridConnection. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// The authorizationRule name. + /// + /// + /// The cancellation token. + /// + public static async Task ListKeysAsync(this IHybridConnectionsOperations operations, string resourceGroupName, string namespaceName, string hybridConnectionName, string authorizationRuleName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListKeysWithHttpMessagesAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Regenerates the Primary or Secondary ConnectionStrings to the + /// HybridConnection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// The authorizationRule name. + /// + /// + /// Parameters supplied to regenerate Auth Rule. + /// + public static AuthorizationRuleKeys RegenerateKeys(this IHybridConnectionsOperations operations, string resourceGroupName, string namespaceName, string hybridConnectionName, string authorizationRuleName, RegenerateKeysParameters parameters) + { + return operations.RegenerateKeysAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Regenerates the Primary or Secondary ConnectionStrings to the + /// HybridConnection + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// The authorizationRule name. + /// + /// + /// Parameters supplied to regenerate Auth Rule. + /// + /// + /// The cancellation token. + /// + public static async Task RegenerateKeysAsync(this IHybridConnectionsOperations operations, string resourceGroupName, string namespaceName, string hybridConnectionName, string authorizationRuleName, RegenerateKeysParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.RegenerateKeysWithHttpMessagesAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists the HybridConnection within the namespace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByNamespaceNext(this IHybridConnectionsOperations operations, string nextPageLink) + { + return operations.ListByNamespaceNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists the HybridConnection within the namespace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByNamespaceNextAsync(this IHybridConnectionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByNamespaceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Authorization rules for a HybridConnection. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListAuthorizationRulesNext(this IHybridConnectionsOperations operations, string nextPageLink) + { + return operations.ListAuthorizationRulesNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Authorization rules for a HybridConnection. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAuthorizationRulesNextAsync(this IHybridConnectionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListAuthorizationRulesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/IHybridConnectionsOperations.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/IHybridConnectionsOperations.cs new file mode 100644 index 000000000000..a767eeb419c1 --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/IHybridConnectionsOperations.cs @@ -0,0 +1,369 @@ +// 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 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay +{ + using Azure; + using Management; + using Rest; + using Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// HybridConnectionsOperations operations. + /// + public partial interface IHybridConnectionsOperations + { + /// + /// Lists the HybridConnection within the namespace. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// 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>> ListByNamespaceWithHttpMessagesAsync(string resourceGroupName, string namespaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or Updates a service HybridConnection. This operation is + /// idempotent. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// Parameters supplied to create a HybridConnection. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string hybridConnectionName, HybridConnection parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a HybridConnection . + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// 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 namespaceName, string hybridConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Returns the description for the specified HybridConnection. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// 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 namespaceName, string hybridConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Authorization rules for a HybridConnection. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// 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>> ListAuthorizationRulesWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string hybridConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or Updates an authorization rule for a HybridConnection + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// The authorizationRule name. + /// + /// + /// The authorization rule parameters + /// + /// + /// 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> CreateOrUpdateAuthorizationRuleWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string hybridConnectionName, string authorizationRuleName, AuthorizationRule parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a HybridConnection authorization rule + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// The authorizationRule name. + /// + /// + /// 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 DeleteAuthorizationRuleWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string hybridConnectionName, string authorizationRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// HybridConnection authorizationRule for a HybridConnection by name. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// The authorizationRule name. + /// + /// + /// 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> GetAuthorizationRuleWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string hybridConnectionName, string authorizationRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Primary and Secondary ConnectionStrings to the HybridConnection. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// The authorizationRule name. + /// + /// + /// 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> ListKeysWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string hybridConnectionName, string authorizationRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Regenerates the Primary or Secondary ConnectionStrings to the + /// HybridConnection + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The hybrid connection name. + /// + /// + /// The authorizationRule name. + /// + /// + /// Parameters supplied to regenerate Auth Rule. + /// + /// + /// 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> RegenerateKeysWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string hybridConnectionName, string authorizationRuleName, RegenerateKeysParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists the HybridConnection within the namespace. + /// + /// + /// 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>> ListByNamespaceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Authorization rules for a HybridConnection. + /// + /// + /// 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>> ListAuthorizationRulesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/INamespacesOperations.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/INamespacesOperations.cs new file mode 100644 index 000000000000..395961fbafc1 --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/INamespacesOperations.cs @@ -0,0 +1,484 @@ +// 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 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay +{ + using Azure; + using Management; + using Rest; + using Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// NamespacesOperations operations. + /// + public partial interface INamespacesOperations + { + /// + /// Check the give namespace name availability. + /// + /// + /// Parameters to check availability of the given namespace name + /// + /// + /// 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> CheckNameAvailabilityMethodWithHttpMessagesAsync(CheckNameAvailability parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists all the available namespaces within the subscription + /// irrespective of the resourceGroups. + /// + /// + /// 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(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists all the available namespaces within the ResourceGroup. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// 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>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Create Azure Relay namespace. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// Parameters supplied to create a Namespace Resource. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string namespaceName, RelayNamespace parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes an existing namespace. This operation also removes all + /// associated resources under the namespace. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// 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 namespaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Returns the description for the specified namespace. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// 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 namespaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a namespace. Once created, this namespace's + /// resource manifest is immutable. This operation is idempotent. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// Parameters for updating a namespace resource. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string namespaceName, RelayNamespaceUpdateParameter parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Authorization rules for a namespace. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// 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>> ListAuthorizationRulesWithHttpMessagesAsync(string resourceGroupName, string namespaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or Updates an authorization rule for a namespace + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The authorizationRule name. + /// + /// + /// The authorization rule parameters + /// + /// + /// 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> CreateOrUpdateAuthorizationRuleWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string authorizationRuleName, AuthorizationRule parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a namespace authorization rule + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The authorizationRule name. + /// + /// + /// 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 DeleteAuthorizationRuleWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string authorizationRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Authorization rule for a namespace by name. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The authorizationRule name. + /// + /// + /// 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> GetAuthorizationRuleWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string authorizationRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Primary and Secondary ConnectionStrings to the namespace + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The authorizationRule name. + /// + /// + /// 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> ListKeysWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string authorizationRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Regenerates the Primary or Secondary ConnectionStrings to the + /// namespace + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The authorizationRule name. + /// + /// + /// Parameters supplied to regenerate Auth Rule. + /// + /// + /// 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> RegenerateKeysWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string authorizationRuleName, RegenerateKeysParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Create Azure Relay namespace. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// Parameters supplied to create a Namespace Resource. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string namespaceName, RelayNamespace parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes an existing namespace. This operation also removes all + /// associated resources under the namespace. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string namespaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists all the available namespaces within the subscription + /// irrespective of the resourceGroups. + /// + /// + /// 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)); + /// + /// Lists all the available namespaces within the ResourceGroup. + /// + /// + /// 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>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Authorization rules for a namespace. + /// + /// + /// 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>> ListAuthorizationRulesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/IOperations.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/IOperations.cs new file mode 100644 index 000000000000..869511362f68 --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/IOperations.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay +{ + using Azure; + using Management; + using Rest; + using Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Operations operations. + /// + public partial interface IOperations + { + /// + /// Lists all of the available Relay REST API operations. + /// + /// + /// 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(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists all of the available Relay REST API operations. + /// + /// + /// 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/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/IRelayManagementClient.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/IRelayManagementClient.cs new file mode 100644 index 000000000000..aa9f642dd609 --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/IRelayManagementClient.cs @@ -0,0 +1,96 @@ +// 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 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay +{ + using Azure; + using Management; + using Rest; + using Rest.Azure; + using Models; + using Newtonsoft.Json; + + /// + /// Use these API to manage Azure Relay resources through Azure Resources + /// Manager. + /// + public partial interface IRelayManagementClient : System.IDisposable + { + /// + /// The base URI of the service. + /// + System.Uri BaseUri { get; set; } + + /// + /// Gets or sets json serialization settings. + /// + JsonSerializerSettings SerializationSettings { get; } + + /// + /// Gets or sets json deserialization settings. + /// + JsonSerializerSettings DeserializationSettings { get; } + + /// + /// Credentials needed for the client to connect to Azure. + /// + ServiceClientCredentials Credentials { get; } + + /// + /// Subscription credentials which uniquely identify Microsoft Azure + /// subscription. The subscription ID forms part of the URI for every + /// service call. + /// + string SubscriptionId { get; set; } + + /// + /// Client Api Version. + /// + string ApiVersion { get; } + + /// + /// Gets or sets the preferred language for the response. + /// + string AcceptLanguage { get; set; } + + /// + /// Gets or sets the retry timeout in seconds for Long Running + /// Operations. Default value is 30. + /// + int? LongRunningOperationRetryTimeout { get; set; } + + /// + /// When set to true a unique x-ms-client-request-id value is generated + /// and included in each request. Default is true. + /// + bool? GenerateClientRequestId { get; set; } + + + /// + /// Gets the IOperations. + /// + IOperations Operations { get; } + + /// + /// Gets the INamespacesOperations. + /// + INamespacesOperations Namespaces { get; } + + /// + /// Gets the IHybridConnectionsOperations. + /// + IHybridConnectionsOperations HybridConnections { get; } + + /// + /// Gets the IWCFRelaysOperations. + /// + IWCFRelaysOperations WCFRelays { get; } + + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/IWCFRelaysOperations.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/IWCFRelaysOperations.cs new file mode 100644 index 000000000000..c1ebbea09567 --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/IWCFRelaysOperations.cs @@ -0,0 +1,368 @@ +// 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 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay +{ + using Azure; + using Management; + using Rest; + using Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// WCFRelaysOperations operations. + /// + public partial interface IWCFRelaysOperations + { + /// + /// Lists the WCFRelays within the namespace. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// 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>> ListByNamespaceWithHttpMessagesAsync(string resourceGroupName, string namespaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or Updates a WCFRelay. This operation is idempotent. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// Parameters supplied to create a WCFRelays. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string relayName, WcfRelay parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a WCFRelays . + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// 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 namespaceName, string relayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Returns the description for the specified WCFRelays. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// 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 namespaceName, string relayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Authorization rules for a WCFRelays. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// 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>> ListAuthorizationRulesWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string relayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or Updates an authorization rule for a WCFRelays + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// The authorizationRule name. + /// + /// + /// The authorization rule parameters. + /// + /// + /// 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> CreateOrUpdateAuthorizationRuleWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string relayName, string authorizationRuleName, AuthorizationRule parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a WCFRelays authorization rule + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// The authorizationRule name. + /// + /// + /// 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 DeleteAuthorizationRuleWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string relayName, string authorizationRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get authorizationRule for a WCFRelays by name. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// The authorizationRule name. + /// + /// + /// 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> GetAuthorizationRuleWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string relayName, string authorizationRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Primary and Secondary ConnectionStrings to the WCFRelays. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// The authorizationRule name. + /// + /// + /// 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> ListKeysWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string relayName, string authorizationRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Regenerates the Primary or Secondary ConnectionStrings to the + /// WCFRelays + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// The authorizationRule name. + /// + /// + /// Parameters supplied to regenerate Auth Rule. + /// + /// + /// 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> RegenerateKeysWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string relayName, string authorizationRuleName, RegenerateKeysParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists the WCFRelays within the namespace. + /// + /// + /// 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>> ListByNamespaceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Authorization rules for a WCFRelays. + /// + /// + /// 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>> ListAuthorizationRulesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/AccessRights.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/AccessRights.cs new file mode 100644 index 000000000000..6e8a415fbbde --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/AccessRights.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay.Models +{ + using Azure; + using Management; + using Relay; + + /// + /// Defines values for AccessRights. + /// + public static class AccessRights + { + public const string Manage = "Manage"; + public const string Send = "Send"; + public const string Listen = "Listen"; + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/AuthorizationRule.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/AuthorizationRule.cs new file mode 100644 index 000000000000..328527998235 --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/AuthorizationRule.cs @@ -0,0 +1,73 @@ +// 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 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay.Models +{ + using Azure; + using Management; + using Relay; + using Rest; + using Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Description of a Namespace AuthorizationRules. + /// + [JsonTransformation] + public partial class AuthorizationRule : Resource + { + /// + /// Initializes a new instance of the AuthorizationRule class. + /// + public AuthorizationRule() { } + + /// + /// Initializes a new instance of the AuthorizationRule class. + /// + /// The rights associated with the rule. + /// Resource Id + /// Resource name + /// Resource type + public AuthorizationRule(IList rights, string id = default(string), string name = default(string), string type = default(string)) + : base(id, name, type) + { + Rights = rights; + } + + /// + /// Gets or sets the rights associated with the rule. + /// + [JsonProperty(PropertyName = "properties.rights")] + public IList Rights { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Rights == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Rights"); + } + if (Rights != null) + { + if (Rights.Count != Rights.Distinct().Count()) + { + throw new ValidationException(ValidationRules.UniqueItems, "Rights"); + } + } + } + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/AuthorizationRuleKeys.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/AuthorizationRuleKeys.cs new file mode 100644 index 000000000000..5f32967b21c8 --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/AuthorizationRuleKeys.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay.Models +{ + using Azure; + using Management; + using Relay; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Namespace/Relay Connection String + /// + public partial class AuthorizationRuleKeys + { + /// + /// Initializes a new instance of the AuthorizationRuleKeys class. + /// + public AuthorizationRuleKeys() { } + + /// + /// Initializes a new instance of the AuthorizationRuleKeys class. + /// + /// PrimaryConnectionString of + /// the created Namespace AuthorizationRule. + /// SecondaryConnectionString + /// of the created Namespace AuthorizationRule + /// A base64-encoded 256-bit primary key for + /// signing and validating the SAS token + /// A base64-encoded 256-bit secondary key + /// for signing and validating the SAS token + /// A string that describes the authorization + /// rule + public AuthorizationRuleKeys(string primaryConnectionString = default(string), string secondaryConnectionString = default(string), string primaryKey = default(string), string secondaryKey = default(string), string keyName = default(string)) + { + PrimaryConnectionString = primaryConnectionString; + SecondaryConnectionString = secondaryConnectionString; + PrimaryKey = primaryKey; + SecondaryKey = secondaryKey; + KeyName = keyName; + } + + /// + /// Gets or sets primaryConnectionString of the created Namespace + /// AuthorizationRule. + /// + [JsonProperty(PropertyName = "primaryConnectionString")] + public string PrimaryConnectionString { get; set; } + + /// + /// Gets or sets secondaryConnectionString of the created Namespace + /// AuthorizationRule + /// + [JsonProperty(PropertyName = "secondaryConnectionString")] + public string SecondaryConnectionString { get; set; } + + /// + /// Gets or sets a base64-encoded 256-bit primary key for signing and + /// validating the SAS token + /// + [JsonProperty(PropertyName = "primaryKey")] + public string PrimaryKey { get; set; } + + /// + /// Gets or sets a base64-encoded 256-bit secondary key for signing and + /// validating the SAS token + /// + [JsonProperty(PropertyName = "secondaryKey")] + public string SecondaryKey { get; set; } + + /// + /// Gets or sets a string that describes the authorization rule + /// + [JsonProperty(PropertyName = "keyName")] + public string KeyName { get; set; } + + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/CheckNameAvailability.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/CheckNameAvailability.cs new file mode 100644 index 000000000000..3df0f7dc1272 --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/CheckNameAvailability.cs @@ -0,0 +1,64 @@ +// 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 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay.Models +{ + using Azure; + using Management; + using Relay; + using Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Description of a Check Name availability request properties. + /// + public partial class CheckNameAvailability + { + /// + /// Initializes a new instance of the CheckNameAvailability class. + /// + public CheckNameAvailability() { } + + /// + /// Initializes a new instance of the CheckNameAvailability class. + /// + /// The Name to check the namespce name availability + /// and The namespace name can contain only letters, numbers, and + /// hyphens. The namespace must start with a letter, and it must end + /// with a letter or number. + public CheckNameAvailability(string name) + { + Name = name; + } + + /// + /// Gets or sets the Name to check the namespce name availability and + /// The namespace name can contain only letters, numbers, and hyphens. + /// The namespace must start with a letter, and it must end with a + /// letter or number. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + } + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/CheckNameAvailabilityResult.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/CheckNameAvailabilityResult.cs new file mode 100644 index 000000000000..8ec64b3da192 --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/CheckNameAvailabilityResult.cs @@ -0,0 +1,73 @@ +// 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 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay.Models +{ + using Azure; + using Management; + using Relay; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Description of a Check Name availability request properties. + /// + public partial class CheckNameAvailabilityResult + { + /// + /// Initializes a new instance of the CheckNameAvailabilityResult + /// class. + /// + public CheckNameAvailabilityResult() { } + + /// + /// Initializes a new instance of the CheckNameAvailabilityResult + /// class. + /// + /// Value indicating namespace is + /// availability, true if the namespace is available; otherwise, + /// false. + /// The reason for unavailability of a namespace. + /// Possible values include: 'None', 'InvalidName', + /// 'SubscriptionIsDisabled', 'NameInUse', 'NameInLockdown', + /// 'TooManyNamespaceInCurrentSubscription' + /// The detailed info regarding the reason + /// associated with the namespace. + public CheckNameAvailabilityResult(bool? nameAvailable = default(bool?), UnavailableReason? reason = default(UnavailableReason?), string message = default(string)) + { + NameAvailable = nameAvailable; + Reason = reason; + Message = message; + } + + /// + /// Gets or sets value indicating namespace is availability, true if + /// the namespace is available; otherwise, false. + /// + [JsonProperty(PropertyName = "nameAvailable")] + public bool? NameAvailable { get; set; } + + /// + /// Gets or sets the reason for unavailability of a namespace. Possible + /// values include: 'None', 'InvalidName', 'SubscriptionIsDisabled', + /// 'NameInUse', 'NameInLockdown', + /// 'TooManyNamespaceInCurrentSubscription' + /// + [JsonProperty(PropertyName = "reason")] + public UnavailableReason? Reason { get; set; } + + /// + /// Gets the detailed info regarding the reason associated with the + /// namespace. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; protected set; } + + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/ErrorResponse.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/ErrorResponse.cs new file mode 100644 index 000000000000..9678754d4844 --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/ErrorResponse.cs @@ -0,0 +1,54 @@ +// 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 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay.Models +{ + using Azure; + using Management; + using Relay; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Error reponse indicates Relay service is not able to process the + /// incoming request. The reason is provided in the error message. + /// + public partial class ErrorResponse + { + /// + /// Initializes a new instance of the ErrorResponse class. + /// + public ErrorResponse() { } + + /// + /// Initializes a new instance of the ErrorResponse class. + /// + /// Error code. + /// Error message indicating why the operation + /// failed. + public ErrorResponse(string code = default(string), string message = default(string)) + { + Code = code; + Message = message; + } + + /// + /// Gets or sets error code. + /// + [JsonProperty(PropertyName = "code")] + public string Code { get; set; } + + /// + /// Gets or sets error message indicating why the operation failed. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/ErrorResponseException.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/ErrorResponseException.cs new file mode 100644 index 000000000000..de537298069d --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/ErrorResponseException.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 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay.Models +{ + using Azure; + using Management; + using Relay; + using Rest; + using System.Runtime; + using System.Runtime.Serialization; + using System.Security; + + /// + /// Exception thrown for an invalid response with ErrorResponse + /// information. + /// +#if !PORTABLE + [System.Serializable] +#endif + public class ErrorResponseException : RestException + { + /// + /// Gets information about the associated HTTP request. + /// + public HttpRequestMessageWrapper Request { get; set; } + + /// + /// Gets information about the associated HTTP response. + /// + public HttpResponseMessageWrapper Response { get; set; } + + /// + /// Gets or sets the body object. + /// + public ErrorResponse Body { get; set; } + + /// + /// Initializes a new instance of the ErrorResponseException class. + /// + public ErrorResponseException() + { + } + + /// + /// Initializes a new instance of the ErrorResponseException class. + /// + /// The exception message. + public ErrorResponseException(string message) + : this(message, null) + { + } + + /// + /// Initializes a new instance of the ErrorResponseException class. + /// + /// The exception message. + /// Inner exception. + public ErrorResponseException(string message, System.Exception innerException) + : base(message, innerException) + { + } + +#if !PORTABLE + /// + /// Initializes a new instance of the ErrorResponseException class. + /// + /// Serialization info. + /// Streaming context. + protected ErrorResponseException(SerializationInfo info, StreamingContext context) + : base(info, context) + { + } + + /// + /// Serializes content of the exception. + /// + /// Serialization info. + /// Streaming context. + /// + /// Thrown when a required parameter is null + /// + [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, SerializationFormatter = true)] + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { + base.GetObjectData(info, context); + if (info == null) + { + throw new System.ArgumentNullException("info"); + } + + info.AddValue("Request", Request); + info.AddValue("Response", Response); + info.AddValue("Body", Body); + } +#endif + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/HybridConnection.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/HybridConnection.cs new file mode 100644 index 000000000000..c4bbc5851555 --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/HybridConnection.cs @@ -0,0 +1,113 @@ +// 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 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay.Models +{ + using Azure; + using Management; + using Relay; + using Rest; + using Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Description of HybridConnection Resource. + /// + [JsonTransformation] + public partial class HybridConnection : Resource + { + /// + /// Initializes a new instance of the HybridConnection class. + /// + public HybridConnection() { } + + /// + /// Initializes a new instance of the HybridConnection class. + /// + /// Resource Id + /// Resource name + /// Resource type + /// The time the HybridConnection was + /// created. + /// The time the namespace was updated. + /// The number of listeners for this + /// HybridConnection. min : 1 and max:25 supported + /// true if client + /// authorization is needed for this HybridConnection; otherwise, + /// false. + /// usermetadata is a placeholder to store + /// user-defined string data for the HybridConnection endpoint.e.g. it + /// can be used to store descriptive data, such as list of teams and + /// their contact information also user-defined configuration settings + /// can be stored. + public HybridConnection(string id = default(string), string name = default(string), string type = default(string), System.DateTime? createdAt = default(System.DateTime?), System.DateTime? updatedAt = default(System.DateTime?), int? listenerCount = default(int?), bool? requiresClientAuthorization = default(bool?), string userMetadata = default(string)) + : base(id, name, type) + { + CreatedAt = createdAt; + UpdatedAt = updatedAt; + ListenerCount = listenerCount; + RequiresClientAuthorization = requiresClientAuthorization; + UserMetadata = userMetadata; + } + + /// + /// Gets the time the HybridConnection was created. + /// + [JsonProperty(PropertyName = "properties.createdAt")] + public System.DateTime? CreatedAt { get; protected set; } + + /// + /// Gets the time the namespace was updated. + /// + [JsonProperty(PropertyName = "properties.updatedAt")] + public System.DateTime? UpdatedAt { get; protected set; } + + /// + /// Gets the number of listeners for this HybridConnection. min : 1 and + /// max:25 supported + /// + [JsonProperty(PropertyName = "properties.listenerCount")] + public int? ListenerCount { get; protected set; } + + /// + /// Gets or sets true if client authorization is needed for this + /// HybridConnection; otherwise, false. + /// + [JsonProperty(PropertyName = "properties.requiresClientAuthorization")] + public bool? RequiresClientAuthorization { get; set; } + + /// + /// Gets or sets usermetadata is a placeholder to store user-defined + /// string data for the HybridConnection endpoint.e.g. it can be used + /// to store descriptive data, such as list of teams and their contact + /// information also user-defined configuration settings can be stored. + /// + [JsonProperty(PropertyName = "properties.userMetadata")] + public string UserMetadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ListenerCount > 25) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "ListenerCount", 25); + } + if (ListenerCount < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "ListenerCount", 1); + } + } + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/Operation.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/Operation.cs new file mode 100644 index 000000000000..3bf423501500 --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/Operation.cs @@ -0,0 +1,54 @@ +// 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 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay.Models +{ + using Azure; + using Management; + using Relay; + using Newtonsoft.Json; + using System.Linq; + + /// + /// A EventHub REST API operation + /// + public partial class Operation + { + /// + /// Initializes a new instance of the Operation class. + /// + public Operation() { } + + /// + /// Initializes a new instance of the Operation class. + /// + /// Operation name: + /// {provider}/{resource}/{operation} + /// The object that represents the + /// operation. + public Operation(string name = default(string), OperationDisplay display = default(OperationDisplay)) + { + Name = name; + Display = display; + } + + /// + /// Gets operation name: {provider}/{resource}/{operation} + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; protected set; } + + /// + /// Gets or sets the object that represents the operation. + /// + [JsonProperty(PropertyName = "display")] + public OperationDisplay Display { get; set; } + + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/OperationDisplay.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/OperationDisplay.cs new file mode 100644 index 000000000000..7ad5fda37c47 --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/OperationDisplay.cs @@ -0,0 +1,62 @@ +// 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 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay.Models +{ + using Azure; + using Management; + using Relay; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The object that represents the operation. + /// + public partial class OperationDisplay + { + /// + /// Initializes a new instance of the OperationDisplay class. + /// + public OperationDisplay() { } + + /// + /// Initializes a new instance of the OperationDisplay class. + /// + /// Service provider: Microsoft.EventHub + /// Resource on which the operation is + /// performed: Invoice, etc. + /// Operation type: Read, write, delete, + /// etc. + public OperationDisplay(string provider = default(string), string resource = default(string), string operation = default(string)) + { + Provider = provider; + Resource = resource; + Operation = operation; + } + + /// + /// Gets service provider: Microsoft.EventHub + /// + [JsonProperty(PropertyName = "provider")] + public string Provider { get; protected set; } + + /// + /// Gets resource on which the operation is performed: Invoice, etc. + /// + [JsonProperty(PropertyName = "resource")] + public string Resource { get; protected set; } + + /// + /// Gets operation type: Read, write, delete, etc. + /// + [JsonProperty(PropertyName = "operation")] + public string Operation { get; protected set; } + + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/Page.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/Page.cs new file mode 100644 index 000000000000..a93374cd37e9 --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/Page.cs @@ -0,0 +1,55 @@ +// 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 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay.Models +{ + using Azure; + using Management; + using Relay; + using Rest; + using Rest.Azure; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + + /// + /// Defines a page in Azure responses. + /// + /// Type of the page content items + [JsonObject] + public class Page : IPage + { + /// + /// Gets the link to the next page. + /// + [JsonProperty("nextLink")] + public string NextPageLink { get; private set; } + + [JsonProperty("value")] + private IList Items{ get; set; } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + public IEnumerator GetEnumerator() + { + return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/PolicyKey.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/PolicyKey.cs new file mode 100644 index 000000000000..3a08c4e9d983 --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/PolicyKey.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay.Models +{ + using Azure; + using Management; + using Relay; + + /// + /// Defines values for PolicyKey. + /// + public static class PolicyKey + { + public const string PrimaryKey = "PrimaryKey"; + public const string SecondaryKey = "SecondaryKey"; + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/RegenerateKeysParameters.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/RegenerateKeysParameters.cs new file mode 100644 index 000000000000..e593d7290847 --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/RegenerateKeysParameters.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay.Models +{ + using Azure; + using Management; + using Relay; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Parameters supplied to the Regenerate Authorization Rule operation. + /// + public partial class RegenerateKeysParameters + { + /// + /// Initializes a new instance of the RegenerateKeysParameters class. + /// + public RegenerateKeysParameters() { } + + /// + /// Initializes a new instance of the RegenerateKeysParameters class. + /// + /// Key that needs to be regenerated. Possible + /// values include: 'PrimaryKey', 'SecondaryKey' + public RegenerateKeysParameters(string policyKey = default(string)) + { + PolicyKey = policyKey; + } + + /// + /// Gets or sets key that needs to be regenerated. Possible values + /// include: 'PrimaryKey', 'SecondaryKey' + /// + [JsonProperty(PropertyName = "policyKey")] + public string PolicyKey { get; set; } + + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/RelayNamespace.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/RelayNamespace.cs new file mode 100644 index 000000000000..8cfe0d0ad82b --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/RelayNamespace.cs @@ -0,0 +1,115 @@ +// 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 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay.Models +{ + using Azure; + using Management; + using Relay; + using Rest; + using Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Description of a Namespace resource. + /// + [JsonTransformation] + public partial class RelayNamespace : TrackedResource + { + /// + /// Initializes a new instance of the RelayNamespace class. + /// + public RelayNamespace() + { + } + + /// + /// Initializes a new instance of the RelayNamespace class. + /// + /// Resource location + /// Resource Id + /// Resource name + /// Resource type + /// Resource tags + /// Provisioning state of the + /// namespace. + /// The time the namespace was created. + /// The time the namespace was updated. + /// Endpoint you can use to perform + /// Service Bus operations. + /// Identifier for Azure Insights + /// metrics + public RelayNamespace(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string), System.DateTime? createdAt = default(System.DateTime?), System.DateTime? updatedAt = default(System.DateTime?), string serviceBusEndpoint = default(string), string metricId = default(string)) + : base(location, id, name, type, tags) + { + ProvisioningState = provisioningState; + CreatedAt = createdAt; + UpdatedAt = updatedAt; + ServiceBusEndpoint = serviceBusEndpoint; + MetricId = metricId; + } + /// + /// Static constructor for RelayNamespace class. + /// + static RelayNamespace() + { + Sku = new Sku(); + } + + /// + /// Gets provisioning state of the namespace. + /// + [JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState { get; protected set; } + + /// + /// Gets the time the namespace was created. + /// + [JsonProperty(PropertyName = "properties.createdAt")] + public System.DateTime? CreatedAt { get; protected set; } + + /// + /// Gets the time the namespace was updated. + /// + [JsonProperty(PropertyName = "properties.updatedAt")] + public System.DateTime? UpdatedAt { get; protected set; } + + /// + /// Gets endpoint you can use to perform Service Bus operations. + /// + [JsonProperty(PropertyName = "properties.serviceBusEndpoint")] + public string ServiceBusEndpoint { get; protected set; } + + /// + /// Gets identifier for Azure Insights metrics + /// + [JsonProperty(PropertyName = "properties.metricId")] + public string MetricId { get; protected set; } + + /// + /// Sku of the Namespace. + /// + [JsonProperty(PropertyName = "sku")] + public static Sku Sku { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/RelayNamespaceUpdateParameter.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/RelayNamespaceUpdateParameter.cs new file mode 100644 index 000000000000..9ce614fc29c3 --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/RelayNamespaceUpdateParameter.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay.Models +{ + using Azure; + using Management; + using Relay; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Parameters supplied to the Patch Namespace operation. + /// + public partial class RelayNamespaceUpdateParameter + { + /// + /// Initializes a new instance of the RelayNamespaceUpdateParameter + /// class. + /// + public RelayNamespaceUpdateParameter() + { + } + + /// + /// Initializes a new instance of the RelayNamespaceUpdateParameter + /// class. + /// + /// Resource tags + public RelayNamespaceUpdateParameter(IDictionary tags = default(IDictionary)) + { + Tags = tags; + } + /// + /// Static constructor for RelayNamespaceUpdateParameter class. + /// + static RelayNamespaceUpdateParameter() + { + Sku = new Sku(); + } + + /// + /// Gets or sets resource tags + /// + [JsonProperty(PropertyName = "tags")] + public IDictionary Tags { get; set; } + + /// + /// The sku of the created namespace + /// + [JsonProperty(PropertyName = "sku")] + public static Sku Sku { get; private set; } + + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/Relaytype.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/Relaytype.cs new file mode 100644 index 000000000000..eb29e4a654eb --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/Relaytype.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay.Models +{ + using Azure; + using Management; + using Relay; + + /// + /// Defines values for Relaytype. + /// + public static class Relaytype + { + public const string NetTcp = "NetTcp"; + public const string Http = "Http"; + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/Resource.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/Resource.cs new file mode 100644 index 000000000000..460cefd3e0cf --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/Resource.cs @@ -0,0 +1,62 @@ +// 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 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay.Models +{ + using Azure; + using Management; + using Relay; + using Rest; + using Rest.Azure; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The Resource definition + /// + public partial class Resource : IResource + { + /// + /// Initializes a new instance of the Resource class. + /// + public Resource() { } + + /// + /// Initializes a new instance of the Resource class. + /// + /// Resource Id + /// Resource name + /// Resource type + public Resource(string id = default(string), string name = default(string), string type = default(string)) + { + Id = id; + Name = name; + Type = type; + } + + /// + /// Gets resource Id + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; protected set; } + + /// + /// Gets resource name + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; protected set; } + + /// + /// Gets resource type + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; protected set; } + + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/Sku.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/Sku.cs new file mode 100644 index 000000000000..817412b6771a --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/Sku.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 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay.Models +{ + using Azure; + using Management; + using Relay; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Sku of the Namespace. + /// + public partial class Sku + { + /// + /// Initializes a new instance of the Sku class. + /// + public Sku() { } + + /// + /// Static constructor for Sku class. + /// + static Sku() + { + Name = "Standard"; + Tier = "Standard"; + } + + /// + /// Name of this Sku + /// + [JsonProperty(PropertyName = "name")] + public static string Name { get; private set; } + + /// + /// The tier of this particular SKU + /// + [JsonProperty(PropertyName = "tier")] + public static string Tier { get; private set; } + + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/TrackedResource.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/TrackedResource.cs new file mode 100644 index 000000000000..33554ff781b2 --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/TrackedResource.cs @@ -0,0 +1,72 @@ +// 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 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay.Models +{ + using Azure; + using Management; + using Relay; + using Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Definition of Resource + /// + public partial class TrackedResource : Resource + { + /// + /// Initializes a new instance of the TrackedResource class. + /// + public TrackedResource() { } + + /// + /// Initializes a new instance of the TrackedResource class. + /// + /// Resource location + /// Resource Id + /// Resource name + /// Resource type + /// Resource tags + public TrackedResource(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary)) + : base(id, name, type) + { + Location = location; + Tags = tags; + } + + /// + /// Gets or sets resource location + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; set; } + + /// + /// Gets or sets resource tags + /// + [JsonProperty(PropertyName = "tags")] + public IDictionary Tags { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Location"); + } + } + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/UnavailableReason.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/UnavailableReason.cs new file mode 100644 index 000000000000..7c20a557eecf --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/UnavailableReason.cs @@ -0,0 +1,39 @@ +// 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 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay.Models +{ + using Azure; + using Management; + using Relay; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for UnavailableReason. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum UnavailableReason + { + [EnumMember(Value = "None")] + None, + [EnumMember(Value = "InvalidName")] + InvalidName, + [EnumMember(Value = "SubscriptionIsDisabled")] + SubscriptionIsDisabled, + [EnumMember(Value = "NameInUse")] + NameInUse, + [EnumMember(Value = "NameInLockdown")] + NameInLockdown, + [EnumMember(Value = "TooManyNamespaceInCurrentSubscription")] + TooManyNamespaceInCurrentSubscription + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/WcfRelay.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/WcfRelay.cs new file mode 100644 index 000000000000..8488f6b15441 --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Models/WcfRelay.cs @@ -0,0 +1,123 @@ +// 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 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay.Models +{ + using Azure; + using Management; + using Relay; + using Rest; + using Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Description of WcfRelays Resource. + /// + [JsonTransformation] + public partial class WcfRelay : Resource + { + /// + /// Initializes a new instance of the WcfRelay class. + /// + public WcfRelay() { } + + /// + /// Initializes a new instance of the WcfRelay class. + /// + /// Resource Id + /// Resource name + /// Resource type + /// WCFRelay Type. Possible values include: + /// 'NetTcp', 'Http' + /// The time the WCFRelay was created. + /// The time the namespace was updated. + /// The number of listeners for this relay. + /// min : 1 and max:25 supported + /// true if client + /// authorization is needed for this relay; otherwise, false. + /// true if transport security + /// is needed for this relay; otherwise, false. + /// true if the relay is dynamic; otherwise, + /// false. + /// usermetadata is a placeholder to store + /// user-defined string data for the HybridConnection endpoint.e.g. it + /// can be used to store descriptive data, such as list of teams and + /// their contact information also user-defined configuration settings + /// can be stored. + public WcfRelay(string id = default(string), string name = default(string), string type = default(string), string relayType = default(string), System.DateTime? createdAt = default(System.DateTime?), System.DateTime? updatedAt = default(System.DateTime?), int? listenerCount = default(int?), bool? requiresClientAuthorization = default(bool?), bool? requiresTransportSecurity = default(bool?), bool? isDynamic = default(bool?), string userMetadata = default(string)) + : base(id, name, type) + { + RelayType = relayType; + CreatedAt = createdAt; + UpdatedAt = updatedAt; + ListenerCount = listenerCount; + RequiresClientAuthorization = requiresClientAuthorization; + RequiresTransportSecurity = requiresTransportSecurity; + IsDynamic = isDynamic; + UserMetadata = userMetadata; + } + + /// + /// Gets or sets wCFRelay Type. Possible values include: 'NetTcp', + /// 'Http' + /// + [JsonProperty(PropertyName = "properties.relayType")] + public string RelayType { get; set; } + + /// + /// Gets the time the WCFRelay was created. + /// + [JsonProperty(PropertyName = "properties.createdAt")] + public System.DateTime? CreatedAt { get; protected set; } + + /// + /// Gets the time the namespace was updated. + /// + [JsonProperty(PropertyName = "properties.updatedAt")] + public System.DateTime? UpdatedAt { get; protected set; } + + /// + /// Gets the number of listeners for this relay. min : 1 and max:25 + /// supported + /// + [JsonProperty(PropertyName = "properties.listenerCount")] + public int? ListenerCount { get; protected set; } + + /// + /// Gets or sets true if client authorization is needed for this relay; + /// otherwise, false. + /// + [JsonProperty(PropertyName = "properties.requiresClientAuthorization")] + public bool? RequiresClientAuthorization { get; set; } + + /// + /// Gets or sets true if transport security is needed for this relay; + /// otherwise, false. + /// + [JsonProperty(PropertyName = "properties.requiresTransportSecurity")] + public bool? RequiresTransportSecurity { get; set; } + + /// + /// Gets true if the relay is dynamic; otherwise, false. + /// + [JsonProperty(PropertyName = "properties.isDynamic")] + public bool? IsDynamic { get; protected set; } + + /// + /// Gets or sets usermetadata is a placeholder to store user-defined + /// string data for the HybridConnection endpoint.e.g. it can be used + /// to store descriptive data, such as list of teams and their contact + /// information also user-defined configuration settings can be stored. + /// + [JsonProperty(PropertyName = "properties.userMetadata")] + public string UserMetadata { get; set; } + + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/NamespacesOperations.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/NamespacesOperations.cs new file mode 100644 index 000000000000..1a5cadd270e9 --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/NamespacesOperations.cs @@ -0,0 +1,3438 @@ +// 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 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay +{ + using Azure; + using Management; + using Rest; + using 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; + + /// + /// NamespacesOperations operations. + /// + internal partial class NamespacesOperations : IServiceOperations, INamespacesOperations + { + /// + /// Initializes a new instance of the NamespacesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal NamespacesOperations(RelayManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the RelayManagementClient + /// + public RelayManagementClient Client { get; private set; } + + /// + /// Check the give namespace name availability. + /// + /// + /// Parameters to check availability of the given namespace name + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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> CheckNameAvailabilityMethodWithHttpMessagesAsync(CheckNameAvailability parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CheckNameAvailabilityMethod", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Relay/CheckNameAvailability").ToString(); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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; + } + + /// + /// Lists all the available namespaces within the subscription irrespective of + /// the resourceGroups. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + 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}/providers/Microsoft.Relay/Namespaces").ToString(); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists all the available namespaces within the ResourceGroup. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, 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 (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", 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.Relay/Namespaces").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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; + } + + /// + /// Create Azure Relay namespace. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// Parameters supplied to create a Namespace Resource. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string namespaceName, RelayNamespace parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, namespaceName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Deletes an existing namespace. This operation also removes all associated + /// resources under the namespace. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string namespaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, namespaceName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Returns the description for the specified namespace. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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 namespaceName, 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 (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + 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.Relay/namespaces/{namespaceName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or updates a namespace. Once created, this namespace's resource + /// manifest is immutable. This operation is idempotent. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// Parameters for updating a namespace resource. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string namespaceName, RelayNamespaceUpdateParameter parameters, 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 (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (parameters == null) + { + parameters = new RelayNamespaceUpdateParameter(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("parameters", parameters); + 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.Relay/namespaces/{namespaceName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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; + } + + /// + /// Authorization rules for a namespace. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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>> ListAuthorizationRulesWithHttpMessagesAsync(string resourceGroupName, string namespaceName, 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 (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListAuthorizationRules", 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.Relay/namespaces/{namespaceName}/AuthorizationRules").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or Updates an authorization rule for a namespace + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The authorizationRule name. + /// + /// + /// The authorization rule parameters + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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> CreateOrUpdateAuthorizationRuleWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string authorizationRuleName, AuthorizationRule parameters, 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 (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (authorizationRuleName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "authorizationRuleName"); + } + if (authorizationRuleName != null) + { + if (authorizationRuleName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "authorizationRuleName", 50); + } + if (authorizationRuleName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "authorizationRuleName", 1); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("authorizationRuleName", authorizationRuleName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateAuthorizationRule", 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.Relay/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{authorizationRuleName}", System.Uri.EscapeDataString(authorizationRuleName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.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 System.Net.Http.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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 a namespace authorization rule + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The authorizationRule name. + /// + /// + /// 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 DeleteAuthorizationRuleWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string authorizationRuleName, 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 (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (authorizationRuleName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "authorizationRuleName"); + } + if (authorizationRuleName != null) + { + if (authorizationRuleName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "authorizationRuleName", 50); + } + if (authorizationRuleName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "authorizationRuleName", 1); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("authorizationRuleName", authorizationRuleName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteAuthorizationRule", 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.Relay/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{authorizationRuleName}", System.Uri.EscapeDataString(authorizationRuleName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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; + } + + /// + /// Authorization rule for a namespace by name. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The authorizationRule name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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> GetAuthorizationRuleWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string authorizationRuleName, 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 (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (authorizationRuleName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "authorizationRuleName"); + } + if (authorizationRuleName != null) + { + if (authorizationRuleName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "authorizationRuleName", 50); + } + if (authorizationRuleName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "authorizationRuleName", 1); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("authorizationRuleName", authorizationRuleName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAuthorizationRule", 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.Relay/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{authorizationRuleName}", System.Uri.EscapeDataString(authorizationRuleName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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; + } + + /// + /// Primary and Secondary ConnectionStrings to the namespace + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The authorizationRule name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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> ListKeysWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string authorizationRuleName, 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 (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (authorizationRuleName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "authorizationRuleName"); + } + if (authorizationRuleName != null) + { + if (authorizationRuleName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "authorizationRuleName", 50); + } + if (authorizationRuleName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "authorizationRuleName", 1); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("authorizationRuleName", authorizationRuleName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListKeys", 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.Relay/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/listKeys").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{authorizationRuleName}", System.Uri.EscapeDataString(authorizationRuleName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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; + } + + /// + /// Regenerates the Primary or Secondary ConnectionStrings to the namespace + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The authorizationRule name. + /// + /// + /// Parameters supplied to regenerate Auth Rule. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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> RegenerateKeysWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string authorizationRuleName, RegenerateKeysParameters parameters, 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 (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (authorizationRuleName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "authorizationRuleName"); + } + if (authorizationRuleName != null) + { + if (authorizationRuleName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "authorizationRuleName", 50); + } + if (authorizationRuleName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "authorizationRuleName", 1); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("authorizationRuleName", authorizationRuleName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "RegenerateKeys", 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.Relay/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{authorizationRuleName}", System.Uri.EscapeDataString(authorizationRuleName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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; + } + + /// + /// Create Azure Relay namespace. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// Parameters supplied to create a Namespace Resource. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string namespaceName, RelayNamespace parameters, 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 (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (parameters == null) + { + parameters = new RelayNamespace(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.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 System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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 an existing namespace. This operation also removes all associated + /// resources under the namespace. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string namespaceName, 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 (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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 the available namespaces within the subscription irrespective of + /// the resourceGroups. + /// + /// + /// 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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists all the available namespaces within the ResourceGroup. + /// + /// + /// 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>> ListByResourceGroupNextWithHttpMessagesAsync(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, "ListByResourceGroupNext", 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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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; + } + + /// + /// Authorization rules for a namespace. + /// + /// + /// 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>> ListAuthorizationRulesNextWithHttpMessagesAsync(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, "ListAuthorizationRulesNext", 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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/NamespacesOperationsExtensions.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/NamespacesOperationsExtensions.cs new file mode 100644 index 000000000000..ee4ea9a15f2a --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/NamespacesOperationsExtensions.cs @@ -0,0 +1,765 @@ +// 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 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay +{ + using Azure; + using Management; + using Rest; + using Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for NamespacesOperations. + /// + public static partial class NamespacesOperationsExtensions + { + /// + /// Check the give namespace name availability. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Parameters to check availability of the given namespace name + /// + public static CheckNameAvailabilityResult CheckNameAvailabilityMethod(this INamespacesOperations operations, CheckNameAvailability parameters) + { + return operations.CheckNameAvailabilityMethodAsync(parameters).GetAwaiter().GetResult(); + } + + /// + /// Check the give namespace name availability. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Parameters to check availability of the given namespace name + /// + /// + /// The cancellation token. + /// + public static async Task CheckNameAvailabilityMethodAsync(this INamespacesOperations operations, CheckNameAvailability parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CheckNameAvailabilityMethodWithHttpMessagesAsync(parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists all the available namespaces within the subscription irrespective of + /// the resourceGroups. + /// + /// + /// The operations group for this extension method. + /// + public static IPage List(this INamespacesOperations operations) + { + return operations.ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Lists all the available namespaces within the subscription irrespective of + /// the resourceGroups. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this INamespacesOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists all the available namespaces within the ResourceGroup. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + public static IPage ListByResourceGroup(this INamespacesOperations operations, string resourceGroupName) + { + return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); + } + + /// + /// Lists all the available namespaces within the ResourceGroup. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByResourceGroupAsync(this INamespacesOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Create Azure Relay namespace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// Parameters supplied to create a Namespace Resource. + /// + public static RelayNamespace CreateOrUpdate(this INamespacesOperations operations, string resourceGroupName, string namespaceName, RelayNamespace parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, namespaceName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Create Azure Relay namespace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// Parameters supplied to create a Namespace Resource. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this INamespacesOperations operations, string resourceGroupName, string namespaceName, RelayNamespace parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, namespaceName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes an existing namespace. This operation also removes all associated + /// resources under the namespace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + public static void Delete(this INamespacesOperations operations, string resourceGroupName, string namespaceName) + { + operations.DeleteAsync(resourceGroupName, namespaceName).GetAwaiter().GetResult(); + } + + /// + /// Deletes an existing namespace. This operation also removes all associated + /// resources under the namespace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this INamespacesOperations operations, string resourceGroupName, string namespaceName, CancellationToken cancellationToken = default(CancellationToken)) + { + await operations.DeleteWithHttpMessagesAsync(resourceGroupName, namespaceName, null, cancellationToken).ConfigureAwait(false); + } + + /// + /// Returns the description for the specified namespace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + public static RelayNamespace Get(this INamespacesOperations operations, string resourceGroupName, string namespaceName) + { + return operations.GetAsync(resourceGroupName, namespaceName).GetAwaiter().GetResult(); + } + + /// + /// Returns the description for the specified namespace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this INamespacesOperations operations, string resourceGroupName, string namespaceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, namespaceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a namespace. Once created, this namespace's resource + /// manifest is immutable. This operation is idempotent. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// Parameters for updating a namespace resource. + /// + public static RelayNamespace Update(this INamespacesOperations operations, string resourceGroupName, string namespaceName, RelayNamespaceUpdateParameter parameters) + { + return operations.UpdateAsync(resourceGroupName, namespaceName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a namespace. Once created, this namespace's resource + /// manifest is immutable. This operation is idempotent. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// Parameters for updating a namespace resource. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this INamespacesOperations operations, string resourceGroupName, string namespaceName, RelayNamespaceUpdateParameter parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, namespaceName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Authorization rules for a namespace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + public static IPage ListAuthorizationRules(this INamespacesOperations operations, string resourceGroupName, string namespaceName) + { + return operations.ListAuthorizationRulesAsync(resourceGroupName, namespaceName).GetAwaiter().GetResult(); + } + + /// + /// Authorization rules for a namespace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The cancellation token. + /// + public static async Task> ListAuthorizationRulesAsync(this INamespacesOperations operations, string resourceGroupName, string namespaceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListAuthorizationRulesWithHttpMessagesAsync(resourceGroupName, namespaceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or Updates an authorization rule for a namespace + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The authorizationRule name. + /// + /// + /// The authorization rule parameters + /// + public static AuthorizationRule CreateOrUpdateAuthorizationRule(this INamespacesOperations operations, string resourceGroupName, string namespaceName, string authorizationRuleName, AuthorizationRule parameters) + { + return operations.CreateOrUpdateAuthorizationRuleAsync(resourceGroupName, namespaceName, authorizationRuleName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or Updates an authorization rule for a namespace + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The authorizationRule name. + /// + /// + /// The authorization rule parameters + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAuthorizationRuleAsync(this INamespacesOperations operations, string resourceGroupName, string namespaceName, string authorizationRuleName, AuthorizationRule parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateAuthorizationRuleWithHttpMessagesAsync(resourceGroupName, namespaceName, authorizationRuleName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a namespace authorization rule + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The authorizationRule name. + /// + public static void DeleteAuthorizationRule(this INamespacesOperations operations, string resourceGroupName, string namespaceName, string authorizationRuleName) + { + operations.DeleteAuthorizationRuleAsync(resourceGroupName, namespaceName, authorizationRuleName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a namespace authorization rule + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The authorizationRule name. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAuthorizationRuleAsync(this INamespacesOperations operations, string resourceGroupName, string namespaceName, string authorizationRuleName, CancellationToken cancellationToken = default(CancellationToken)) + { + await operations.DeleteAuthorizationRuleWithHttpMessagesAsync(resourceGroupName, namespaceName, authorizationRuleName, null, cancellationToken).ConfigureAwait(false); + } + + /// + /// Authorization rule for a namespace by name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The authorizationRule name. + /// + public static AuthorizationRule GetAuthorizationRule(this INamespacesOperations operations, string resourceGroupName, string namespaceName, string authorizationRuleName) + { + return operations.GetAuthorizationRuleAsync(resourceGroupName, namespaceName, authorizationRuleName).GetAwaiter().GetResult(); + } + + /// + /// Authorization rule for a namespace by name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The authorizationRule name. + /// + /// + /// The cancellation token. + /// + public static async Task GetAuthorizationRuleAsync(this INamespacesOperations operations, string resourceGroupName, string namespaceName, string authorizationRuleName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAuthorizationRuleWithHttpMessagesAsync(resourceGroupName, namespaceName, authorizationRuleName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Primary and Secondary ConnectionStrings to the namespace + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The authorizationRule name. + /// + public static AuthorizationRuleKeys ListKeys(this INamespacesOperations operations, string resourceGroupName, string namespaceName, string authorizationRuleName) + { + return operations.ListKeysAsync(resourceGroupName, namespaceName, authorizationRuleName).GetAwaiter().GetResult(); + } + + /// + /// Primary and Secondary ConnectionStrings to the namespace + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The authorizationRule name. + /// + /// + /// The cancellation token. + /// + public static async Task ListKeysAsync(this INamespacesOperations operations, string resourceGroupName, string namespaceName, string authorizationRuleName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListKeysWithHttpMessagesAsync(resourceGroupName, namespaceName, authorizationRuleName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Regenerates the Primary or Secondary ConnectionStrings to the namespace + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The authorizationRule name. + /// + /// + /// Parameters supplied to regenerate Auth Rule. + /// + public static AuthorizationRuleKeys RegenerateKeys(this INamespacesOperations operations, string resourceGroupName, string namespaceName, string authorizationRuleName, RegenerateKeysParameters parameters) + { + return operations.RegenerateKeysAsync(resourceGroupName, namespaceName, authorizationRuleName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Regenerates the Primary or Secondary ConnectionStrings to the namespace + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The authorizationRule name. + /// + /// + /// Parameters supplied to regenerate Auth Rule. + /// + /// + /// The cancellation token. + /// + public static async Task RegenerateKeysAsync(this INamespacesOperations operations, string resourceGroupName, string namespaceName, string authorizationRuleName, RegenerateKeysParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.RegenerateKeysWithHttpMessagesAsync(resourceGroupName, namespaceName, authorizationRuleName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Create Azure Relay namespace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// Parameters supplied to create a Namespace Resource. + /// + public static RelayNamespace BeginCreateOrUpdate(this INamespacesOperations operations, string resourceGroupName, string namespaceName, RelayNamespace parameters) + { + return operations.BeginCreateOrUpdateAsync(resourceGroupName, namespaceName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Create Azure Relay namespace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// Parameters supplied to create a Namespace Resource. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateOrUpdateAsync(this INamespacesOperations operations, string resourceGroupName, string namespaceName, RelayNamespace parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, namespaceName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes an existing namespace. This operation also removes all associated + /// resources under the namespace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + public static void BeginDelete(this INamespacesOperations operations, string resourceGroupName, string namespaceName) + { + operations.BeginDeleteAsync(resourceGroupName, namespaceName).GetAwaiter().GetResult(); + } + + /// + /// Deletes an existing namespace. This operation also removes all associated + /// resources under the namespace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The cancellation token. + /// + public static async Task BeginDeleteAsync(this INamespacesOperations operations, string resourceGroupName, string namespaceName, CancellationToken cancellationToken = default(CancellationToken)) + { + await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, namespaceName, null, cancellationToken).ConfigureAwait(false); + } + + /// + /// Lists all the available namespaces within the subscription irrespective of + /// the resourceGroups. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this INamespacesOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists all the available namespaces within the subscription irrespective of + /// the resourceGroups. + /// + /// + /// 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 INamespacesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists all the available namespaces within the ResourceGroup. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByResourceGroupNext(this INamespacesOperations operations, string nextPageLink) + { + return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists all the available namespaces within the ResourceGroup. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByResourceGroupNextAsync(this INamespacesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Authorization rules for a namespace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListAuthorizationRulesNext(this INamespacesOperations operations, string nextPageLink) + { + return operations.ListAuthorizationRulesNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Authorization rules for a namespace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAuthorizationRulesNextAsync(this INamespacesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListAuthorizationRulesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Operations.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Operations.cs new file mode 100644 index 000000000000..0dcac95a58fd --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/Operations.cs @@ -0,0 +1,391 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay +{ + using Azure; + using Management; + using Rest; + using 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; + + /// + /// Operations operations. + /// + internal partial class Operations : IServiceOperations, IOperations + { + /// + /// Initializes a new instance of the Operations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal Operations(RelayManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the RelayManagementClient + /// + public RelayManagementClient Client { get; private set; } + + /// + /// Lists all of the available Relay REST API operations. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + 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("/") ? "" : "/")), "providers/Microsoft.Relay/operations").ToString(); + 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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists all of the available Relay REST API operations. + /// + /// + /// 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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/OperationsExtensions.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/OperationsExtensions.cs new file mode 100644 index 000000000000..5aa90e43c56d --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/OperationsExtensions.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay +{ + using Azure; + using Management; + using Rest; + using Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for Operations. + /// + public static partial class OperationsExtensions + { + /// + /// Lists all of the available Relay REST API operations. + /// + /// + /// The operations group for this extension method. + /// + public static IPage List(this IOperations operations) + { + return operations.ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Lists all of the available Relay REST API operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists all of the available Relay REST API operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists all of the available Relay REST API operations. + /// + /// + /// 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 IOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/RelayManagementClient.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/RelayManagementClient.cs new file mode 100644 index 000000000000..f509d784e501 --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/RelayManagementClient.cs @@ -0,0 +1,341 @@ +// 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 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay +{ + using Azure; + using Management; + using Rest; + using Rest.Azure; + using Rest.Serialization; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + + /// + /// Use these API to manage Azure Relay resources through Azure Resources + /// Manager. + /// + public partial class RelayManagementClient : ServiceClient, IRelayManagementClient, IAzureClient + { + /// + /// The base URI of the service. + /// + public System.Uri BaseUri { get; set; } + + /// + /// Gets or sets json serialization settings. + /// + public JsonSerializerSettings SerializationSettings { get; private set; } + + /// + /// Gets or sets json deserialization settings. + /// + public JsonSerializerSettings DeserializationSettings { get; private set; } + + /// + /// Credentials needed for the client to connect to Azure. + /// + public ServiceClientCredentials Credentials { get; private set; } + + /// + /// Subscription credentials which uniquely identify Microsoft Azure + /// subscription. The subscription ID forms part of the URI for every service + /// call. + /// + public string SubscriptionId { get; set; } + + /// + /// Client Api Version. + /// + public string ApiVersion { get; private set; } + + /// + /// Gets or sets the preferred language for the response. + /// + public string AcceptLanguage { get; set; } + + /// + /// Gets or sets the retry timeout in seconds for Long Running Operations. + /// Default value is 30. + /// + public int? LongRunningOperationRetryTimeout { get; set; } + + /// + /// When set to true a unique x-ms-client-request-id value is generated and + /// included in each request. Default is true. + /// + public bool? GenerateClientRequestId { get; set; } + + /// + /// Gets the IOperations. + /// + public virtual IOperations Operations { get; private set; } + + /// + /// Gets the INamespacesOperations. + /// + public virtual INamespacesOperations Namespaces { get; private set; } + + /// + /// Gets the IHybridConnectionsOperations. + /// + public virtual IHybridConnectionsOperations HybridConnections { get; private set; } + + /// + /// Gets the IWCFRelaysOperations. + /// + public virtual IWCFRelaysOperations WCFRelays { get; private set; } + + /// + /// Initializes a new instance of the RelayManagementClient class. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + protected RelayManagementClient(params System.Net.Http.DelegatingHandler[] handlers) : base(handlers) + { + Initialize(); + } + + /// + /// Initializes a new instance of the RelayManagementClient class. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + protected RelayManagementClient(System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : base(rootHandler, handlers) + { + Initialize(); + } + + /// + /// Initializes a new instance of the RelayManagementClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + protected RelayManagementClient(System.Uri baseUri, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + BaseUri = baseUri; + } + + /// + /// Initializes a new instance of the RelayManagementClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + protected RelayManagementClient(System.Uri baseUri, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + BaseUri = baseUri; + } + + /// + /// Initializes a new instance of the RelayManagementClient class. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public RelayManagementClient(ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the RelayManagementClient class. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public RelayManagementClient(ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the RelayManagementClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public RelayManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + BaseUri = baseUri; + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the RelayManagementClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public RelayManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + BaseUri = baseUri; + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// An optional partial-method to perform custom initialization. + /// + partial void CustomInitialize(); + /// + /// Initializes client properties. + /// + private void Initialize() + { + Operations = new Operations(this); + Namespaces = new NamespacesOperations(this); + HybridConnections = new HybridConnectionsOperations(this); + WCFRelays = new WCFRelaysOperations(this); + BaseUri = new System.Uri("https://management.azure.com"); + ApiVersion = "2016-07-01"; + AcceptLanguage = "en-US"; + LongRunningOperationRetryTimeout = 30; + GenerateClientRequestId = true; + SerializationSettings = new JsonSerializerSettings + { + Formatting = Formatting.Indented, + DateFormatHandling = DateFormatHandling.IsoDateFormat, + DateTimeZoneHandling = DateTimeZoneHandling.Utc, + NullValueHandling = NullValueHandling.Ignore, + ReferenceLoopHandling = ReferenceLoopHandling.Serialize, + ContractResolver = new ReadOnlyJsonContractResolver(), + Converters = new List + { + new Iso8601TimeSpanConverter() + } + }; + SerializationSettings.Converters.Add(new TransformationJsonConverter()); + DeserializationSettings = new JsonSerializerSettings + { + DateFormatHandling = DateFormatHandling.IsoDateFormat, + DateTimeZoneHandling = DateTimeZoneHandling.Utc, + NullValueHandling = NullValueHandling.Ignore, + ReferenceLoopHandling = ReferenceLoopHandling.Serialize, + ContractResolver = new ReadOnlyJsonContractResolver(), + Converters = new List + { + new Iso8601TimeSpanConverter() + } + }; + CustomInitialize(); + DeserializationSettings.Converters.Add(new TransformationJsonConverter()); + DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); + } + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/WCFRelaysOperations.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/WCFRelaysOperations.cs new file mode 100644 index 000000000000..f7f6113b6a9f --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/WCFRelaysOperations.cs @@ -0,0 +1,2815 @@ +// 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 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay +{ + using Azure; + using Management; + using Rest; + using 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; + + /// + /// WCFRelaysOperations operations. + /// + internal partial class WCFRelaysOperations : IServiceOperations, IWCFRelaysOperations + { + /// + /// Initializes a new instance of the WCFRelaysOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal WCFRelaysOperations(RelayManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the RelayManagementClient + /// + public RelayManagementClient Client { get; private set; } + + /// + /// Lists the WCFRelays within the namespace. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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>> ListByNamespaceWithHttpMessagesAsync(string resourceGroupName, string namespaceName, 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 (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByNamespace", 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.Relay/namespaces/{namespaceName}/WcfRelays").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or Updates a WCFRelay. This operation is idempotent. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// Parameters supplied to create a WCFRelays. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string relayName, WcfRelay parameters, 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 (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (relayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); + } + if (relayName != null) + { + if (relayName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "relayName", 50); + } + if (relayName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "relayName", 1); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("relayName", relayName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.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 System.Net.Http.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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 a WCFRelays . + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// 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 namespaceName, string relayName, 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 (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (relayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); + } + if (relayName != null) + { + if (relayName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "relayName", 50); + } + if (relayName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "relayName", 1); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("relayName", relayName); + 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.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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; + } + + /// + /// Returns the description for the specified WCFRelays. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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 namespaceName, string relayName, 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 (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (relayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); + } + if (relayName != null) + { + if (relayName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "relayName", 50); + } + if (relayName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "relayName", 1); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("relayName", relayName); + 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.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.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 && (int)_statusCode != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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; + } + + /// + /// Authorization rules for a WCFRelays. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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>> ListAuthorizationRulesWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string relayName, 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 (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (relayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); + } + if (relayName != null) + { + if (relayName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "relayName", 50); + } + if (relayName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "relayName", 1); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("relayName", relayName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListAuthorizationRules", 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.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}/authorizationRules").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or Updates an authorization rule for a WCFRelays + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// The authorizationRule name. + /// + /// + /// The authorization rule parameters. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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> CreateOrUpdateAuthorizationRuleWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string relayName, string authorizationRuleName, AuthorizationRule parameters, 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 (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (relayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); + } + if (relayName != null) + { + if (relayName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "relayName", 50); + } + if (relayName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "relayName", 1); + } + } + if (authorizationRuleName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "authorizationRuleName"); + } + if (authorizationRuleName != null) + { + if (authorizationRuleName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "authorizationRuleName", 50); + } + if (authorizationRuleName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "authorizationRuleName", 1); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("relayName", relayName); + tracingParameters.Add("authorizationRuleName", authorizationRuleName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateAuthorizationRule", 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.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}/authorizationRules/{authorizationRuleName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); + _url = _url.Replace("{authorizationRuleName}", System.Uri.EscapeDataString(authorizationRuleName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.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 System.Net.Http.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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 a WCFRelays authorization rule + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// The authorizationRule name. + /// + /// + /// 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 DeleteAuthorizationRuleWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string relayName, string authorizationRuleName, 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 (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (relayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); + } + if (relayName != null) + { + if (relayName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "relayName", 50); + } + if (relayName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "relayName", 1); + } + } + if (authorizationRuleName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "authorizationRuleName"); + } + if (authorizationRuleName != null) + { + if (authorizationRuleName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "authorizationRuleName", 50); + } + if (authorizationRuleName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "authorizationRuleName", 1); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("relayName", relayName); + tracingParameters.Add("authorizationRuleName", authorizationRuleName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteAuthorizationRule", 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.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}/authorizationRules/{authorizationRuleName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); + _url = _url.Replace("{authorizationRuleName}", System.Uri.EscapeDataString(authorizationRuleName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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; + } + + /// + /// Get authorizationRule for a WCFRelays by name. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// The authorizationRule name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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> GetAuthorizationRuleWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string relayName, string authorizationRuleName, 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 (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (relayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); + } + if (relayName != null) + { + if (relayName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "relayName", 50); + } + if (relayName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "relayName", 1); + } + } + if (authorizationRuleName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "authorizationRuleName"); + } + if (authorizationRuleName != null) + { + if (authorizationRuleName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "authorizationRuleName", 50); + } + if (authorizationRuleName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "authorizationRuleName", 1); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("relayName", relayName); + tracingParameters.Add("authorizationRuleName", authorizationRuleName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAuthorizationRule", 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.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}/authorizationRules/{authorizationRuleName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); + _url = _url.Replace("{authorizationRuleName}", System.Uri.EscapeDataString(authorizationRuleName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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; + } + + /// + /// Primary and Secondary ConnectionStrings to the WCFRelays. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// The authorizationRule name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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> ListKeysWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string relayName, string authorizationRuleName, 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 (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (relayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); + } + if (relayName != null) + { + if (relayName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "relayName", 50); + } + if (relayName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "relayName", 1); + } + } + if (authorizationRuleName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "authorizationRuleName"); + } + if (authorizationRuleName != null) + { + if (authorizationRuleName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "authorizationRuleName", 50); + } + if (authorizationRuleName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "authorizationRuleName", 1); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("relayName", relayName); + tracingParameters.Add("authorizationRuleName", authorizationRuleName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListKeys", 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.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}/authorizationRules/{authorizationRuleName}/ListKeys").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); + _url = _url.Replace("{authorizationRuleName}", System.Uri.EscapeDataString(authorizationRuleName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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; + } + + /// + /// Regenerates the Primary or Secondary ConnectionStrings to the WCFRelays + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// The authorizationRule name. + /// + /// + /// Parameters supplied to regenerate Auth Rule. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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> RegenerateKeysWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string relayName, string authorizationRuleName, RegenerateKeysParameters parameters, 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 (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (relayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); + } + if (relayName != null) + { + if (relayName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "relayName", 50); + } + if (relayName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "relayName", 1); + } + } + if (authorizationRuleName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "authorizationRuleName"); + } + if (authorizationRuleName != null) + { + if (authorizationRuleName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "authorizationRuleName", 50); + } + if (authorizationRuleName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "authorizationRuleName", 1); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("relayName", relayName); + tracingParameters.Add("authorizationRuleName", authorizationRuleName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "RegenerateKeys", 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.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}/authorizationRules/{authorizationRuleName}/regenerateKeys").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); + _url = _url.Replace("{authorizationRuleName}", System.Uri.EscapeDataString(authorizationRuleName)); + _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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists the WCFRelays within the namespace. + /// + /// + /// 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>> ListByNamespaceNextWithHttpMessagesAsync(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, "ListByNamespaceNext", 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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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; + } + + /// + /// Authorization rules for a WCFRelays. + /// + /// + /// 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>> ListAuthorizationRulesNextWithHttpMessagesAsync(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, "ListAuthorizationRulesNext", 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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/WCFRelaysOperationsExtensions.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/WCFRelaysOperationsExtensions.cs new file mode 100644 index 000000000000..b3b656385ec4 --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Generated/WCFRelaysOperationsExtensions.cs @@ -0,0 +1,590 @@ +// 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 1.0.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Relay +{ + using Azure; + using Management; + using Rest; + using Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for WCFRelaysOperations. + /// + public static partial class WCFRelaysOperationsExtensions + { + /// + /// Lists the WCFRelays within the namespace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + public static IPage ListByNamespace(this IWCFRelaysOperations operations, string resourceGroupName, string namespaceName) + { + return operations.ListByNamespaceAsync(resourceGroupName, namespaceName).GetAwaiter().GetResult(); + } + + /// + /// Lists the WCFRelays within the namespace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The cancellation token. + /// + public static async Task> ListByNamespaceAsync(this IWCFRelaysOperations operations, string resourceGroupName, string namespaceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByNamespaceWithHttpMessagesAsync(resourceGroupName, namespaceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or Updates a WCFRelay. This operation is idempotent. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// Parameters supplied to create a WCFRelays. + /// + public static WcfRelay CreateOrUpdate(this IWCFRelaysOperations operations, string resourceGroupName, string namespaceName, string relayName, WcfRelay parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, namespaceName, relayName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or Updates a WCFRelay. This operation is idempotent. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// Parameters supplied to create a WCFRelays. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IWCFRelaysOperations operations, string resourceGroupName, string namespaceName, string relayName, WcfRelay parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, namespaceName, relayName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a WCFRelays . + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + public static void Delete(this IWCFRelaysOperations operations, string resourceGroupName, string namespaceName, string relayName) + { + operations.DeleteAsync(resourceGroupName, namespaceName, relayName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a WCFRelays . + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IWCFRelaysOperations operations, string resourceGroupName, string namespaceName, string relayName, CancellationToken cancellationToken = default(CancellationToken)) + { + await operations.DeleteWithHttpMessagesAsync(resourceGroupName, namespaceName, relayName, null, cancellationToken).ConfigureAwait(false); + } + + /// + /// Returns the description for the specified WCFRelays. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + public static WcfRelay Get(this IWCFRelaysOperations operations, string resourceGroupName, string namespaceName, string relayName) + { + return operations.GetAsync(resourceGroupName, namespaceName, relayName).GetAwaiter().GetResult(); + } + + /// + /// Returns the description for the specified WCFRelays. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IWCFRelaysOperations operations, string resourceGroupName, string namespaceName, string relayName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, namespaceName, relayName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Authorization rules for a WCFRelays. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + public static IPage ListAuthorizationRules(this IWCFRelaysOperations operations, string resourceGroupName, string namespaceName, string relayName) + { + return operations.ListAuthorizationRulesAsync(resourceGroupName, namespaceName, relayName).GetAwaiter().GetResult(); + } + + /// + /// Authorization rules for a WCFRelays. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// The cancellation token. + /// + public static async Task> ListAuthorizationRulesAsync(this IWCFRelaysOperations operations, string resourceGroupName, string namespaceName, string relayName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListAuthorizationRulesWithHttpMessagesAsync(resourceGroupName, namespaceName, relayName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or Updates an authorization rule for a WCFRelays + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// The authorizationRule name. + /// + /// + /// The authorization rule parameters. + /// + public static AuthorizationRule CreateOrUpdateAuthorizationRule(this IWCFRelaysOperations operations, string resourceGroupName, string namespaceName, string relayName, string authorizationRuleName, AuthorizationRule parameters) + { + return operations.CreateOrUpdateAuthorizationRuleAsync(resourceGroupName, namespaceName, relayName, authorizationRuleName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or Updates an authorization rule for a WCFRelays + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// The authorizationRule name. + /// + /// + /// The authorization rule parameters. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAuthorizationRuleAsync(this IWCFRelaysOperations operations, string resourceGroupName, string namespaceName, string relayName, string authorizationRuleName, AuthorizationRule parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateAuthorizationRuleWithHttpMessagesAsync(resourceGroupName, namespaceName, relayName, authorizationRuleName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a WCFRelays authorization rule + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// The authorizationRule name. + /// + public static void DeleteAuthorizationRule(this IWCFRelaysOperations operations, string resourceGroupName, string namespaceName, string relayName, string authorizationRuleName) + { + operations.DeleteAuthorizationRuleAsync(resourceGroupName, namespaceName, relayName, authorizationRuleName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a WCFRelays authorization rule + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// The authorizationRule name. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAuthorizationRuleAsync(this IWCFRelaysOperations operations, string resourceGroupName, string namespaceName, string relayName, string authorizationRuleName, CancellationToken cancellationToken = default(CancellationToken)) + { + await operations.DeleteAuthorizationRuleWithHttpMessagesAsync(resourceGroupName, namespaceName, relayName, authorizationRuleName, null, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get authorizationRule for a WCFRelays by name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// The authorizationRule name. + /// + public static AuthorizationRule GetAuthorizationRule(this IWCFRelaysOperations operations, string resourceGroupName, string namespaceName, string relayName, string authorizationRuleName) + { + return operations.GetAuthorizationRuleAsync(resourceGroupName, namespaceName, relayName, authorizationRuleName).GetAwaiter().GetResult(); + } + + /// + /// Get authorizationRule for a WCFRelays by name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// The authorizationRule name. + /// + /// + /// The cancellation token. + /// + public static async Task GetAuthorizationRuleAsync(this IWCFRelaysOperations operations, string resourceGroupName, string namespaceName, string relayName, string authorizationRuleName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAuthorizationRuleWithHttpMessagesAsync(resourceGroupName, namespaceName, relayName, authorizationRuleName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Primary and Secondary ConnectionStrings to the WCFRelays. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// The authorizationRule name. + /// + public static AuthorizationRuleKeys ListKeys(this IWCFRelaysOperations operations, string resourceGroupName, string namespaceName, string relayName, string authorizationRuleName) + { + return operations.ListKeysAsync(resourceGroupName, namespaceName, relayName, authorizationRuleName).GetAwaiter().GetResult(); + } + + /// + /// Primary and Secondary ConnectionStrings to the WCFRelays. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// The authorizationRule name. + /// + /// + /// The cancellation token. + /// + public static async Task ListKeysAsync(this IWCFRelaysOperations operations, string resourceGroupName, string namespaceName, string relayName, string authorizationRuleName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListKeysWithHttpMessagesAsync(resourceGroupName, namespaceName, relayName, authorizationRuleName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Regenerates the Primary or Secondary ConnectionStrings to the WCFRelays + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// The authorizationRule name. + /// + /// + /// Parameters supplied to regenerate Auth Rule. + /// + public static AuthorizationRuleKeys RegenerateKeys(this IWCFRelaysOperations operations, string resourceGroupName, string namespaceName, string relayName, string authorizationRuleName, RegenerateKeysParameters parameters) + { + return operations.RegenerateKeysAsync(resourceGroupName, namespaceName, relayName, authorizationRuleName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Regenerates the Primary or Secondary ConnectionStrings to the WCFRelays + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the Resource group within the Azure subscription. + /// + /// + /// The Namespace Name + /// + /// + /// The relay name + /// + /// + /// The authorizationRule name. + /// + /// + /// Parameters supplied to regenerate Auth Rule. + /// + /// + /// The cancellation token. + /// + public static async Task RegenerateKeysAsync(this IWCFRelaysOperations operations, string resourceGroupName, string namespaceName, string relayName, string authorizationRuleName, RegenerateKeysParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.RegenerateKeysWithHttpMessagesAsync(resourceGroupName, namespaceName, relayName, authorizationRuleName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists the WCFRelays within the namespace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByNamespaceNext(this IWCFRelaysOperations operations, string nextPageLink) + { + return operations.ListByNamespaceNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists the WCFRelays within the namespace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByNamespaceNextAsync(this IWCFRelaysOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByNamespaceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Authorization rules for a WCFRelays. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListAuthorizationRulesNext(this IWCFRelaysOperations operations, string nextPageLink) + { + return operations.ListAuthorizationRulesNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Authorization rules for a WCFRelays. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAuthorizationRulesNextAsync(this IWCFRelaysOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListAuthorizationRulesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} + diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Microsoft.Azure.Management.Relay.xproj b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Microsoft.Azure.Management.Relay.xproj new file mode 100644 index 000000000000..398fad5cf652 --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Microsoft.Azure.Management.Relay.xproj @@ -0,0 +1,18 @@ + + + + 14.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + c0e50b63-6f6e-4c3d-bafe-139092d0b5fa + Microsoft.Azure.Management.Relay + .\obj + .\bin\ + + + 2.0 + + + \ No newline at end of file diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Properties/AssemblyInfo.cs b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..9dd0c66ce75c --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/Properties/AssemblyInfo.cs @@ -0,0 +1,19 @@ +// 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; +using System.Resources; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Microsoft Azure Relay Management Library")] +[assembly: AssemblyDescription("Provides Microsoft Azure Relay management functions for managing the Microsoft Azure Relay service")] + +[assembly: AssemblyVersion("0.0.1.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Azure .NET SDK")] +[assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: NeutralResourcesLanguage("en")] \ No newline at end of file diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/generate.cmd b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/generate.cmd new file mode 100644 index 000000000000..acb9bc33550c --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/generate.cmd @@ -0,0 +1,17 @@ +:: +:: Microsoft Azure SDK for Net - Generate library code +:: Copyright (C) Microsoft Corporation. All Rights Reserved. +:: + +@echo off +set autoRestVersion=1.0.0-Nightly20170212 +if "%1" == "" ( + set specFile="https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-relay/2016-07-01/swagger/relay.json" +) else ( + set specFile="%1" +) +set repoRoot=%~dp0..\..\..\.. +set generateFolder=%~dp0Generated + +if exist %generateFolder% rd /S /Q %generateFolder% +call "%repoRoot%\tools\autorest.gen.cmd" %specFile% Microsoft.Azure.Management.Relay %autoRestVersion% %generateFolder% "MICROSOFT_MIT" diff --git a/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/project.json b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/project.json new file mode 100644 index 000000000000..0d2d1c937169 --- /dev/null +++ b/src/ResourceManagement/Relay/Microsoft.Azure.Management.Relay/project.json @@ -0,0 +1,54 @@ +{ + "version": "0.0.1-preview", + "description": "Provides developers with libraries to create and manage Namespaces, WCFRelay, HybridConnection and manage Authorization Rules. Note: This client library is for Relay under Azure Resource Manager.", + "authors": [ "Microsoft" ], + + "packOptions": { + "summary": "Microsoft Azure Relay Management Library", + "iconUrl": "http://go.microsoft.com/fwlink/?LinkID=288890", + "projectUrl": "https://github.com/Azure/azure-sdk-for-net", + "licenseUrl": "https://raw.githubusercontent.com/Microsoft/dotnet/master/LICENSE", + "tags": [ "Microsoft Azure Relay management", "Relay", "Relay management", "REST HTTP client", "windowsazureofficial" ], + "requireLicenseAcceptance": true + }, + + "buildOptions": { + "delaySign": true, + "publicSign": false, + "keyFile": "../../../../tools/MSSharedLibKey.snk", + "xmlDoc": true + }, + + "dependencies": { + "Microsoft.Rest.ClientRuntime.Azure": "[3.3.5,4.0.0)", + "Microsoft.Rest.ClientRuntime": "[2.3.5,3.0.0)" + }, + + "frameworks": { + "net45": { + "dependencies": { + } + }, + "netstandard1.5": { + "imports": [ "dnxcore50" ], + "buildOptions": { "define": [ "PORTABLE" ] }, + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Diagnostics.Tools": "4.3.0", + "System.Net.Http": "4.3.0", + "System.Runtime.Serialization.Primitives": "4.1.1", + "System.Threading.Tasks": "4.3.0", + "NETStandard.Library": "1.6.1" + } + }, + "netstandard1.1": { + "imports": [ "dnxcore50" ], + "buildOptions": { "define": [ "PORTABLE" ] }, + "dependencies": { + "System.Runtime.Serialization.Primitives": "4.1.1", + "Microsoft.NETCore.Platforms": "1.1.0", + "NETStandard.Library": "1.6.1" + } + } + } +} diff --git a/src/ResourceManagement/Relay/Relay.Tests/Helpers/RecordedDelegatingHandler.cs b/src/ResourceManagement/Relay/Relay.Tests/Helpers/RecordedDelegatingHandler.cs new file mode 100644 index 000000000000..ac093b5c8cf5 --- /dev/null +++ b/src/ResourceManagement/Relay/Relay.Tests/Helpers/RecordedDelegatingHandler.cs @@ -0,0 +1,88 @@ +namespace Relay.Tests.TestHelper +{ + + using System; + using System.Net; + using System.Net.Http; + using System.Net.Http.Headers; + using System.Threading.Tasks; + + public class RecordedDelegatingHandler : DelegatingHandler + { + private HttpResponseMessage _response; + + public RecordedDelegatingHandler() + { + StatusCodeToReturn = HttpStatusCode.Created; + SubsequentStatusCodeToReturn = StatusCodeToReturn; + } + + public RecordedDelegatingHandler(HttpResponseMessage response) + { + StatusCodeToReturn = HttpStatusCode.Created; + SubsequentStatusCodeToReturn = StatusCodeToReturn; + _response = response; + } + + public HttpStatusCode StatusCodeToReturn { get; set; } + + public HttpStatusCode SubsequentStatusCodeToReturn { get; set; } + + public string Request { get; private set; } + + public HttpRequestHeaders RequestHeaders { get; private set; } + + public HttpContentHeaders ContentHeaders { get; private set; } + + public HttpMethod Method { get; private set; } + + public Uri Uri { get; private set; } + + public bool IsPassThrough { get; set; } + + private int counter; + + protected override async Task SendAsync(HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) + { + counter++; + // Save request + if (request.Content == null) + { + Request = string.Empty; + } + else + { + Request = await request.Content.ReadAsStringAsync(); + } + RequestHeaders = request.Headers; + if (request.Content != null) + { + ContentHeaders = request.Content.Headers; + } + Method = request.Method; + Uri = request.RequestUri; + + // Prepare response + if (IsPassThrough) + { + return await base.SendAsync(request, cancellationToken); + } + else + { + if (_response != null && counter == 1) + { + return _response; + } + else + { + var statusCode = StatusCodeToReturn; + if (counter > 1) + statusCode = SubsequentStatusCodeToReturn; + HttpResponseMessage response = new HttpResponseMessage(statusCode); + response.Content = new StringContent(""); + return response; + } + } + } + } +} diff --git a/src/ResourceManagement/Relay/Relay.Tests/Helpers/RelayManagementTestUtilities.cs b/src/ResourceManagement/Relay/Relay.Tests/Helpers/RelayManagementTestUtilities.cs new file mode 100644 index 000000000000..8880598a6eae --- /dev/null +++ b/src/ResourceManagement/Relay/Relay.Tests/Helpers/RelayManagementTestUtilities.cs @@ -0,0 +1,134 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +namespace Relay.Tests.TestHelper +{ + using System; + using System.Collections.Generic; + using System.Linq; + using Microsoft.Azure.Management.Relay; + using Microsoft.Azure.Management.Relay.Models; + using Microsoft.Azure.Management.Resources; + using Microsoft.Azure.Management.Resources.Models; + using Microsoft.Rest.ClientRuntime.Azure.TestFramework; + using Newtonsoft.Json; + using System.Security.Cryptography; + using System.Threading.Tasks; + using Newtonsoft.Json.Serialization; + using Newtonsoft.Json.Converters; + + public static class RelayManagementHelper + { + internal const string ResourceGroupPrefix = "Default-Relay-"; + internal const string NamespacePrefix = "sdk-RelayNamespace-"; + internal const string AuthorizationRulesPrefix = "sdk-RelayAuthRules-"; + internal const string DefaultNamespaceAuthorizationRule = "RootManageSharedAccessKey"; + internal const string HybridPrefix = "sdk-Relay-Hybrid-"; + internal const string WcfPrefix = "sdk-Relay-Wcf-"; + + public static RelayManagementClient GetRelayManagementClient(MockContext context, RecordedDelegatingHandler handler) + { + if (handler != null) + { + handler.IsPassThrough = true; + RelayManagementClient nhManagementClient = context.GetServiceClient(handlers: handler); + return nhManagementClient; + } + + return null; + } + + public static ResourceManagementClient GetResourceManagementClient(MockContext context, RecordedDelegatingHandler handler) + { + if (handler != null) + { + handler.IsPassThrough = true; + ResourceManagementClient rManagementClient = context.GetServiceClient(handlers: handler); + return rManagementClient; + } + + return null; + } + + public static string TryGetResourceGroup(this ResourceManagementClient resourceManagementClient, string location) + { + var resourceGroup = + resourceManagementClient.ResourceGroups + .List().Where(group => string.IsNullOrWhiteSpace(location) || group.Location.Equals(location.Replace(" ", string.Empty), StringComparison.OrdinalIgnoreCase)) + .FirstOrDefault(group => group.Name.Contains("")); + + return resourceGroup != null + + ? resourceGroup.Name + : string.Empty; + } + + public static void TryRegisterResourceGroup(this ResourceManagementClient resourceManagementClient, string location, string resourceGroupName) + { + resourceManagementClient.ResourceGroups.CreateOrUpdate(resourceGroupName, new ResourceGroup(location)); + } + + public static string GetLocationFromProvider(this ResourceManagementClient resourceManagementClient) + { + var providers = resourceManagementClient.Providers.Get("Microsoft.Relay"); + var location = providers.ResourceTypes.Where( + (resType) => + { + if (resType.ResourceType == "namespaces") + return true; + else + return false; + } + ).First().Locations.FirstOrDefault(); + return location; + } + + public static string GenerateRandomKey() + { + byte[] key256 = new byte[32]; + using (var rngCryptoServiceProvider = RandomNumberGenerator.Create()) + { + rngCryptoServiceProvider.GetBytes(key256); + } + + return Convert.ToBase64String(key256); + } + + public static string ConvertObjectToJSon(T obj) + { + return ConvertObjectToJSonAsync(obj); + } + + public static string ConvertObjectToJSonAsync(object obj) + { + if (obj != null) + { + return (Task.Factory.StartNew(() => JsonConvert.SerializeObject(obj, SerializeMediaTypeFormatterSettings))).Result; + } + return String.Empty; + } + + private static readonly JsonSerializerSettings SerializeMediaTypeFormatterSettings = new JsonSerializerSettings + { + NullValueHandling = Newtonsoft.Json.NullValueHandling.Include, + ContractResolver = new CamelCasePropertyNamesContractResolver(), + Converters = new List + { + new StringEnumConverter { CamelCaseText = false }, + }, + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor + }; + + } +} \ No newline at end of file diff --git a/src/ResourceManagement/Relay/Relay.Tests/Properties/AssemblyInfo.cs b/src/ResourceManagement/Relay/Relay.Tests/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..d9cc088c621a --- /dev/null +++ b/src/ResourceManagement/Relay/Relay.Tests/Properties/AssemblyInfo.cs @@ -0,0 +1,20 @@ +// 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; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Relay.Tests")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Relay.Tests")] +[assembly: AssemblyCopyright("Copyright © Microsoft Corporation")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +[assembly: ComVisible(false)] + +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/ResourceManagement/Relay/Relay.Tests/Relay.Tests.xproj b/src/ResourceManagement/Relay/Relay.Tests/Relay.Tests.xproj new file mode 100644 index 000000000000..965d746e4333 --- /dev/null +++ b/src/ResourceManagement/Relay/Relay.Tests/Relay.Tests.xproj @@ -0,0 +1,21 @@ + + + + 14.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + afa0a1a6-7481-434e-889d-eea52f5e489b + Relay.Tests + .\obj + .\bin\ + + + 2.0 + + + + + + \ No newline at end of file diff --git a/src/ResourceManagement/Relay/Relay.Tests/SessionRecords/Relay.Tests.ScenarioTests.ScenarioTests/CheckNameAvailability.json b/src/ResourceManagement/Relay/Relay.Tests/SessionRecords/Relay.Tests.ScenarioTests.ScenarioTests/CheckNameAvailability.json new file mode 100644 index 000000000000..b09febf35c02 --- /dev/null +++ b/src/ResourceManagement/Relay/Relay.Tests/SessionRecords/Relay.Tests.ScenarioTests.ScenarioTests/CheckNameAvailability.json @@ -0,0 +1,580 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/providers/Microsoft.Relay?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXk/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "44995e74-239f-44c7-8109-4dc4c324de7f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/providers/Microsoft.Relay\",\r\n \"namespace\": \"Microsoft.Relay\",\r\n \"authorization\": {\r\n \"applicationId\": \"80369ed6-5f11-4dd9-bef3-692475845e77\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"namespaces\",\r\n \"locations\": [\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Brazil South\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2016-07-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2016-07-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2016-07-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:53:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-request-id": [ + "e73db471-f3fa-4796-a219-6baaa0a90d2e" + ], + "x-ms-correlation-request-id": [ + "e73db471-f3fa-4796-a219-6baaa0a90d2e" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025301Z:e73db471-f3fa-4796-a219-6baaa0a90d2e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourcegroups?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlZ3JvdXBzP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "300c9394-00a0-4f97-a22d-bcf37aaa0a3d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-EventHub-SouthCentralUS\",\r\n \"name\": \"Default-EventHub-SouthCentralUS\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-MachineLearning-SouthCentralUS\",\r\n \"name\": \"Default-MachineLearning-SouthCentralUS\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Networking\",\r\n \"name\": \"Default-Networking\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast\",\r\n \"name\": \"Default-NotificationHubs-AustraliaEast\",\r\n \"location\": \"australiaeast\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-CentralUS\",\r\n \"name\": \"Default-NotificationHubs-CentralUS\",\r\n \"location\": \"centralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS\",\r\n \"name\": \"Default-ServiceBus-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-SQL-WestUS\",\r\n \"name\": \"Default-SQL-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-CentralUS\",\r\n \"name\": \"Default-Storage-CentralUS\",\r\n \"location\": \"centralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-EastAsia\",\r\n \"name\": \"Default-Storage-EastAsia\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-SouthCentralUS\",\r\n \"name\": \"Default-Storage-SouthCentralUS\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-WestUS\",\r\n \"name\": \"Default-Storage-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Web-WestUS\",\r\n \"name\": \"Default-Web-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-APPHOST\",\r\n \"name\": \"DL-SB-APPHOST\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-DS1\",\r\n \"name\": \"DL-SB-DS1\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-DS2\",\r\n \"name\": \"DL-SB-DS2\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-ECA\",\r\n \"name\": \"DL-SB-ECA\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-FILE\",\r\n \"name\": \"DL-SB-FILE\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/dl-sb-TSG\",\r\n \"name\": \"dl-sb-TSG\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Mobile-Default-Web-WestUS\",\r\n \"name\": \"Mobile-Default-Web-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:53:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-request-id": [ + "46768246-c437-493b-a8f5-bdcf188db119" + ], + "x-ms-correlation-request-id": [ + "46768246-c437-493b-a8f5-bdcf188db119" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025301Z:46768246-c437-493b-a8f5-bdcf188db119" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/providers/Microsoft.Relay/CheckNameAvailability?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvQ2hlY2tOYW1lQXZhaWxhYmlsaXR5P2FwaS12ZXJzaW9uPTIwMTYtMDctMDE=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"name\": \"sdk-RelayNamespace-2713\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "41" + ], + "x-ms-client-request-id": [ + "3370ed5d-85e1-4941-a2e4-4b46ee5cbcf4" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": \"None\",\r\n \"message\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:53:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "74e9db60-99d5-4ff0-ac0e-3a0272ce7da9_M1_M1" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1191" + ], + "x-ms-correlation-request-id": [ + "9c70bb2f-edd7-4440-b88e-27b1825d8f40" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025302Z:9c70bb2f-edd7-4440-b88e-27b1825d8f40" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/providers/Microsoft.Relay/CheckNameAvailability?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvQ2hlY2tOYW1lQXZhaWxhYmlsaXR5P2FwaS12ZXJzaW9uPTIwMTYtMDctMDE=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"name\": \"sdk-RelayNamespace-2713\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "41" + ], + "x-ms-client-request-id": [ + "bcf7632c-0de1-459e-8fd5-6c05b2bb6bd3" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"nameAvailable\": false,\r\n \"reason\": \"NameInUse\",\r\n \"message\": \"The specified service namespace is not available.\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:53:44 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "28ff6a2b-b76e-4817-b01c-dab073b75764_M1_M1" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1189" + ], + "x-ms-correlation-request-id": [ + "bec87329-ad23-498f-816b-8af17aab47ba" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025344Z:bec87329-ad23-498f-816b-8af17aab47ba" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/providers/Microsoft.Relay/CheckNameAvailability?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvQ2hlY2tOYW1lQXZhaWxhYmlsaXR5P2FwaS12ZXJzaW9uPTIwMTYtMDctMDE=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"name\": \"12@\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "21" + ], + "x-ms-client-request-id": [ + "03723d90-1bdd-40e5-811b-b9842d87e630" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"nameAvailable\": false,\r\n \"reason\": \"InvalidName\",\r\n \"message\": \"The specified service namespace is invalid.\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:53:44 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "8b7f9515-899e-4e1b-b807-b0550e3ccf32_M1_M1" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1188" + ], + "x-ms-correlation-request-id": [ + "8c920ff6-39c1-4984-a91e-57a9187a40b2" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025344Z:8c920ff6-39c1-4984-a91e-57a9187a40b2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2713?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjcxMz9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"location\": \"Australia East\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "167" + ], + "x-ms-client-request-id": [ + "d37e5725-5189-47bd-be22-8256645b0455" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2713\",\r\n \"name\": \"sdk-RelayNamespace-2713\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Unknown\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-2713\",\r\n \"enabled\": false,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:53:09 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "807b1423-7d5f-417c-8281-c0c6865e67bd_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1190" + ], + "x-ms-correlation-request-id": [ + "b779d939-3aed-4f25-807d-69504001cf3c" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025309Z:b779d939-3aed-4f25-807d-69504001cf3c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2713?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjcxMz9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2713\",\r\n \"name\": \"sdk-RelayNamespace-2713\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-2713\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:53:07.49Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-2713.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:53:33.94Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:53:39 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "39eaf965-7fd2-4e4e-a6e1-d52462a9d7d9_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "1c87365c-264d-4551-b1c0-1aaab0345e64" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025339Z:1c87365c-264d-4551-b1c0-1aaab0345e64" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2713?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjcxMz9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "21b47274-18a4-4fb4-bd28-9b900368cb07" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:53:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2713/operationresults/sdk-RelayNamespace-2713?api-version=2016-07-01" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "d9b796dc-4d00-41cb-b949-a3dd598e2c97_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1187" + ], + "x-ms-correlation-request-id": [ + "c41f1f44-6f85-4703-8f18-d42f2383364c" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025345Z:c41f1f44-6f85-4703-8f18-d42f2383364c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2713/operationresults/sdk-RelayNamespace-2713?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjcxMy9vcGVyYXRpb25yZXN1bHRzL3Nkay1SZWxheU5hbWVzcGFjZS0yNzEzP2FwaS12ZXJzaW9uPTIwMTYtMDctMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:54:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "fbe1b943-f4fe-41e5-bfc1-9996cbe9119a_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "1092f3b2-cfdb-45f0-9790-855e1d75b8fb" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025415Z:1092f3b2-cfdb-45f0-9790-855e1d75b8fb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "CheckNameAvailability": [ + "sdk-RelayNamespace-2713" + ] + }, + "Variables": { + "SubscriptionId": "e2f361f0-3b27-4503-a9cc-21cfba380093" + } +} \ No newline at end of file diff --git a/src/ResourceManagement/Relay/Relay.Tests/SessionRecords/Relay.Tests.ScenarioTests.ScenarioTests/HybridConnectionsCreateGetUpdateDelete.json b/src/ResourceManagement/Relay/Relay.Tests/SessionRecords/Relay.Tests.ScenarioTests.ScenarioTests/HybridConnectionsCreateGetUpdateDelete.json new file mode 100644 index 000000000000..378e2bc3be8f --- /dev/null +++ b/src/ResourceManagement/Relay/Relay.Tests/SessionRecords/Relay.Tests.ScenarioTests.ScenarioTests/HybridConnectionsCreateGetUpdateDelete.json @@ -0,0 +1,1095 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/providers/Microsoft.Relay?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXk/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5fe26bd7-bcbb-41ae-b65d-ab139b2a6a25" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/providers/Microsoft.Relay\",\r\n \"namespace\": \"Microsoft.Relay\",\r\n \"authorization\": {\r\n \"applicationId\": \"80369ed6-5f11-4dd9-bef3-692475845e77\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"namespaces\",\r\n \"locations\": [\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Brazil South\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2016-07-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2016-07-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2016-07-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:47:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-request-id": [ + "9de66202-a3c5-4613-b05c-8a4fcd7e7915" + ], + "x-ms-correlation-request-id": [ + "9de66202-a3c5-4613-b05c-8a4fcd7e7915" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024712Z:9de66202-a3c5-4613-b05c-8a4fcd7e7915" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourcegroups?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlZ3JvdXBzP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1e47d5e6-b636-4733-a6f5-a3846e533868" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-EventHub-SouthCentralUS\",\r\n \"name\": \"Default-EventHub-SouthCentralUS\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-MachineLearning-SouthCentralUS\",\r\n \"name\": \"Default-MachineLearning-SouthCentralUS\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Networking\",\r\n \"name\": \"Default-Networking\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast\",\r\n \"name\": \"Default-NotificationHubs-AustraliaEast\",\r\n \"location\": \"australiaeast\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-CentralUS\",\r\n \"name\": \"Default-NotificationHubs-CentralUS\",\r\n \"location\": \"centralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS\",\r\n \"name\": \"Default-ServiceBus-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-SQL-WestUS\",\r\n \"name\": \"Default-SQL-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-CentralUS\",\r\n \"name\": \"Default-Storage-CentralUS\",\r\n \"location\": \"centralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-EastAsia\",\r\n \"name\": \"Default-Storage-EastAsia\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-SouthCentralUS\",\r\n \"name\": \"Default-Storage-SouthCentralUS\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-WestUS\",\r\n \"name\": \"Default-Storage-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Web-WestUS\",\r\n \"name\": \"Default-Web-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-APPHOST\",\r\n \"name\": \"DL-SB-APPHOST\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-DS1\",\r\n \"name\": \"DL-SB-DS1\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-DS2\",\r\n \"name\": \"DL-SB-DS2\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-ECA\",\r\n \"name\": \"DL-SB-ECA\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-FILE\",\r\n \"name\": \"DL-SB-FILE\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/dl-sb-TSG\",\r\n \"name\": \"dl-sb-TSG\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Mobile-Default-Web-WestUS\",\r\n \"name\": \"Mobile-Default-Web-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:47:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-request-id": [ + "1a6cfdb4-910e-4002-aa1b-0fca50567c3e" + ], + "x-ms-correlation-request-id": [ + "1a6cfdb4-910e-4002-aa1b-0fca50567c3e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024712Z:1a6cfdb4-910e-4002-aa1b-0fca50567c3e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/providers/Microsoft.Relay/operations?api-version=2016-07-01", + "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvb3BlcmF0aW9ucz9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0a7ac202-8862-4bcc-ad88-93987b18fefb" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": \"Microsoft.Relay/checkNamespaceAvailability/action\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"Non Resource Operation\",\r\n \"operation\": \"Get namespace availability.\",\r\n \"description\": \"Checks availability of namespace under given subscription.\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/register/action\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"Relay and Hybridconnection Resource Provider\",\r\n \"operation\": \"Registers the Relay Resource Provider\",\r\n \"description\": \"Registers the subscription for the Relay resource provider and enables the creation of Relay resources\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/write\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"Namespace\",\r\n \"operation\": \"Create Or Update Namespace \",\r\n \"description\": \"Create a Namespace Resource and Update its properties. Tags and status of the Namespace are the properties which can be updated.\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"Namespace\",\r\n \"operation\": \"Get Namespace Resource\",\r\n \"description\": \"Get the list of Namespace Resource Description\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/Delete\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"Namespace\",\r\n \"operation\": \"Delete Namespace\",\r\n \"description\": \"Delete Namespace Resource\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/authorizationRules/write\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"AuthorizationRules\",\r\n \"operation\": \"Create or Update Namespace Authorization Rules\",\r\n \"description\": \"Create a Namespace level Authorization Rules and update its properties. The Authorization Rules Access Rights, the Primary and Secondary Keys can be updated.\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/authorizationRules/delete\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"AuthorizationRules\",\r\n \"operation\": \"Delete Namespace Authorization Rule\",\r\n \"description\": \"Delete Namespace Authorization Rule. The Default Namespace Authorization Rule cannot be deleted. \"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/authorizationRules/listkeys/action\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"AuthorizationRules\",\r\n \"operation\": \"Get Namespace Listkeys\",\r\n \"description\": \"Get the Connection String to the Namespace\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/HybridConnections/write\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"HybridConnection\",\r\n \"operation\": \"Create or Update HybridConnection\",\r\n \"description\": \"Create or Update HybridConnection properties.\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/HybridConnections/read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"HybridConnection\",\r\n \"operation\": \"Get HybridConnection\",\r\n \"description\": \"Get list of HybridConnection Resource Descriptions\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/HybridConnections/Delete\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"HybridConnection\",\r\n \"operation\": \"Delete HybridConnection\",\r\n \"description\": \"Operation to delete HybridConnection Resource\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/HybridConnections/authorizationRules/write\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"HybridConnection AuthorizationRules\",\r\n \"operation\": \"Create or Update HybridConnection Authorization Rule\",\r\n \"description\": \"Create HybridConnection Authorization Rules and Update its properties. The Authorization Rules Access Rights, the Primary and Secondary Keys can be updated.\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/HybridConnections/authorizationRules/delete\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"HybridConnection AuthorizationRules\",\r\n \"operation\": \"Delete HybridConnection Authorization Rules\",\r\n \"description\": \"Operation to delete HybridConnection Authorization Rules\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/HybridConnections/authorizationRules/listkeys/action\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"HybridConnection AuthorizationRules\",\r\n \"operation\": \"List HybridConnection keys\",\r\n \"description\": \"Get the Connection String to HybridConnection\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/WcfRelays/write\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"WcfRelay\",\r\n \"operation\": \"Create or Update WcfRelay\",\r\n \"description\": \"Create or Update WcfRelay properties.\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/WcfRelays/read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"WcfRelay\",\r\n \"operation\": \"Get WcfRelay\",\r\n \"description\": \"Get list of WcfRelay Resource Descriptions\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/WcfRelays/Delete\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"WcfRelay\",\r\n \"operation\": \"Delete WcfRelay\",\r\n \"description\": \"Operation to delete WcfRelay Resource\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/WcfRelays/authorizationRules/write\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"WcfRelay AuthorizationRules\",\r\n \"operation\": \"Create or Update WcfRelay Authorization Rule\",\r\n \"description\": \"Create WcfRelay Authorization Rules and Update its properties. The Authorization Rules Access Rights, the Primary and Secondary Keys can be updated.\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/WcfRelays/authorizationRules/delete\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"WcfRelay AuthorizationRules\",\r\n \"operation\": \"Delete WcfRelay Authorization Rules\",\r\n \"description\": \"Operation to delete WcfRelay Authorization Rules\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/WcfRelays/authorizationRules/listkeys/action\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"WcfRelay AuthorizationRules\",\r\n \"operation\": \"List WcfRelay keys\",\r\n \"description\": \"Get the Connection String to WcfRelay\"\r\n },\r\n \"properties\": null\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:47:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9ec66b8a-1795-4dc2-9df8-697e39450541_M3_M3" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-tenant-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "e7a82e67-9a17-49de-92ad-d1edf42213e3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024713Z:e7a82e67-9a17-49de-92ad-d1edf42213e3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/providers/Microsoft.Relay/CheckNameAvailability?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvQ2hlY2tOYW1lQXZhaWxhYmlsaXR5P2FwaS12ZXJzaW9uPTIwMTYtMDctMDE=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"name\": \"sdk-RelayNamespace-8307\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "41" + ], + "x-ms-client-request-id": [ + "0691554d-b27f-4886-b45c-5e9bba378240" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": \"None\",\r\n \"message\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:47:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "30b0582a-74c5-4ba9-beb1-723ce53288b5_M4_M4" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "8d55a594-4248-4cf6-8acb-c2f6d07ae864" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024713Z:8d55a594-4248-4cf6-8acb-c2f6d07ae864" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8307?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtODMwNz9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"location\": \"Australia East\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "167" + ], + "x-ms-client-request-id": [ + "20a7c05a-e8d8-46b8-a50b-c4499b546588" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8307\",\r\n \"name\": \"sdk-RelayNamespace-8307\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Unknown\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-8307\",\r\n \"enabled\": false,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:47:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "13de4b93-fbd1-4c2b-a368-3889468de795_M6_M6" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "f12388a9-10f8-401e-b38c-45dfe02ba102" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024718Z:f12388a9-10f8-401e-b38c-45dfe02ba102" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8307?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtODMwNz9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8307\",\r\n \"name\": \"sdk-RelayNamespace-8307\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-8307\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:47:16.517Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-8307.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:47:40.297Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:47:48 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "08310519-4d17-4efa-aaec-1c457f0afb49_M6_M6" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "45719905-fded-4f7a-a138-e66ed131bad6" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024748Z:45719905-fded-4f7a-a138-e66ed131bad6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8307?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtODMwNz9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "64f9706b-683b-4233-9d71-b028734d452f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8307\",\r\n \"name\": \"sdk-RelayNamespace-8307\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-8307\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:47:16.517Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-8307.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:47:40.297Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:47:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "cba011c9-23e3-45e7-aa57-d1224527b9c9_M6_M6" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "cca7c51e-3a09-4b11-a346-493bd2bcca26" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024753Z:cca7c51e-3a09-4b11-a346-493bd2bcca26" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8307?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtODMwNz9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "8f77b2b5-07ca-40a2-8ff3-44769f7b1329" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8307\",\r\n \"name\": \"sdk-RelayNamespace-8307\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-8307\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:47:16.517Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-8307.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:47:40.297Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:47:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "1e5808f9-bf21-4b5c-8d99-87a024aecca4_M6_M6" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "536f3b17-133f-4122-ab65-6dced591aa56" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024753Z:536f3b17-133f-4122-ab65-6dced591aa56" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/Namespaces?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvTmFtZXNwYWNlcz9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f1585b8e-4ad9-4367-af20-5e8d190f799b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/Namespaces/sdk-RelayNamespace-8307\",\r\n \"name\": \"sdk-RelayNamespace-8307\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-8307\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:47:16.517Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-8307.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:47:40.297Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:47:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "07fd304a-7e93-4f5a-9d1c-c18e60ada299_M6_M6" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "1faf7e58-fea2-41f9-85a1-8b3cdaa0a3d0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024753Z:1faf7e58-fea2-41f9-85a1-8b3cdaa0a3d0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/providers/Microsoft.Relay/Namespaces?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvTmFtZXNwYWNlcz9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "447f4b19-e506-4800-8d91-3497ef3eba7e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8307\",\r\n \"name\": \"sdk-RelayNamespace-8307\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-8307\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:47:16.517Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-8307.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:47:40.297Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9752\",\r\n \"name\": \"sdk-RelayNamespace-9752\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-9752\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-02-01T23:31:43.867Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-9752.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-02-01T23:32:07.607Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-1598\",\r\n \"name\": \"sdk-RelayNamespace-1598\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-1598\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-23T23:00:15.143Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-1598.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-23T23:00:39.343Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-6656\",\r\n \"name\": \"sdk-RelayNamespace-6656\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-6656\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-23T22:28:18.913Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-6656.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-23T22:28:43.253Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-6342\",\r\n \"name\": \"sdk-RelayNamespace-6342\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-6342\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-23T22:14:33.343Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-6342.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-23T22:14:57.813Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8028\",\r\n \"name\": \"sdk-RelayNamespace-8028\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-8028\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-02-01T21:52:25.363Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-8028.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-02-01T21:52:49.31Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-344\",\r\n \"name\": \"sdk-RelayNamespace-344\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-344\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-23T23:02:05.46Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-344.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-23T23:02:31.657Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-342\",\r\n \"name\": \"sdk-RelayNamespace-342\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-342\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-02-01T19:50:31.173Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-342.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-02-01T19:50:55.293Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-7456\",\r\n \"name\": \"sdk-RelayNamespace-7456\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-7456\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-02-01T22:23:31.02Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-7456.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-02-01T22:23:53.837Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-4953\",\r\n \"name\": \"sdk-RelayNamespace-4953\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-4953\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-02-01T23:37:57.54Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-4953.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-02-01T23:38:21.573Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-6847\",\r\n \"name\": \"sdk-RelayNamespace-6847\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-6847\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-09T20:14:39.793Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-6847.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-09T20:15:46.717Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-257\",\r\n \"name\": \"sdk-RelayNamespace-257\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-257\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-23T21:16:07.71Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-257.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-23T21:16:32.18Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/Test-Realy\",\r\n \"name\": \"Test-Realy\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:test-realy\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-01-18T01:53:45.86Z\",\r\n \"serviceBusEndpoint\": \"https://Test-Realy.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-01-18T01:54:09.757Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2372\",\r\n \"name\": \"sdk-RelayNamespace-2372\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-2372\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-23T19:35:03.913Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-2372.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-23T19:35:26.2Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:47:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b829072f-237c-4b4e-b712-05537669d96a_M6_M6" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "c88cd6e8-041c-49c0-854b-7fc99246661e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024753Z:c88cd6e8-041c-49c0-854b-7fc99246661e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8307/HybridConnections/sdk-Relay-Hybrid-7100?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtODMwNy9IeWJyaWRDb25uZWN0aW9ucy9zZGstUmVsYXktSHlicmlkLTcxMDA/YXBpLXZlcnNpb249MjAxNi0wNy0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"requiresClientAuthorization\": true\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "69" + ], + "x-ms-client-request-id": [ + "3efb2e81-2489-469e-9918-4476e2b937af" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8307/HybridConnections/sdk-Relay-Hybrid-7100\",\r\n \"name\": \"sdk-Relay-Hybrid-7100\",\r\n \"type\": \"Microsoft.Relay/HybridConnections\",\r\n \"location\": \"Australia East\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"path\": \"\",\r\n \"createdAt\": \"2017-03-30T02:47:56.0829851Z\",\r\n \"updatedAt\": \"2017-03-30T02:47:56.0829851Z\",\r\n \"requiresClientAuthorization\": true\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:47:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "abd29b19-bbd4-4f7e-a59c-a2d5b3a895e9_M6_M6" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "15d5fe81-848e-4dc5-8113-4ace768f3bde" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024756Z:15d5fe81-848e-4dc5-8113-4ace768f3bde" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8307/HybridConnections/sdk-Relay-Hybrid-7100?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtODMwNy9IeWJyaWRDb25uZWN0aW9ucy9zZGstUmVsYXktSHlicmlkLTcxMDA/YXBpLXZlcnNpb249MjAxNi0wNy0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"createdAt\": \"2017-03-30T02:47:56.0829851Z\",\r\n \"updatedAt\": \"2017-03-30T02:47:56.0829851Z\",\r\n \"requiresClientAuthorization\": true,\r\n \"userMetadata\": \"usermetadata is a placeholder to store user-defined string data for the HybridConnection endpoint.e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.\"\r\n },\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8307/HybridConnections/sdk-Relay-Hybrid-7100\",\r\n \"name\": \"sdk-Relay-Hybrid-7100\",\r\n \"type\": \"Microsoft.Relay/HybridConnections\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "750" + ], + "x-ms-client-request-id": [ + "3d108f89-cc1c-4416-ae5d-ea9b9291f34c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8307/HybridConnections/sdk-Relay-Hybrid-7100\",\r\n \"name\": \"sdk-Relay-Hybrid-7100\",\r\n \"type\": \"Microsoft.Relay/HybridConnections\",\r\n \"location\": \"Australia East\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"path\": \"\",\r\n \"createdAt\": \"2017-03-30T02:47:56.0829851Z\",\r\n \"updatedAt\": \"2017-03-30T02:47:56.0829851Z\",\r\n \"requiresClientAuthorization\": true,\r\n \"userMetadata\": \"usermetadata is a placeholder to store user-defined string data for the HybridConnection endpoint.e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:47:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "955b7476-7d19-4d7f-9992-00dc94f4cec9_M6_M6" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "f85116bd-df6e-49a2-bba0-dd825db9b0b6" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024758Z:f85116bd-df6e-49a2-bba0-dd825db9b0b6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8307/HybridConnections/sdk-Relay-Hybrid-7100?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtODMwNy9IeWJyaWRDb25uZWN0aW9ucy9zZGstUmVsYXktSHlicmlkLTcxMDA/YXBpLXZlcnNpb249MjAxNi0wNy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6ac89fa5-6f46-49b3-a5c3-4d068d421ddb" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8307/HybridConnections/sdk-Relay-Hybrid-7100\",\r\n \"name\": \"sdk-Relay-Hybrid-7100\",\r\n \"type\": \"Microsoft.Relay/HybridConnections\",\r\n \"location\": \"Australia East\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"path\": \"\",\r\n \"createdAt\": \"2017-03-30T02:47:56.0829851Z\",\r\n \"updatedAt\": \"2017-03-30T02:47:56.0829851Z\",\r\n \"requiresClientAuthorization\": true,\r\n \"listenerCount\": 0\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:47:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "99f84011-ec03-4ddf-96ce-870ec364708a_M6_M6" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "873d475c-b47f-4d2a-aaa6-f1d44040b55a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024757Z:873d475c-b47f-4d2a-aaa6-f1d44040b55a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8307/HybridConnections?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtODMwNy9IeWJyaWRDb25uZWN0aW9ucz9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6898c0c9-4a15-466c-a8e0-ffb17ec096b4" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8307/HybridConnections/sdk-relay-hybrid-7100\",\r\n \"name\": \"sdk-relay-hybrid-7100\",\r\n \"type\": \"Microsoft.Relay/HybridConnections\",\r\n \"location\": \"Australia East\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"path\": \"\",\r\n \"createdAt\": \"2017-03-30T02:47:56.0829851Z\",\r\n \"updatedAt\": \"2017-03-30T02:47:57.9187417Z\",\r\n \"requiresClientAuthorization\": true,\r\n \"userMetadata\": \"usermetadata is a placeholder to store user-defined string data for the HybridConnection endpoint.e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.\",\r\n \"listenerCount\": 0\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:47:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ed3b3316-0321-47b2-82ff-69df1fa0fedf_M6_M6" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "c349e0c6-f200-4b80-bace-86e9acee3176" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024758Z:c349e0c6-f200-4b80-bace-86e9acee3176" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8307/HybridConnections/sdk-Relay-Hybrid-7100?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtODMwNy9IeWJyaWRDb25uZWN0aW9ucy9zZGstUmVsYXktSHlicmlkLTcxMDA/YXBpLXZlcnNpb249MjAxNi0wNy0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "45a23834-714b-41f8-9d68-5ed8584d2d77" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:47:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-request-id": [ + "f0bb5248-3864-45c6-9ed2-cb83c31d6785" + ], + "x-ms-correlation-request-id": [ + "f0bb5248-3864-45c6-9ed2-cb83c31d6785" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024759Z:f0bb5248-3864-45c6-9ed2-cb83c31d6785" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8307?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtODMwNz9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2d466f82-2c52-4ec0-bd63-327c51676f40" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:47:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8307/operationresults/sdk-RelayNamespace-8307?api-version=2016-07-01" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "df1e79ee-cacd-43d5-ae52-d9a3e48cf47d_M6_M6" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "1774047c-3d36-4265-8e95-3d7f7119988a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024800Z:1774047c-3d36-4265-8e95-3d7f7119988a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8307/operationresults/sdk-RelayNamespace-8307?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtODMwNy9vcGVyYXRpb25yZXN1bHRzL3Nkay1SZWxheU5hbWVzcGFjZS04MzA3P2FwaS12ZXJzaW9uPTIwMTYtMDctMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:48:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "9fb27437-f80b-424b-a9ea-9b65edeed004_M6_M6" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "831e026f-25ae-4585-933e-8b2654790266" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024830Z:831e026f-25ae-4585-933e-8b2654790266" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "HybridConnectionsCreateGetUpdateDelete": [ + "sdk-RelayNamespace-8307", + "sdk-Relay-Hybrid-7100" + ] + }, + "Variables": { + "SubscriptionId": "e2f361f0-3b27-4503-a9cc-21cfba380093" + } +} \ No newline at end of file diff --git a/src/ResourceManagement/Relay/Relay.Tests/SessionRecords/Relay.Tests.ScenarioTests.ScenarioTests/HybridConnectionsCreateGetUpdateDeleteAuthorizationRules.json b/src/ResourceManagement/Relay/Relay.Tests/SessionRecords/Relay.Tests.ScenarioTests.ScenarioTests/HybridConnectionsCreateGetUpdateDeleteAuthorizationRules.json new file mode 100644 index 000000000000..d7972e01c71c --- /dev/null +++ b/src/ResourceManagement/Relay/Relay.Tests/SessionRecords/Relay.Tests.ScenarioTests.ScenarioTests/HybridConnectionsCreateGetUpdateDeleteAuthorizationRules.json @@ -0,0 +1,1500 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/providers/Microsoft.Relay?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXk/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "8e090e24-d4c3-4c0f-8d6a-73371295516e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/providers/Microsoft.Relay\",\r\n \"namespace\": \"Microsoft.Relay\",\r\n \"authorization\": {\r\n \"applicationId\": \"80369ed6-5f11-4dd9-bef3-692475845e77\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"namespaces\",\r\n \"locations\": [\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Brazil South\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2016-07-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2016-07-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2016-07-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:45:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-request-id": [ + "64b947ed-78fb-4356-be32-ce714e627a28" + ], + "x-ms-correlation-request-id": [ + "64b947ed-78fb-4356-be32-ce714e627a28" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024532Z:64b947ed-78fb-4356-be32-ce714e627a28" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourcegroups?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlZ3JvdXBzP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1017c3cb-d15b-4c70-a90a-738041b3e3dc" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-EventHub-SouthCentralUS\",\r\n \"name\": \"Default-EventHub-SouthCentralUS\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-MachineLearning-SouthCentralUS\",\r\n \"name\": \"Default-MachineLearning-SouthCentralUS\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Networking\",\r\n \"name\": \"Default-Networking\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast\",\r\n \"name\": \"Default-NotificationHubs-AustraliaEast\",\r\n \"location\": \"australiaeast\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-CentralUS\",\r\n \"name\": \"Default-NotificationHubs-CentralUS\",\r\n \"location\": \"centralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS\",\r\n \"name\": \"Default-ServiceBus-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-SQL-WestUS\",\r\n \"name\": \"Default-SQL-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-CentralUS\",\r\n \"name\": \"Default-Storage-CentralUS\",\r\n \"location\": \"centralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-EastAsia\",\r\n \"name\": \"Default-Storage-EastAsia\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-SouthCentralUS\",\r\n \"name\": \"Default-Storage-SouthCentralUS\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-WestUS\",\r\n \"name\": \"Default-Storage-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Web-WestUS\",\r\n \"name\": \"Default-Web-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-APPHOST\",\r\n \"name\": \"DL-SB-APPHOST\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-DS1\",\r\n \"name\": \"DL-SB-DS1\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-DS2\",\r\n \"name\": \"DL-SB-DS2\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-ECA\",\r\n \"name\": \"DL-SB-ECA\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-FILE\",\r\n \"name\": \"DL-SB-FILE\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/dl-sb-TSG\",\r\n \"name\": \"dl-sb-TSG\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Mobile-Default-Web-WestUS\",\r\n \"name\": \"Mobile-Default-Web-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:45:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-request-id": [ + "d94b2fb3-e752-4ba7-85c1-2d4bea12e163" + ], + "x-ms-correlation-request-id": [ + "d94b2fb3-e752-4ba7-85c1-2d4bea12e163" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024532Z:d94b2fb3-e752-4ba7-85c1-2d4bea12e163" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtOTc3OD9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"location\": \"Australia East\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "167" + ], + "x-ms-client-request-id": [ + "12f2bbf7-1485-4674-9cbe-67fcbc4fe878" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778\",\r\n \"name\": \"sdk-RelayNamespace-9778\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Unknown\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-9778\",\r\n \"enabled\": false,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:45:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "16a8f8df-b824-48b3-892c-d17f040e1e77_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "ff3204d1-aa6f-4c3a-9ee7-012b896565be" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024537Z:ff3204d1-aa6f-4c3a-9ee7-012b896565be" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtOTc3OD9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778\",\r\n \"name\": \"sdk-RelayNamespace-9778\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-9778\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:45:35.953Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-9778.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:46:01.933Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:46:07 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7e438cc2-afa9-4eb0-bec2-cf29575ee216_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "d23e573e-233f-494a-9eab-c761be619093" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024607Z:d23e573e-233f-494a-9eab-c761be619093" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtOTc3OD9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ff6a91fd-4820-45df-aac0-9e45ce26c505" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778\",\r\n \"name\": \"sdk-RelayNamespace-9778\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-9778\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:45:35.953Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-9778.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:46:01.933Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:46:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "562e9517-ce8a-4200-8f17-a3ba7c1fa46e_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "45466df5-5981-4cbe-a5e8-e0354e65121c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024613Z:45466df5-5981-4cbe-a5e8-e0354e65121c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtOTc3OD9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "71589989-329e-4942-8bc0-dedd9f5556e5" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778\",\r\n \"name\": \"sdk-RelayNamespace-9778\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-9778\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:45:35.953Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-9778.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:46:01.933Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:46:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "1968da74-f290-42b7-b608-a96c4601583b_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "17163c4c-448c-4867-bf20-66eb490888b0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024613Z:17163c4c-448c-4867-bf20-66eb490888b0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/Namespaces?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvTmFtZXNwYWNlcz9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d32a8fb4-f692-4818-acd9-49be087de399" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/Namespaces/sdk-RelayNamespace-9778\",\r\n \"name\": \"sdk-RelayNamespace-9778\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-9778\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:45:35.953Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-9778.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:46:01.933Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:46:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "416ba0f0-5a24-4796-afae-1b9909879698_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "63bd0d8a-130f-4d88-97b3-89536afd2a4e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024613Z:63bd0d8a-130f-4d88-97b3-89536afd2a4e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/providers/Microsoft.Relay/Namespaces?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvTmFtZXNwYWNlcz9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0a3768d9-fac6-426e-b37e-d13af8f16f94" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9752\",\r\n \"name\": \"sdk-RelayNamespace-9752\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-9752\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-02-01T23:31:43.867Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-9752.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-02-01T23:32:07.607Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-1598\",\r\n \"name\": \"sdk-RelayNamespace-1598\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-1598\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-23T23:00:15.143Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-1598.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-23T23:00:39.343Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-6656\",\r\n \"name\": \"sdk-RelayNamespace-6656\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-6656\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-23T22:28:18.913Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-6656.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-23T22:28:43.253Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-6342\",\r\n \"name\": \"sdk-RelayNamespace-6342\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-6342\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-23T22:14:33.343Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-6342.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-23T22:14:57.813Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8028\",\r\n \"name\": \"sdk-RelayNamespace-8028\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-8028\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-02-01T21:52:25.363Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-8028.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-02-01T21:52:49.31Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-344\",\r\n \"name\": \"sdk-RelayNamespace-344\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-344\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-23T23:02:05.46Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-344.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-23T23:02:31.657Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-342\",\r\n \"name\": \"sdk-RelayNamespace-342\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-342\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-02-01T19:50:31.173Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-342.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-02-01T19:50:55.293Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-7456\",\r\n \"name\": \"sdk-RelayNamespace-7456\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-7456\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-02-01T22:23:31.02Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-7456.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-02-01T22:23:53.837Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-4953\",\r\n \"name\": \"sdk-RelayNamespace-4953\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-4953\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-02-01T23:37:57.54Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-4953.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-02-01T23:38:21.573Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-6847\",\r\n \"name\": \"sdk-RelayNamespace-6847\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-6847\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-09T20:14:39.793Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-6847.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-09T20:15:46.717Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-257\",\r\n \"name\": \"sdk-RelayNamespace-257\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-257\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-23T21:16:07.71Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-257.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-23T21:16:32.18Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/Test-Realy\",\r\n \"name\": \"Test-Realy\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:test-realy\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-01-18T01:53:45.86Z\",\r\n \"serviceBusEndpoint\": \"https://Test-Realy.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-01-18T01:54:09.757Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2372\",\r\n \"name\": \"sdk-RelayNamespace-2372\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-2372\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-23T19:35:03.913Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-2372.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-23T19:35:26.2Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778\",\r\n \"name\": \"sdk-RelayNamespace-9778\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-9778\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:45:35.953Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-9778.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:46:01.933Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:46:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f5f19103-9036-4242-989a-b74fe1640d0e_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "4ce26f87-2519-4534-baba-4715434e76ba" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024613Z:4ce26f87-2519-4534-baba-4715434e76ba" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778/HybridConnections/sdk-Relay-Hybrid-2980?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtOTc3OC9IeWJyaWRDb25uZWN0aW9ucy9zZGstUmVsYXktSHlicmlkLTI5ODA/YXBpLXZlcnNpb249MjAxNi0wNy0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"requiresClientAuthorization\": true\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "69" + ], + "x-ms-client-request-id": [ + "627790fd-7444-4002-9720-819ac756aac7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778/HybridConnections/sdk-Relay-Hybrid-2980\",\r\n \"name\": \"sdk-Relay-Hybrid-2980\",\r\n \"type\": \"Microsoft.Relay/HybridConnections\",\r\n \"location\": \"Australia East\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"path\": \"\",\r\n \"createdAt\": \"2017-03-30T02:46:16.1993821Z\",\r\n \"updatedAt\": \"2017-03-30T02:46:16.1993821Z\",\r\n \"requiresClientAuthorization\": true\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:46:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "64def142-8aae-43af-88c5-e72d98fd8d09_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "c6b29bd8-0460-4aba-9422-04e6ca7c2dd5" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024616Z:c6b29bd8-0460-4aba-9422-04e6ca7c2dd5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778/HybridConnections/sdk-Relay-Hybrid-2980?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtOTc3OC9IeWJyaWRDb25uZWN0aW9ucy9zZGstUmVsYXktSHlicmlkLTI5ODA/YXBpLXZlcnNpb249MjAxNi0wNy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f3e343ca-6576-4afe-9175-7c89a3e8d020" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778/HybridConnections/sdk-Relay-Hybrid-2980\",\r\n \"name\": \"sdk-Relay-Hybrid-2980\",\r\n \"type\": \"Microsoft.Relay/HybridConnections\",\r\n \"location\": \"Australia East\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"path\": \"\",\r\n \"createdAt\": \"2017-03-30T02:46:16.1993821Z\",\r\n \"updatedAt\": \"2017-03-30T02:46:16.1993821Z\",\r\n \"requiresClientAuthorization\": true,\r\n \"listenerCount\": 0\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:46:16 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "0ee180c5-8849-411d-ba5b-0dadf233f1fd_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "c412fe0b-0831-4a36-aa2d-622342aec2ef" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024617Z:c412fe0b-0831-4a36-aa2d-622342aec2ef" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778/HybridConnections/sdk-Relay-Hybrid-2980/authorizationRules/sdk-RelayAuthRules-7073?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtOTc3OC9IeWJyaWRDb25uZWN0aW9ucy9zZGstUmVsYXktSHlicmlkLTI5ODAvYXV0aG9yaXphdGlvblJ1bGVzL3Nkay1SZWxheUF1dGhSdWxlcy03MDczP2FwaS12ZXJzaW9uPTIwMTYtMDctMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"rights\": [\r\n \"Listen\",\r\n \"Send\"\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "83" + ], + "x-ms-client-request-id": [ + "3208ec48-ef2a-4893-a51f-d454f4db549e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778/HybridConnections/sdk-Relay-Hybrid-2980/authorizationRules/sdk-RelayAuthRules-7073\",\r\n \"name\": \"sdk-RelayAuthRules-7073\",\r\n \"type\": \"Microsoft.Relay/AuthorizationRules\",\r\n \"location\": \"Australia East\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"rights\": [\r\n \"Listen\",\r\n \"Send\"\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:46:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b8971aaf-1f6b-42bd-bd65-67bf358d9605_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "af7490d6-15d2-48e9-8801-fc22e56796ff" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024623Z:af7490d6-15d2-48e9-8801-fc22e56796ff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778/HybridConnections/sdk-Relay-Hybrid-2980/authorizationRules/sdk-RelayAuthRules-7073?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtOTc3OC9IeWJyaWRDb25uZWN0aW9ucy9zZGstUmVsYXktSHlicmlkLTI5ODAvYXV0aG9yaXphdGlvblJ1bGVzL3Nkay1SZWxheUF1dGhSdWxlcy03MDczP2FwaS12ZXJzaW9uPTIwMTYtMDctMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"rights\": [\r\n \"Listen\",\r\n \"Send\"\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "83" + ], + "x-ms-client-request-id": [ + "0f4a0167-59a8-4687-9375-8d708196a4e1" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778/HybridConnections/sdk-Relay-Hybrid-2980/authorizationRules/sdk-RelayAuthRules-7073\",\r\n \"name\": \"sdk-RelayAuthRules-7073\",\r\n \"type\": \"Microsoft.Relay/AuthorizationRules\",\r\n \"location\": \"Australia East\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"rights\": [\r\n \"Listen\",\r\n \"Send\"\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:46:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "6ac8a03c-e2a1-421a-89b8-fd185d982c49_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "484904ec-ca83-47e7-bae3-56c5101e2d6d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024628Z:484904ec-ca83-47e7-bae3-56c5101e2d6d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778/HybridConnections/sdk-Relay-Hybrid-2980/authorizationRules/sdk-RelayAuthRules-7073?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtOTc3OC9IeWJyaWRDb25uZWN0aW9ucy9zZGstUmVsYXktSHlicmlkLTI5ODAvYXV0aG9yaXphdGlvblJ1bGVzL3Nkay1SZWxheUF1dGhSdWxlcy03MDczP2FwaS12ZXJzaW9uPTIwMTYtMDctMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"rights\": [\r\n \"Listen\"\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "68" + ], + "x-ms-client-request-id": [ + "bfd09e71-d5d5-4080-b6ff-c2bb32f5e089" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778/HybridConnections/sdk-Relay-Hybrid-2980/authorizationRules/sdk-RelayAuthRules-7073\",\r\n \"name\": \"sdk-RelayAuthRules-7073\",\r\n \"type\": \"Microsoft.Relay/AuthorizationRules\",\r\n \"location\": \"Australia East\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"rights\": [\r\n \"Listen\"\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:46:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e7808691-8999-465a-ae86-b8cd5e3e3dc9_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "c9b9f673-2e46-46ab-a0eb-139605f6fb7c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024635Z:c9b9f673-2e46-46ab-a0eb-139605f6fb7c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778/HybridConnections/sdk-Relay-Hybrid-2980/authorizationRules/sdk-RelayAuthRules-7073?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtOTc3OC9IeWJyaWRDb25uZWN0aW9ucy9zZGstUmVsYXktSHlicmlkLTI5ODAvYXV0aG9yaXphdGlvblJ1bGVzL3Nkay1SZWxheUF1dGhSdWxlcy03MDczP2FwaS12ZXJzaW9uPTIwMTYtMDctMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "942f3b0d-609d-4f61-a81b-da648c2bd110" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778/HybridConnections/sdk-Relay-Hybrid-2980/authorizationRules/sdk-RelayAuthRules-7073\",\r\n \"name\": \"sdk-RelayAuthRules-7073\",\r\n \"type\": \"Microsoft.Relay/AuthorizationRules\",\r\n \"location\": \"Australia East\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"rights\": [\r\n \"Listen\",\r\n \"Send\"\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:46:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b7126cc3-4d68-4379-b1a7-f165644cf2f5_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "d4a116f1-052f-4b3a-ae43-d2eec9742f58" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024629Z:d4a116f1-052f-4b3a-ae43-d2eec9742f58" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778/HybridConnections/sdk-Relay-Hybrid-2980/authorizationRules/sdk-RelayAuthRules-7073?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtOTc3OC9IeWJyaWRDb25uZWN0aW9ucy9zZGstUmVsYXktSHlicmlkLTI5ODAvYXV0aG9yaXphdGlvblJ1bGVzL3Nkay1SZWxheUF1dGhSdWxlcy03MDczP2FwaS12ZXJzaW9uPTIwMTYtMDctMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f20742bb-edaa-4654-b698-d9b2be3cd645" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778/HybridConnections/sdk-Relay-Hybrid-2980/authorizationRules/sdk-RelayAuthRules-7073\",\r\n \"name\": \"sdk-RelayAuthRules-7073\",\r\n \"type\": \"Microsoft.Relay/AuthorizationRules\",\r\n \"location\": \"Australia East\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"rights\": [\r\n \"Listen\"\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:46:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "cc41f121-63af-47a8-948d-e51c100cb408_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "b78e772d-eb64-4904-b4a2-33d6682a7a22" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024635Z:b78e772d-eb64-4904-b4a2-33d6682a7a22" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778/HybridConnections/sdk-Relay-Hybrid-2980/authorizationRules?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtOTc3OC9IeWJyaWRDb25uZWN0aW9ucy9zZGstUmVsYXktSHlicmlkLTI5ODAvYXV0aG9yaXphdGlvblJ1bGVzP2FwaS12ZXJzaW9uPTIwMTYtMDctMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "eff92aea-570b-400b-9060-e6d3dd863d1e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778/HybridConnections/sdk-Relay-Hybrid-2980/authorizationRules/sdk-RelayAuthRules-7073\",\r\n \"name\": \"sdk-RelayAuthRules-7073\",\r\n \"type\": \"Microsoft.Relay/AuthorizationRules\",\r\n \"location\": \"Australia East\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"rights\": [\r\n \"Listen\",\r\n \"Send\"\r\n ]\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:46:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "eb62e73b-cf85-455e-9912-55e55ed17226_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "6ffe0e76-0dff-4a76-b28f-f3bcfaccd2a9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024629Z:6ffe0e76-0dff-4a76-b28f-f3bcfaccd2a9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778/HybridConnections/sdk-Relay-Hybrid-2980/authorizationRules/sdk-RelayAuthRules-7073/ListKeys?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtOTc3OC9IeWJyaWRDb25uZWN0aW9ucy9zZGstUmVsYXktSHlicmlkLTI5ODAvYXV0aG9yaXphdGlvblJ1bGVzL3Nkay1SZWxheUF1dGhSdWxlcy03MDczL0xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTYtMDctMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "cb2b4028-ae6a-412c-98ea-c496262128b7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"primaryConnectionString\": \"Endpoint=sb://sdk-relaynamespace-9778.servicebus.windows.net/;SharedAccessKeyName=sdk-RelayAuthRules-7073;SharedAccessKey=xyEufujESAvWhGy5wzJl1DiSqxk14H7vZNVQUWEhSes=;EntityPath=sdk-Relay-Hybrid-2980\",\r\n \"secondaryConnectionString\": \"Endpoint=sb://sdk-relaynamespace-9778.servicebus.windows.net/;SharedAccessKeyName=sdk-RelayAuthRules-7073;SharedAccessKey=gW1OIzJSh5Apki7vSE1+oYPqK7GL/RxrKGddegTIwhY=;EntityPath=sdk-Relay-Hybrid-2980\",\r\n \"primaryKey\": \"xyEufujESAvWhGy5wzJl1DiSqxk14H7vZNVQUWEhSes=\",\r\n \"secondaryKey\": \"gW1OIzJSh5Apki7vSE1+oYPqK7GL/RxrKGddegTIwhY=\",\r\n \"keyName\": \"sdk-RelayAuthRules-7073\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:46:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "c3c1fe86-205b-460f-a705-b43b2145ff52_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "9a37b148-4a80-45b8-9b59-211cffc36426" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024636Z:9a37b148-4a80-45b8-9b59-211cffc36426" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778/HybridConnections/sdk-Relay-Hybrid-2980/authorizationRules/sdk-RelayAuthRules-7073/regenerateKeys?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtOTc3OC9IeWJyaWRDb25uZWN0aW9ucy9zZGstUmVsYXktSHlicmlkLTI5ODAvYXV0aG9yaXphdGlvblJ1bGVzL3Nkay1SZWxheUF1dGhSdWxlcy03MDczL3JlZ2VuZXJhdGVLZXlzP2FwaS12ZXJzaW9uPTIwMTYtMDctMDE=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"policyKey\": \"PrimaryKey\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "33" + ], + "x-ms-client-request-id": [ + "c4a3d50c-aa03-4e9d-9bbe-9e951e92dfaf" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"primaryConnectionString\": \"Endpoint=sb://sdk-relaynamespace-9778.servicebus.windows.net/;SharedAccessKeyName=sdk-RelayAuthRules-7073;SharedAccessKey=7MN0w8BnG4ARJ3vr6LjmDqtjQhMjy4fXpbRxqiejfA0=;EntityPath=sdk-Relay-Hybrid-2980\",\r\n \"secondaryConnectionString\": \"Endpoint=sb://sdk-relaynamespace-9778.servicebus.windows.net/;SharedAccessKeyName=sdk-RelayAuthRules-7073;SharedAccessKey=gW1OIzJSh5Apki7vSE1+oYPqK7GL/RxrKGddegTIwhY=;EntityPath=sdk-Relay-Hybrid-2980\",\r\n \"primaryKey\": \"7MN0w8BnG4ARJ3vr6LjmDqtjQhMjy4fXpbRxqiejfA0=\",\r\n \"secondaryKey\": \"gW1OIzJSh5Apki7vSE1+oYPqK7GL/RxrKGddegTIwhY=\",\r\n \"keyName\": \"sdk-RelayAuthRules-7073\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:46:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "138ee1e7-c509-4a0d-ab0a-8454d129df06_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-correlation-request-id": [ + "6257b201-86dd-46d5-8ea1-f3f52d189254" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024637Z:6257b201-86dd-46d5-8ea1-f3f52d189254" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778/HybridConnections/sdk-Relay-Hybrid-2980/authorizationRules/sdk-RelayAuthRules-7073/regenerateKeys?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtOTc3OC9IeWJyaWRDb25uZWN0aW9ucy9zZGstUmVsYXktSHlicmlkLTI5ODAvYXV0aG9yaXphdGlvblJ1bGVzL3Nkay1SZWxheUF1dGhSdWxlcy03MDczL3JlZ2VuZXJhdGVLZXlzP2FwaS12ZXJzaW9uPTIwMTYtMDctMDE=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"policyKey\": \"SecondaryKey\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "35" + ], + "x-ms-client-request-id": [ + "def714e3-163f-44c1-a4fe-d3be932c956e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"primaryConnectionString\": \"Endpoint=sb://sdk-relaynamespace-9778.servicebus.windows.net/;SharedAccessKeyName=sdk-RelayAuthRules-7073;SharedAccessKey=7MN0w8BnG4ARJ3vr6LjmDqtjQhMjy4fXpbRxqiejfA0=;EntityPath=sdk-Relay-Hybrid-2980\",\r\n \"secondaryConnectionString\": \"Endpoint=sb://sdk-relaynamespace-9778.servicebus.windows.net/;SharedAccessKeyName=sdk-RelayAuthRules-7073;SharedAccessKey=mkm2h6MsJJddO2qjGKGim+Hey0bv5KBC6XCWYUzbgsg=;EntityPath=sdk-Relay-Hybrid-2980\",\r\n \"primaryKey\": \"7MN0w8BnG4ARJ3vr6LjmDqtjQhMjy4fXpbRxqiejfA0=\",\r\n \"secondaryKey\": \"mkm2h6MsJJddO2qjGKGim+Hey0bv5KBC6XCWYUzbgsg=\",\r\n \"keyName\": \"sdk-RelayAuthRules-7073\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:46:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "fc6a6a54-1458-40e0-9677-482e319d01c4_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1192" + ], + "x-ms-correlation-request-id": [ + "ffb8d3ef-ea21-49a5-b2be-f0f779ddac06" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024637Z:ffb8d3ef-ea21-49a5-b2be-f0f779ddac06" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778/HybridConnections/sdk-Relay-Hybrid-2980/authorizationRules/sdk-RelayAuthRules-7073?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtOTc3OC9IeWJyaWRDb25uZWN0aW9ucy9zZGstUmVsYXktSHlicmlkLTI5ODAvYXV0aG9yaXphdGlvblJ1bGVzL3Nkay1SZWxheUF1dGhSdWxlcy03MDczP2FwaS12ZXJzaW9uPTIwMTYtMDctMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ceb1c97a-0902-4e08-8d66-9b6a24ac603d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:46:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "bc25871c-52eb-4964-ab93-80a88fea3851_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1191" + ], + "x-ms-correlation-request-id": [ + "31e4f9d3-e60c-4ca0-84c2-827969079551" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024638Z:31e4f9d3-e60c-4ca0-84c2-827969079551" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778/HybridConnections/sdk-Relay-Hybrid-2980?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtOTc3OC9IeWJyaWRDb25uZWN0aW9ucy9zZGstUmVsYXktSHlicmlkLTI5ODA/YXBpLXZlcnNpb249MjAxNi0wNy0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1d8caa4b-82a1-416d-9a3e-6700acb777aa" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:46:39 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1190" + ], + "x-ms-request-id": [ + "7724fafd-9ac5-4038-b43c-e42f19783938" + ], + "x-ms-correlation-request-id": [ + "7724fafd-9ac5-4038-b43c-e42f19783938" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024639Z:7724fafd-9ac5-4038-b43c-e42f19783938" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtOTc3OD9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "04f30e51-6d80-407c-b261-7e6500affa44" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:46:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778/operationresults/sdk-RelayNamespace-9778?api-version=2016-07-01" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "18c3b701-ebe2-4fad-816d-326a25970a51_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1189" + ], + "x-ms-correlation-request-id": [ + "3b1bac7b-3d09-4536-b919-1915d1b796c8" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024640Z:3b1bac7b-3d09-4536-b919-1915d1b796c8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9778/operationresults/sdk-RelayNamespace-9778?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtOTc3OC9vcGVyYXRpb25yZXN1bHRzL3Nkay1SZWxheU5hbWVzcGFjZS05Nzc4P2FwaS12ZXJzaW9uPTIwMTYtMDctMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:47:10 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "25898773-a055-42fa-88dc-d03415af86f2_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "c236d0ee-be8f-486d-88fe-8a98b7e58b3e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024711Z:c236d0ee-be8f-486d-88fe-8a98b7e58b3e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "HybridConnectionsCreateGetUpdateDeleteAuthorizationRules": [ + "sdk-RelayNamespace-9778", + "sdk-Relay-Hybrid-2980", + "sdk-RelayAuthRules-7073" + ] + }, + "Variables": { + "SubscriptionId": "e2f361f0-3b27-4503-a9cc-21cfba380093", + "CreatePrimaryKey": "TIC/pMDWBohJBjEoexuhkUsV2pd0jRLwEVfwdGeW87Q=", + "UpdatePrimaryKey": "Qz85DW96urqWNLCLZIxdhcXgfH9opX1BCyyUY5Ja1FM=" + } +} \ No newline at end of file diff --git a/src/ResourceManagement/Relay/Relay.Tests/SessionRecords/Relay.Tests.ScenarioTests.ScenarioTests/NamespaceCreateGetUpdateDelete.json b/src/ResourceManagement/Relay/Relay.Tests/SessionRecords/Relay.Tests.ScenarioTests.ScenarioTests/NamespaceCreateGetUpdateDelete.json new file mode 100644 index 000000000000..b75a6880df96 --- /dev/null +++ b/src/ResourceManagement/Relay/Relay.Tests/SessionRecords/Relay.Tests.ScenarioTests.ScenarioTests/NamespaceCreateGetUpdateDelete.json @@ -0,0 +1,834 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/providers/Microsoft.Relay?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXk/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7a4f3ac5-59ba-44c1-96c9-03286a7376bb" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/providers/Microsoft.Relay\",\r\n \"namespace\": \"Microsoft.Relay\",\r\n \"authorization\": {\r\n \"applicationId\": \"80369ed6-5f11-4dd9-bef3-692475845e77\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"namespaces\",\r\n \"locations\": [\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Brazil South\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2016-07-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2016-07-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2016-07-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:51:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-request-id": [ + "aaadf0da-3c1a-4321-81f4-6b90e2ba6eec" + ], + "x-ms-correlation-request-id": [ + "aaadf0da-3c1a-4321-81f4-6b90e2ba6eec" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025137Z:aaadf0da-3c1a-4321-81f4-6b90e2ba6eec" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourcegroups?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlZ3JvdXBzP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "05798e6d-8dba-4381-b687-0be97bf61bd0" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-EventHub-SouthCentralUS\",\r\n \"name\": \"Default-EventHub-SouthCentralUS\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-MachineLearning-SouthCentralUS\",\r\n \"name\": \"Default-MachineLearning-SouthCentralUS\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Networking\",\r\n \"name\": \"Default-Networking\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast\",\r\n \"name\": \"Default-NotificationHubs-AustraliaEast\",\r\n \"location\": \"australiaeast\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-CentralUS\",\r\n \"name\": \"Default-NotificationHubs-CentralUS\",\r\n \"location\": \"centralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS\",\r\n \"name\": \"Default-ServiceBus-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-SQL-WestUS\",\r\n \"name\": \"Default-SQL-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-CentralUS\",\r\n \"name\": \"Default-Storage-CentralUS\",\r\n \"location\": \"centralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-EastAsia\",\r\n \"name\": \"Default-Storage-EastAsia\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-SouthCentralUS\",\r\n \"name\": \"Default-Storage-SouthCentralUS\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-WestUS\",\r\n \"name\": \"Default-Storage-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Web-WestUS\",\r\n \"name\": \"Default-Web-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-APPHOST\",\r\n \"name\": \"DL-SB-APPHOST\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-DS1\",\r\n \"name\": \"DL-SB-DS1\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-DS2\",\r\n \"name\": \"DL-SB-DS2\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-ECA\",\r\n \"name\": \"DL-SB-ECA\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-FILE\",\r\n \"name\": \"DL-SB-FILE\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/dl-sb-TSG\",\r\n \"name\": \"dl-sb-TSG\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Mobile-Default-Web-WestUS\",\r\n \"name\": \"Mobile-Default-Web-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:51:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-request-id": [ + "fb500c15-f976-4c7a-abf4-4db3b2c3a390" + ], + "x-ms-correlation-request-id": [ + "fb500c15-f976-4c7a-abf4-4db3b2c3a390" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025137Z:fb500c15-f976-4c7a-abf4-4db3b2c3a390" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/providers/Microsoft.Relay/CheckNameAvailability?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvQ2hlY2tOYW1lQXZhaWxhYmlsaXR5P2FwaS12ZXJzaW9uPTIwMTYtMDctMDE=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"name\": \"sdk-RelayNamespace-2421\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "41" + ], + "x-ms-client-request-id": [ + "899a44bc-f859-42a8-961c-bc08e05e3942" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": \"None\",\r\n \"message\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:51:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "642d823c-eb89-4f95-bf1e-6f679210fbdd_M6_M6" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "6a62f672-f47d-4473-bc47-b4b391a12035" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025138Z:6a62f672-f47d-4473-bc47-b4b391a12035" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2421?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjQyMT9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"location\": \"Australia East\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "167" + ], + "x-ms-client-request-id": [ + "41004d3b-c8dc-4bd0-97ce-e2240f5c1849" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2421\",\r\n \"name\": \"sdk-RelayNamespace-2421\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Unknown\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-2421\",\r\n \"enabled\": false,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:51:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "15d448ef-eba9-4161-a985-06bb50a14f02_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "349657bc-7819-4be2-aadc-c9a7d0f88be7" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025143Z:349657bc-7819-4be2-aadc-c9a7d0f88be7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2421?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjQyMT9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2421\",\r\n \"name\": \"sdk-RelayNamespace-2421\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-2421\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:51:41.473Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-2421.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:52:09.167Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:52:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ea03d4e4-c4a9-4758-a055-6bf9b4616a78_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "e3cac809-bdda-4c06-ac66-8040c4eb5de8" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025213Z:e3cac809-bdda-4c06-ac66-8040c4eb5de8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2421?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjQyMT9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "94d5cc7c-72b0-4acb-80b5-2d1ad9d0af12" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2421\",\r\n \"name\": \"sdk-RelayNamespace-2421\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-2421\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:51:41.473Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-2421.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:52:09.167Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:52:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "489709e7-4bd9-41ef-8bb4-848999f8e42d_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "80fbdae0-a72c-45cf-b03d-8871e572e42f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025218Z:80fbdae0-a72c-45cf-b03d-8871e572e42f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2421?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjQyMT9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "dfa019ee-74ef-4ef2-90d1-fb317f5122aa" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2421\",\r\n \"name\": \"sdk-RelayNamespace-2421\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-2421\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:51:41.473Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-2421.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:52:09.167Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:52:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "02a68242-6265-4a2e-b083-b32c3b053f9d_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "3908f473-624e-4fa5-8289-e150a0b7fc5a" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025218Z:3908f473-624e-4fa5-8289-e150a0b7fc5a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2421?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjQyMT9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "feedf25d-4381-4b8d-a9bc-240dfbf58895" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2421\",\r\n \"name\": \"sdk-RelayNamespace-2421\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag3\": \"value3\",\r\n \"tag4\": \"value4\",\r\n \"tag5\": \"value5\",\r\n \"tag6\": \"value6\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-2421\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:51:41.473Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-2421.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:52:24.373Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:52:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "4e8c0467-a3a2-4392-b2de-1ad101f3c616_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "42b97119-b401-4963-b335-d48c8d68f28a" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025226Z:42b97119-b401-4963-b335-d48c8d68f28a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/Namespaces?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvTmFtZXNwYWNlcz9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3a9a25f3-9be4-44a5-a5c5-cf11bbc6c440" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/Namespaces/sdk-RelayNamespace-2421\",\r\n \"name\": \"sdk-RelayNamespace-2421\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-2421\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:51:41.473Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-2421.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:52:09.167Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:52:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f7670b2d-89dd-422d-908b-b01ac8d4c15f_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "6095bd2c-b620-4212-b7f9-30b8168a58e0" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025219Z:6095bd2c-b620-4212-b7f9-30b8168a58e0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/providers/Microsoft.Relay/Namespaces?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvTmFtZXNwYWNlcz9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "bd8fbd82-4896-4002-9c94-16d393e0bb83" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9752\",\r\n \"name\": \"sdk-RelayNamespace-9752\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-9752\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-02-01T23:31:43.867Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-9752.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-02-01T23:32:07.607Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-1598\",\r\n \"name\": \"sdk-RelayNamespace-1598\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-1598\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-23T23:00:15.143Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-1598.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-23T23:00:39.343Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-6656\",\r\n \"name\": \"sdk-RelayNamespace-6656\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-6656\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-23T22:28:18.913Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-6656.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-23T22:28:43.253Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2421\",\r\n \"name\": \"sdk-RelayNamespace-2421\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-2421\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:51:41.473Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-2421.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:52:09.167Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-6342\",\r\n \"name\": \"sdk-RelayNamespace-6342\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-6342\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-23T22:14:33.343Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-6342.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-23T22:14:57.813Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8028\",\r\n \"name\": \"sdk-RelayNamespace-8028\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-8028\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-02-01T21:52:25.363Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-8028.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-02-01T21:52:49.31Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-344\",\r\n \"name\": \"sdk-RelayNamespace-344\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-344\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-23T23:02:05.46Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-344.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-23T23:02:31.657Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-342\",\r\n \"name\": \"sdk-RelayNamespace-342\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-342\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-02-01T19:50:31.173Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-342.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-02-01T19:50:55.293Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-7456\",\r\n \"name\": \"sdk-RelayNamespace-7456\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-7456\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-02-01T22:23:31.02Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-7456.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-02-01T22:23:53.837Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-4953\",\r\n \"name\": \"sdk-RelayNamespace-4953\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-4953\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-02-01T23:37:57.54Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-4953.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-02-01T23:38:21.573Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-6847\",\r\n \"name\": \"sdk-RelayNamespace-6847\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-6847\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-09T20:14:39.793Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-6847.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-09T20:15:46.717Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-257\",\r\n \"name\": \"sdk-RelayNamespace-257\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-257\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-23T21:16:07.71Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-257.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-23T21:16:32.18Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/Test-Realy\",\r\n \"name\": \"Test-Realy\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:test-realy\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-01-18T01:53:45.86Z\",\r\n \"serviceBusEndpoint\": \"https://Test-Realy.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-01-18T01:54:09.757Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2372\",\r\n \"name\": \"sdk-RelayNamespace-2372\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-2372\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-23T19:35:03.913Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-2372.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-23T19:35:26.2Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:52:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b0ed3c8d-64f7-466d-94ed-10be129d08cd_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "a543723f-e93e-44b5-8929-9be5fa6b1f97" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025219Z:a543723f-e93e-44b5-8929-9be5fa6b1f97" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2421?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjQyMT9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"tags\": {\r\n \"tag3\": \"value3\",\r\n \"tag4\": \"value4\",\r\n \"tag5\": \"value5\",\r\n \"tag6\": \"value6\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "180" + ], + "x-ms-client-request-id": [ + "d68990ef-83d4-43b6-a1a5-70db0f26c6aa" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": null,\r\n \"name\": null,\r\n \"type\": null,\r\n \"location\": null,\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"tags\": {\r\n \"tag3\": \"value3\",\r\n \"tag4\": \"value4\",\r\n \"tag5\": \"value5\",\r\n \"tag6\": \"value6\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": null,\r\n \"metricId\": null,\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:51:41.473Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-2421.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:52:09.167Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2,\r\n \"messagingSkuPlan\": {\r\n \"sku\": 2,\r\n \"selectedEventHubUnit\": 1\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:52:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "88ddc438-ba68-420a-b51e-89c48bf182d9_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "6c60538c-a30e-4cb7-8846-1dc69b64cf5a" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025221Z:6c60538c-a30e-4cb7-8846-1dc69b64cf5a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2421?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjQyMT9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7d0c20e1-9d97-43af-9ba6-a5e0073e124d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:52:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2421/operationresults/sdk-RelayNamespace-2421?api-version=2016-07-01" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "953abcb4-aaba-42ac-9b27-3e33f5f8c3e4_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "0a519841-1ee0-4718-88ae-83eb92a171c6" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025227Z:0a519841-1ee0-4718-88ae-83eb92a171c6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2421/operationresults/sdk-RelayNamespace-2421?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjQyMS9vcGVyYXRpb25yZXN1bHRzL3Nkay1SZWxheU5hbWVzcGFjZS0yNDIxP2FwaS12ZXJzaW9uPTIwMTYtMDctMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:52:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "e8eb4f85-ffd1-4e3f-bd3e-1e7bb0c6b1d9_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "ca287ff1-6148-4f6f-82d7-7c8aeae66a83" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025257Z:ca287ff1-6148-4f6f-82d7-7c8aeae66a83" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "NamespaceCreateGetUpdateDelete": [ + "sdk-RelayNamespace-2421" + ] + }, + "Variables": { + "SubscriptionId": "e2f361f0-3b27-4503-a9cc-21cfba380093" + } +} \ No newline at end of file diff --git a/src/ResourceManagement/Relay/Relay.Tests/SessionRecords/Relay.Tests.ScenarioTests.ScenarioTests/NamespaceCreateGetUpdateDeleteAuthorizationRules.json b/src/ResourceManagement/Relay/Relay.Tests/SessionRecords/Relay.Tests.ScenarioTests.ScenarioTests/NamespaceCreateGetUpdateDeleteAuthorizationRules.json new file mode 100644 index 000000000000..9ee81fb5a948 --- /dev/null +++ b/src/ResourceManagement/Relay/Relay.Tests/SessionRecords/Relay.Tests.ScenarioTests.ScenarioTests/NamespaceCreateGetUpdateDeleteAuthorizationRules.json @@ -0,0 +1,1168 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/providers/Microsoft.Relay?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXk/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a8f74d9e-1ef6-4e22-bf6f-0e01cf5a86fb" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/providers/Microsoft.Relay\",\r\n \"namespace\": \"Microsoft.Relay\",\r\n \"authorization\": {\r\n \"applicationId\": \"80369ed6-5f11-4dd9-bef3-692475845e77\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"namespaces\",\r\n \"locations\": [\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Brazil South\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2016-07-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2016-07-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2016-07-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:54:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-request-id": [ + "62891dfd-35e3-4bae-af98-b5448ef8d141" + ], + "x-ms-correlation-request-id": [ + "62891dfd-35e3-4bae-af98-b5448ef8d141" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025419Z:62891dfd-35e3-4bae-af98-b5448ef8d141" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourcegroups?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlZ3JvdXBzP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "97d619de-4a36-443c-9380-8eff654d07c3" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-EventHub-SouthCentralUS\",\r\n \"name\": \"Default-EventHub-SouthCentralUS\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-MachineLearning-SouthCentralUS\",\r\n \"name\": \"Default-MachineLearning-SouthCentralUS\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Networking\",\r\n \"name\": \"Default-Networking\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast\",\r\n \"name\": \"Default-NotificationHubs-AustraliaEast\",\r\n \"location\": \"australiaeast\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-CentralUS\",\r\n \"name\": \"Default-NotificationHubs-CentralUS\",\r\n \"location\": \"centralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS\",\r\n \"name\": \"Default-ServiceBus-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-SQL-WestUS\",\r\n \"name\": \"Default-SQL-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-CentralUS\",\r\n \"name\": \"Default-Storage-CentralUS\",\r\n \"location\": \"centralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-EastAsia\",\r\n \"name\": \"Default-Storage-EastAsia\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-SouthCentralUS\",\r\n \"name\": \"Default-Storage-SouthCentralUS\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-WestUS\",\r\n \"name\": \"Default-Storage-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Web-WestUS\",\r\n \"name\": \"Default-Web-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-APPHOST\",\r\n \"name\": \"DL-SB-APPHOST\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-DS1\",\r\n \"name\": \"DL-SB-DS1\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-DS2\",\r\n \"name\": \"DL-SB-DS2\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-ECA\",\r\n \"name\": \"DL-SB-ECA\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-FILE\",\r\n \"name\": \"DL-SB-FILE\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/dl-sb-TSG\",\r\n \"name\": \"dl-sb-TSG\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Mobile-Default-Web-WestUS\",\r\n \"name\": \"Mobile-Default-Web-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:54:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-request-id": [ + "0a0d97dd-782a-400c-bd90-ea6a5bb6f009" + ], + "x-ms-correlation-request-id": [ + "0a0d97dd-782a-400c-bd90-ea6a5bb6f009" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025419Z:0a0d97dd-782a-400c-bd90-ea6a5bb6f009" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8697?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtODY5Nz9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"location\": \"Australia East\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "103" + ], + "x-ms-client-request-id": [ + "554213f8-3b1e-4ac9-ac51-7e52f246e2eb" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8697\",\r\n \"name\": \"sdk-RelayNamespace-8697\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Unknown\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-8697\",\r\n \"enabled\": false,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:54:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "36851801-3818-412e-bf5a-f1620efad22a_M7_M7" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "2dbd89d4-8d1b-41b2-8d18-265ca4318eda" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025423Z:2dbd89d4-8d1b-41b2-8d18-265ca4318eda" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8697?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtODY5Nz9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8697\",\r\n \"name\": \"sdk-RelayNamespace-8697\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-8697\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:54:22.803Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-8697.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:54:49.54Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:54:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "0a9eb7ab-b967-437b-91c2-842c71f38b86_M7_M7" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "f9bffcb0-4fd5-4389-808d-0c6e35298a9c" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025453Z:f9bffcb0-4fd5-4389-808d-0c6e35298a9c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8697?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtODY5Nz9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b4a63fbc-cc73-40c5-9b39-e73a556504cc" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8697\",\r\n \"name\": \"sdk-RelayNamespace-8697\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-8697\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:54:22.803Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-8697.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:54:49.54Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:54:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "90c754ca-2d4b-4bfb-99ba-71f601f14bfe_M7_M7" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "67747fa8-ef21-477b-ad2c-b7e434c7efdb" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025459Z:67747fa8-ef21-477b-ad2c-b7e434c7efdb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8697?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtODY5Nz9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2a352754-8e64-4ed2-8370-d8fa58169cfe" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8697\",\r\n \"name\": \"sdk-RelayNamespace-8697\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-8697\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:54:22.803Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-8697.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:54:49.54Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:54:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "c0b9c059-d0ca-4e83-82ce-6889a4b69f9f_M7_M7" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "33f19666-de18-42ca-a419-f012292607c9" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025459Z:33f19666-de18-42ca-a419-f012292607c9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8697/AuthorizationRules/sdk-RelayAuthRules-1119?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtODY5Ny9BdXRob3JpemF0aW9uUnVsZXMvc2RrLVJlbGF5QXV0aFJ1bGVzLTExMTk/YXBpLXZlcnNpb249MjAxNi0wNy0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"rights\": [\r\n \"Listen\",\r\n \"Send\"\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "83" + ], + "x-ms-client-request-id": [ + "944d4302-dde0-4894-a169-a8812b38c3a1" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8697/AuthorizationRules/sdk-RelayAuthRules-1119\",\r\n \"name\": \"sdk-RelayAuthRules-1119\",\r\n \"type\": \"Microsoft.Relay/AuthorizationRules\",\r\n \"location\": null,\r\n \"tags\": null,\r\n \"properties\": {\r\n \"rights\": [\r\n \"Listen\",\r\n \"Send\"\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:55:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "c3511001-8c7d-4703-a331-4cfc31fbc3f3_M7_M7" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "2e6c1d78-c841-4fd5-86bc-6c2553f9b23f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025520Z:2e6c1d78-c841-4fd5-86bc-6c2553f9b23f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8697/AuthorizationRules/sdk-RelayAuthRules-1119?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtODY5Ny9BdXRob3JpemF0aW9uUnVsZXMvc2RrLVJlbGF5QXV0aFJ1bGVzLTExMTk/YXBpLXZlcnNpb249MjAxNi0wNy0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"rights\": [\r\n \"Listen\"\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "68" + ], + "x-ms-client-request-id": [ + "e37501b5-b5ec-46f9-b200-e2b0644f8127" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8697/AuthorizationRules/sdk-RelayAuthRules-1119\",\r\n \"name\": \"sdk-RelayAuthRules-1119\",\r\n \"type\": \"Microsoft.Relay/AuthorizationRules\",\r\n \"location\": null,\r\n \"tags\": null,\r\n \"properties\": {\r\n \"rights\": [\r\n \"Listen\"\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:55:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "45ab8389-1105-44ee-aa26-819c4059de08_M7_M7" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "77304b62-9c36-45e3-ac38-bfbc6413ca9f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025544Z:77304b62-9c36-45e3-ac38-bfbc6413ca9f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8697/AuthorizationRules/RootManageSharedAccessKey?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtODY5Ny9BdXRob3JpemF0aW9uUnVsZXMvUm9vdE1hbmFnZVNoYXJlZEFjY2Vzc0tleT9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "97a2131a-a6a4-4bdf-b3cc-2449a47c21bf" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8697/AuthorizationRules/RootManageSharedAccessKey\",\r\n \"name\": \"RootManageSharedAccessKey\",\r\n \"type\": \"Microsoft.Relay/AuthorizationRules\",\r\n \"location\": null,\r\n \"tags\": null,\r\n \"properties\": {\r\n \"rights\": [\r\n \"Listen\",\r\n \"Manage\",\r\n \"Send\"\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:55:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "2c385c28-afe9-4c10-92f9-32d70c3fdd5f_M7_M7" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "46242886-8d7a-457a-b73d-6f1f5592abc8" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025521Z:46242886-8d7a-457a-b73d-6f1f5592abc8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8697/AuthorizationRules/sdk-RelayAuthRules-1119?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtODY5Ny9BdXRob3JpemF0aW9uUnVsZXMvc2RrLVJlbGF5QXV0aFJ1bGVzLTExMTk/YXBpLXZlcnNpb249MjAxNi0wNy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5222cf6d-762e-4672-881f-d1f11d5af71d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8697/AuthorizationRules/sdk-RelayAuthRules-1119\",\r\n \"name\": \"sdk-RelayAuthRules-1119\",\r\n \"type\": \"Microsoft.Relay/AuthorizationRules\",\r\n \"location\": null,\r\n \"tags\": null,\r\n \"properties\": {\r\n \"rights\": [\r\n \"Listen\",\r\n \"Send\"\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:55:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "1b5a5c3c-686d-4385-bd96-26e57270b7b6_M7_M7" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "61ba0a62-65b2-4265-8d00-34f0db9ccef3" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025522Z:61ba0a62-65b2-4265-8d00-34f0db9ccef3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8697/AuthorizationRules/sdk-RelayAuthRules-1119?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtODY5Ny9BdXRob3JpemF0aW9uUnVsZXMvc2RrLVJlbGF5QXV0aFJ1bGVzLTExMTk/YXBpLXZlcnNpb249MjAxNi0wNy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f6333a6b-a376-4d74-a51c-77bf7cf602f0" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8697/AuthorizationRules/sdk-RelayAuthRules-1119\",\r\n \"name\": \"sdk-RelayAuthRules-1119\",\r\n \"type\": \"Microsoft.Relay/AuthorizationRules\",\r\n \"location\": null,\r\n \"tags\": null,\r\n \"properties\": {\r\n \"rights\": [\r\n \"Listen\"\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:55:44 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9ac5a07b-29d7-444e-b3f8-5b7146b5d83a_M7_M7" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "ab2504cd-5214-4c3d-8a9e-1544d7cecb59" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025544Z:ab2504cd-5214-4c3d-8a9e-1544d7cecb59" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8697/AuthorizationRules?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtODY5Ny9BdXRob3JpemF0aW9uUnVsZXM/YXBpLXZlcnNpb249MjAxNi0wNy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "09f93cad-d150-41f2-8563-c9d4adc4b80c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8697/AuthorizationRules/RootManageSharedAccessKey\",\r\n \"name\": \"RootManageSharedAccessKey\",\r\n \"type\": \"Microsoft.Relay/AuthorizationRules\",\r\n \"location\": null,\r\n \"tags\": null,\r\n \"properties\": {\r\n \"rights\": [\r\n \"Listen\",\r\n \"Manage\",\r\n \"Send\"\r\n ]\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8697/AuthorizationRules/sdk-RelayAuthRules-1119\",\r\n \"name\": \"sdk-RelayAuthRules-1119\",\r\n \"type\": \"Microsoft.Relay/AuthorizationRules\",\r\n \"location\": null,\r\n \"tags\": null,\r\n \"properties\": {\r\n \"rights\": [\r\n \"Listen\",\r\n \"Send\"\r\n ]\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:55:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b71e11e2-bd61-42f4-801f-1443b87874e9_M7_M7" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "00adacb1-f828-4219-8456-a1bd0345c276" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025522Z:00adacb1-f828-4219-8456-a1bd0345c276" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8697/AuthorizationRules/sdk-RelayAuthRules-1119/listKeys?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtODY5Ny9BdXRob3JpemF0aW9uUnVsZXMvc2RrLVJlbGF5QXV0aFJ1bGVzLTExMTkvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNi0wNy0wMQ==", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6aca7481-c3ea-4951-841c-1c2a29238fd3" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"primaryConnectionString\": \"Endpoint=sb://sdk-relaynamespace-8697.servicebus.windows.net/;SharedAccessKeyName=sdk-RelayAuthRules-1119;SharedAccessKey=gM+nrGeD2FQmQZFHIYUexMuge2TpQX89YI1uswfdk3k=\",\r\n \"secondaryConnectionString\": \"Endpoint=sb://sdk-relaynamespace-8697.servicebus.windows.net/;SharedAccessKeyName=sdk-RelayAuthRules-1119;SharedAccessKey=wwOTAOPCBpwYPLUU4goYPSKjhy69oZ0uy3BtfVuunes=\",\r\n \"primaryKey\": \"gM+nrGeD2FQmQZFHIYUexMuge2TpQX89YI1uswfdk3k=\",\r\n \"secondaryKey\": \"wwOTAOPCBpwYPLUU4goYPSKjhy69oZ0uy3BtfVuunes=\",\r\n \"keyName\": \"sdk-RelayAuthRules-1119\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:55:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e9d56536-e6ff-4f34-98a6-d241d9d89984_M7_M7" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "a5ed231e-e7b0-4b11-b4f8-eef8a2dccb55" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025545Z:a5ed231e-e7b0-4b11-b4f8-eef8a2dccb55" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8697/AuthorizationRules/sdk-RelayAuthRules-1119/regenerateKeys?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtODY5Ny9BdXRob3JpemF0aW9uUnVsZXMvc2RrLVJlbGF5QXV0aFJ1bGVzLTExMTkvcmVnZW5lcmF0ZUtleXM/YXBpLXZlcnNpb249MjAxNi0wNy0wMQ==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"policyKey\": \"PrimaryKey\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "33" + ], + "x-ms-client-request-id": [ + "5ebbf0db-b46c-439c-964f-df264c387fb9" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"primaryConnectionString\": \"Endpoint=sb://sdk-relaynamespace-8697.servicebus.windows.net/;SharedAccessKeyName=sdk-RelayAuthRules-1119;SharedAccessKey=vfWkWnhf8jHgQ4ZwxM++Wi5/QOl8Hj7ZYFN160dgqxw=\",\r\n \"secondaryConnectionString\": \"Endpoint=sb://sdk-relaynamespace-8697.servicebus.windows.net/;SharedAccessKeyName=sdk-RelayAuthRules-1119;SharedAccessKey=wwOTAOPCBpwYPLUU4goYPSKjhy69oZ0uy3BtfVuunes=\",\r\n \"primaryKey\": \"vfWkWnhf8jHgQ4ZwxM++Wi5/QOl8Hj7ZYFN160dgqxw=\",\r\n \"secondaryKey\": \"wwOTAOPCBpwYPLUU4goYPSKjhy69oZ0uy3BtfVuunes=\",\r\n \"keyName\": \"sdk-RelayAuthRules-1119\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:56:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "05a40b28-e661-4f8e-9ede-e8a8b86b4869_M7_M7" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "4e64abea-67fe-41c0-b8d9-a48d5366fd40" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025602Z:4e64abea-67fe-41c0-b8d9-a48d5366fd40" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8697/AuthorizationRules/sdk-RelayAuthRules-1119/regenerateKeys?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtODY5Ny9BdXRob3JpemF0aW9uUnVsZXMvc2RrLVJlbGF5QXV0aFJ1bGVzLTExMTkvcmVnZW5lcmF0ZUtleXM/YXBpLXZlcnNpb249MjAxNi0wNy0wMQ==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"policyKey\": \"SecondaryKey\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "35" + ], + "x-ms-client-request-id": [ + "f08cbf10-2a55-4cf5-8256-dfd6d3010175" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"primaryConnectionString\": \"Endpoint=sb://sdk-relaynamespace-8697.servicebus.windows.net/;SharedAccessKeyName=sdk-RelayAuthRules-1119;SharedAccessKey=vfWkWnhf8jHgQ4ZwxM++Wi5/QOl8Hj7ZYFN160dgqxw=\",\r\n \"secondaryConnectionString\": \"Endpoint=sb://sdk-relaynamespace-8697.servicebus.windows.net/;SharedAccessKeyName=sdk-RelayAuthRules-1119;SharedAccessKey=jx0eK/AorLyOPszj2OS+5e+nurXBwiZAn02Gxbgl/Vs=\",\r\n \"primaryKey\": \"vfWkWnhf8jHgQ4ZwxM++Wi5/QOl8Hj7ZYFN160dgqxw=\",\r\n \"secondaryKey\": \"jx0eK/AorLyOPszj2OS+5e+nurXBwiZAn02Gxbgl/Vs=\",\r\n \"keyName\": \"sdk-RelayAuthRules-1119\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:56:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "93ef6e12-dd5f-4ef9-ac02-cc623b582592_M7_M7" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "34c58af3-b470-4967-b7a3-d93014b43906" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025618Z:34c58af3-b470-4967-b7a3-d93014b43906" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8697/AuthorizationRules/sdk-RelayAuthRules-1119?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtODY5Ny9BdXRob3JpemF0aW9uUnVsZXMvc2RrLVJlbGF5QXV0aFJ1bGVzLTExMTk/YXBpLXZlcnNpb249MjAxNi0wNy0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "25640ac8-6074-4258-a577-ea0056ef0930" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:56:34 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "0fb846af-2db6-4798-bf4e-c29fe569acce_M7_M7" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-correlation-request-id": [ + "87b2bc42-1ecc-42de-8ec2-0a98f8ab66d1" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025635Z:87b2bc42-1ecc-42de-8ec2-0a98f8ab66d1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8697?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtODY5Nz9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "84898a63-0b4e-466d-bd7c-4f3cbfb9a281" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:56:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8697/operationresults/sdk-RelayNamespace-8697?api-version=2016-07-01" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "b123cc01-d659-40d1-8ad2-5744606c7312_M7_M7" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1192" + ], + "x-ms-correlation-request-id": [ + "1b9319b2-38f3-4c95-ab19-a33fd5604863" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025641Z:1b9319b2-38f3-4c95-ab19-a33fd5604863" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8697/operationresults/sdk-RelayNamespace-8697?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtODY5Ny9vcGVyYXRpb25yZXN1bHRzL3Nkay1SZWxheU5hbWVzcGFjZS04Njk3P2FwaS12ZXJzaW9uPTIwMTYtMDctMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:57:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "f165c529-d1e4-4741-ad24-a8605b812107_M7_M7" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "08cf5bd0-eebd-4f57-ae1b-952ad6e04455" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T025711Z:08cf5bd0-eebd-4f57-ae1b-952ad6e04455" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "NamespaceCreateGetUpdateDeleteAuthorizationRules": [ + "sdk-RelayNamespace-8697", + "sdk-RelayAuthRules-1119" + ] + }, + "Variables": { + "SubscriptionId": "e2f361f0-3b27-4503-a9cc-21cfba380093", + "CreatePrimaryKey": "v+gqUVK3I8YwXIh/bOgAyxIN308fYSrs9DCJ481Jb54=", + "UpdatePrimaryKey": "IR27Pvffr2e7SOCq88bSI9ViQC2aWO++qhsmLL7V1kU=" + } +} \ No newline at end of file diff --git a/src/ResourceManagement/Relay/Relay.Tests/SessionRecords/Relay.Tests.ScenarioTests.ScenarioTests/OperationList.json b/src/ResourceManagement/Relay/Relay.Tests/SessionRecords/Relay.Tests.ScenarioTests.ScenarioTests/OperationList.json new file mode 100644 index 000000000000..ac387d066b8a --- /dev/null +++ b/src/ResourceManagement/Relay/Relay.Tests/SessionRecords/Relay.Tests.ScenarioTests.ScenarioTests/OperationList.json @@ -0,0 +1,73 @@ +{ + "Entries": [ + { + "RequestUri": "/providers/Microsoft.Relay/operations?api-version=2016-07-01", + "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvb3BlcmF0aW9ucz9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6c7e85be-ea0d-4359-bb94-264db5f5cfad" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": \"Microsoft.Relay/checkNamespaceAvailability/action\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"Non Resource Operation\",\r\n \"operation\": \"Get namespace availability.\",\r\n \"description\": \"Checks availability of namespace under given subscription.\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/register/action\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"Relay and Hybridconnection Resource Provider\",\r\n \"operation\": \"Registers the Relay Resource Provider\",\r\n \"description\": \"Registers the subscription for the Relay resource provider and enables the creation of Relay resources\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/write\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"Namespace\",\r\n \"operation\": \"Create Or Update Namespace \",\r\n \"description\": \"Create a Namespace Resource and Update its properties. Tags and status of the Namespace are the properties which can be updated.\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"Namespace\",\r\n \"operation\": \"Get Namespace Resource\",\r\n \"description\": \"Get the list of Namespace Resource Description\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/Delete\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"Namespace\",\r\n \"operation\": \"Delete Namespace\",\r\n \"description\": \"Delete Namespace Resource\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/authorizationRules/write\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"AuthorizationRules\",\r\n \"operation\": \"Create or Update Namespace Authorization Rules\",\r\n \"description\": \"Create a Namespace level Authorization Rules and update its properties. The Authorization Rules Access Rights, the Primary and Secondary Keys can be updated.\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/authorizationRules/delete\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"AuthorizationRules\",\r\n \"operation\": \"Delete Namespace Authorization Rule\",\r\n \"description\": \"Delete Namespace Authorization Rule. The Default Namespace Authorization Rule cannot be deleted. \"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/authorizationRules/listkeys/action\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"AuthorizationRules\",\r\n \"operation\": \"Get Namespace Listkeys\",\r\n \"description\": \"Get the Connection String to the Namespace\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/HybridConnections/write\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"HybridConnection\",\r\n \"operation\": \"Create or Update HybridConnection\",\r\n \"description\": \"Create or Update HybridConnection properties.\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/HybridConnections/read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"HybridConnection\",\r\n \"operation\": \"Get HybridConnection\",\r\n \"description\": \"Get list of HybridConnection Resource Descriptions\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/HybridConnections/Delete\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"HybridConnection\",\r\n \"operation\": \"Delete HybridConnection\",\r\n \"description\": \"Operation to delete HybridConnection Resource\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/HybridConnections/authorizationRules/write\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"HybridConnection AuthorizationRules\",\r\n \"operation\": \"Create or Update HybridConnection Authorization Rule\",\r\n \"description\": \"Create HybridConnection Authorization Rules and Update its properties. The Authorization Rules Access Rights, the Primary and Secondary Keys can be updated.\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/HybridConnections/authorizationRules/delete\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"HybridConnection AuthorizationRules\",\r\n \"operation\": \"Delete HybridConnection Authorization Rules\",\r\n \"description\": \"Operation to delete HybridConnection Authorization Rules\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/HybridConnections/authorizationRules/listkeys/action\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"HybridConnection AuthorizationRules\",\r\n \"operation\": \"List HybridConnection keys\",\r\n \"description\": \"Get the Connection String to HybridConnection\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/WcfRelays/write\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"WcfRelay\",\r\n \"operation\": \"Create or Update WcfRelay\",\r\n \"description\": \"Create or Update WcfRelay properties.\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/WcfRelays/read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"WcfRelay\",\r\n \"operation\": \"Get WcfRelay\",\r\n \"description\": \"Get list of WcfRelay Resource Descriptions\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/WcfRelays/Delete\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"WcfRelay\",\r\n \"operation\": \"Delete WcfRelay\",\r\n \"description\": \"Operation to delete WcfRelay Resource\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/WcfRelays/authorizationRules/write\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"WcfRelay AuthorizationRules\",\r\n \"operation\": \"Create or Update WcfRelay Authorization Rule\",\r\n \"description\": \"Create WcfRelay Authorization Rules and Update its properties. The Authorization Rules Access Rights, the Primary and Secondary Keys can be updated.\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/WcfRelays/authorizationRules/delete\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"WcfRelay AuthorizationRules\",\r\n \"operation\": \"Delete WcfRelay Authorization Rules\",\r\n \"description\": \"Operation to delete WcfRelay Authorization Rules\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Relay/namespaces/WcfRelays/authorizationRules/listkeys/action\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Azure Relay\",\r\n \"resource\": \"WcfRelay AuthorizationRules\",\r\n \"operation\": \"List WcfRelay keys\",\r\n \"description\": \"Get the Connection String to WcfRelay\"\r\n },\r\n \"properties\": null\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:45:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f8ea066f-0188-4d5d-a0ec-24a6513826d5_M3_M3" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-tenant-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "9b955331-89c3-4d4f-826a-2d64d7b0a192" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024530Z:9b955331-89c3-4d4f-826a-2d64d7b0a192" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "e2f361f0-3b27-4503-a9cc-21cfba380093" + } +} \ No newline at end of file diff --git a/src/ResourceManagement/Relay/Relay.Tests/SessionRecords/Relay.Tests.ScenarioTests.ScenarioTests/WCFRelayCreateGetUpdateDelete.json b/src/ResourceManagement/Relay/Relay.Tests/SessionRecords/Relay.Tests.ScenarioTests.ScenarioTests/WCFRelayCreateGetUpdateDelete.json new file mode 100644 index 000000000000..960e5aa2a850 --- /dev/null +++ b/src/ResourceManagement/Relay/Relay.Tests/SessionRecords/Relay.Tests.ScenarioTests.ScenarioTests/WCFRelayCreateGetUpdateDelete.json @@ -0,0 +1,959 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/providers/Microsoft.Relay?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXk/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9d3f4662-b24f-40b0-8e74-96f387dd5595" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/providers/Microsoft.Relay\",\r\n \"namespace\": \"Microsoft.Relay\",\r\n \"authorization\": {\r\n \"applicationId\": \"80369ed6-5f11-4dd9-bef3-692475845e77\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"namespaces\",\r\n \"locations\": [\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Brazil South\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2016-07-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2016-07-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2016-07-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:48:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-request-id": [ + "fc7ea5cf-5b69-4497-b6bf-8140f704ff9e" + ], + "x-ms-correlation-request-id": [ + "fc7ea5cf-5b69-4497-b6bf-8140f704ff9e" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T024835Z:fc7ea5cf-5b69-4497-b6bf-8140f704ff9e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourcegroups?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlZ3JvdXBzP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0e005d4a-30d5-40d8-939d-2c42bec201e3" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-EventHub-SouthCentralUS\",\r\n \"name\": \"Default-EventHub-SouthCentralUS\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-MachineLearning-SouthCentralUS\",\r\n \"name\": \"Default-MachineLearning-SouthCentralUS\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Networking\",\r\n \"name\": \"Default-Networking\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast\",\r\n \"name\": \"Default-NotificationHubs-AustraliaEast\",\r\n \"location\": \"australiaeast\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-CentralUS\",\r\n \"name\": \"Default-NotificationHubs-CentralUS\",\r\n \"location\": \"centralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS\",\r\n \"name\": \"Default-ServiceBus-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-SQL-WestUS\",\r\n \"name\": \"Default-SQL-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-CentralUS\",\r\n \"name\": \"Default-Storage-CentralUS\",\r\n \"location\": \"centralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-EastAsia\",\r\n \"name\": \"Default-Storage-EastAsia\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-SouthCentralUS\",\r\n \"name\": \"Default-Storage-SouthCentralUS\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-WestUS\",\r\n \"name\": \"Default-Storage-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Web-WestUS\",\r\n \"name\": \"Default-Web-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-APPHOST\",\r\n \"name\": \"DL-SB-APPHOST\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-DS1\",\r\n \"name\": \"DL-SB-DS1\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-DS2\",\r\n \"name\": \"DL-SB-DS2\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-ECA\",\r\n \"name\": \"DL-SB-ECA\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-FILE\",\r\n \"name\": \"DL-SB-FILE\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/dl-sb-TSG\",\r\n \"name\": \"dl-sb-TSG\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Mobile-Default-Web-WestUS\",\r\n \"name\": \"Mobile-Default-Web-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:48:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-request-id": [ + "fef6d570-70bf-49af-b264-4701a9cb7b15" + ], + "x-ms-correlation-request-id": [ + "fef6d570-70bf-49af-b264-4701a9cb7b15" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T024835Z:fef6d570-70bf-49af-b264-4701a9cb7b15" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-4969?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtNDk2OT9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"location\": \"Australia East\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "167" + ], + "x-ms-client-request-id": [ + "f991efcc-c7b9-44cd-a009-b49c529d2f89" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-4969\",\r\n \"name\": \"sdk-RelayNamespace-4969\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Unknown\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-4969\",\r\n \"enabled\": false,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:48:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "14aee449-7359-4062-8178-64c648652d5f_M1_M1" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1188" + ], + "x-ms-correlation-request-id": [ + "8ac74eab-679f-478c-ae07-ccc14aea20fe" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T024841Z:8ac74eab-679f-478c-ae07-ccc14aea20fe" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-4969?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtNDk2OT9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-4969\",\r\n \"name\": \"sdk-RelayNamespace-4969\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-4969\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:48:39.283Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-4969.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:49:02.95Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:49:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "25b9470b-635d-41ba-a26e-0cc97dc5c34c_M1_M1" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "b29644f0-64f6-4056-82f6-4bf09f00e052" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T024912Z:b29644f0-64f6-4056-82f6-4bf09f00e052" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-4969?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtNDk2OT9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ecc25874-ef41-4a36-a18c-48c00c2d18f2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-4969\",\r\n \"name\": \"sdk-RelayNamespace-4969\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-4969\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:48:39.283Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-4969.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:49:02.95Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:49:16 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "044b0a80-379e-4b02-84ca-cd8276dfe6e6_M1_M1" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "6d062180-b1a0-4ad0-985b-91b9e07a1329" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T024917Z:6d062180-b1a0-4ad0-985b-91b9e07a1329" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-4969?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtNDk2OT9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "72eb5174-6ca8-40c6-ae1c-ba4b156c7a2d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-4969\",\r\n \"name\": \"sdk-RelayNamespace-4969\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-4969\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:48:39.283Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-4969.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:49:02.95Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:49:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "c8e3ec3f-edd1-43e3-9f52-28073a36e6bd_M1_M1" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "caf76f28-a54c-4bff-9bda-bf10b33ed153" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T024917Z:caf76f28-a54c-4bff-9bda-bf10b33ed153" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/Namespaces?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvTmFtZXNwYWNlcz9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "de05158f-6dd7-41c3-8723-043351118217" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/Namespaces/sdk-RelayNamespace-4969\",\r\n \"name\": \"sdk-RelayNamespace-4969\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-4969\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:48:39.283Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-4969.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:49:02.95Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:49:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "df8d85e7-5245-444c-bb02-9add30715c7d_M1_M1" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "8f9fc19d-5019-4853-be4c-adc0b2c8ea8e" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T024917Z:8f9fc19d-5019-4853-be4c-adc0b2c8ea8e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/providers/Microsoft.Relay/Namespaces?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvTmFtZXNwYWNlcz9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "295843b6-4c5a-4fad-8110-8e0c26fe4260" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9752\",\r\n \"name\": \"sdk-RelayNamespace-9752\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-9752\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-02-01T23:31:43.867Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-9752.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-02-01T23:32:07.607Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-1598\",\r\n \"name\": \"sdk-RelayNamespace-1598\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-1598\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-23T23:00:15.143Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-1598.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-23T23:00:39.343Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-6656\",\r\n \"name\": \"sdk-RelayNamespace-6656\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-6656\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-23T22:28:18.913Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-6656.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-23T22:28:43.253Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-6342\",\r\n \"name\": \"sdk-RelayNamespace-6342\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-6342\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-23T22:14:33.343Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-6342.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-23T22:14:57.813Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8028\",\r\n \"name\": \"sdk-RelayNamespace-8028\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-8028\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-02-01T21:52:25.363Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-8028.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-02-01T21:52:49.31Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-344\",\r\n \"name\": \"sdk-RelayNamespace-344\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-344\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-23T23:02:05.46Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-344.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-23T23:02:31.657Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-342\",\r\n \"name\": \"sdk-RelayNamespace-342\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-342\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-02-01T19:50:31.173Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-342.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-02-01T19:50:55.293Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-4969\",\r\n \"name\": \"sdk-RelayNamespace-4969\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-4969\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:48:39.283Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-4969.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:49:02.95Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-7456\",\r\n \"name\": \"sdk-RelayNamespace-7456\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-7456\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-02-01T22:23:31.02Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-7456.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-02-01T22:23:53.837Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-4953\",\r\n \"name\": \"sdk-RelayNamespace-4953\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-4953\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-02-01T23:37:57.54Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-4953.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-02-01T23:38:21.573Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-6847\",\r\n \"name\": \"sdk-RelayNamespace-6847\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-6847\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-09T20:14:39.793Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-6847.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-09T20:15:46.717Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-257\",\r\n \"name\": \"sdk-RelayNamespace-257\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-257\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-23T21:16:07.71Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-257.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-23T21:16:32.18Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/Test-Realy\",\r\n \"name\": \"Test-Realy\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:test-realy\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-01-18T01:53:45.86Z\",\r\n \"serviceBusEndpoint\": \"https://Test-Realy.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-01-18T01:54:09.757Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2372\",\r\n \"name\": \"sdk-RelayNamespace-2372\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-2372\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-23T19:35:03.913Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-2372.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-23T19:35:26.2Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:49:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7912b536-de79-4330-b189-14a4342dcbc4_M1_M1" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "a94a5280-0520-4e60-9fe8-1f9b4cc8a5a6" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T024917Z:a94a5280-0520-4e60-9fe8-1f9b4cc8a5a6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-4969/WcfRelays/sdk-Relay-Wcf-2783?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtNDk2OS9XY2ZSZWxheXMvc2RrLVJlbGF5LVdjZi0yNzgzP2FwaS12ZXJzaW9uPTIwMTYtMDctMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"relayType\": \"NetTcp\",\r\n \"requiresClientAuthorization\": true,\r\n \"requiresTransportSecurity\": true\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "137" + ], + "x-ms-client-request-id": [ + "56ced65a-fade-4096-8880-adaa927f5d15" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-4969/WcfRelays/sdk-Relay-Wcf-2783\",\r\n \"name\": \"sdk-Relay-Wcf-2783\",\r\n \"type\": \"Microsoft.Relay/WcfRelays\",\r\n \"location\": \"Australia East\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"path\": \"\",\r\n \"listenerType\": \"RelayedConnection\",\r\n \"createdAt\": \"2017-03-30T02:49:19.8665689Z\",\r\n \"updatedAt\": \"2017-03-30T02:49:19.8665689Z\",\r\n \"relayType\": \"NetTcp\",\r\n \"requiresClientAuthorization\": true,\r\n \"requiresTransportSecurity\": true,\r\n \"publishToRegistry\": false,\r\n \"isDynamic\": false\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:49:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "13011cdb-7110-400f-acd6-f389eea87258_M1_M1" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1187" + ], + "x-ms-correlation-request-id": [ + "894f38dd-6a23-40a3-b828-b07e716ad2d2" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T024919Z:894f38dd-6a23-40a3-b828-b07e716ad2d2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-4969/WcfRelays/sdk-Relay-Wcf-2783?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtNDk2OS9XY2ZSZWxheXMvc2RrLVJlbGF5LVdjZi0yNzgzP2FwaS12ZXJzaW9uPTIwMTYtMDctMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"relayType\": \"NetTcp\",\r\n \"createdAt\": \"2017-03-30T02:49:19.8665689Z\",\r\n \"updatedAt\": \"2017-03-30T02:49:19.8665689Z\",\r\n \"requiresClientAuthorization\": true,\r\n \"requiresTransportSecurity\": true,\r\n \"isDynamic\": false,\r\n \"userMetadata\": \"usermetadata is a placeholder to store user-defined string data for the HybridConnection endpoint.e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.\"\r\n },\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-4969/WcfRelays/sdk-Relay-Wcf-2783\",\r\n \"name\": \"sdk-Relay-Wcf-2783\",\r\n \"type\": \"Microsoft.Relay/WcfRelays\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "821" + ], + "x-ms-client-request-id": [ + "3ba95197-026c-45ae-a292-6db238f2c6d7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-4969/WcfRelays/sdk-Relay-Wcf-2783\",\r\n \"name\": \"sdk-Relay-Wcf-2783\",\r\n \"type\": \"Microsoft.Relay/WcfRelays\",\r\n \"location\": \"Australia East\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"path\": \"\",\r\n \"createdAt\": \"2017-03-30T02:49:19.8665689Z\",\r\n \"updatedAt\": \"2017-03-30T02:49:19.8665689Z\",\r\n \"relayType\": \"NetTcp\",\r\n \"requiresClientAuthorization\": true,\r\n \"requiresTransportSecurity\": true,\r\n \"isDynamic\": false,\r\n \"userMetadata\": \"usermetadata is a placeholder to store user-defined string data for the HybridConnection endpoint.e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:49:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ca047bae-6e4d-48e6-bb56-6471ed3d5d0d_M1_M1" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1186" + ], + "x-ms-correlation-request-id": [ + "a9cebca8-0007-4ac8-847b-94d5a68eaa70" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T024921Z:a9cebca8-0007-4ac8-847b-94d5a68eaa70" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-4969/WcfRelays/sdk-Relay-Wcf-2783?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtNDk2OS9XY2ZSZWxheXMvc2RrLVJlbGF5LVdjZi0yNzgzP2FwaS12ZXJzaW9uPTIwMTYtMDctMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "edc1cb18-07eb-4a74-9d9a-7916c9c191e7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-4969/WcfRelays/sdk-Relay-Wcf-2783\",\r\n \"name\": \"sdk-Relay-Wcf-2783\",\r\n \"type\": \"Microsoft.Relay/WcfRelays\",\r\n \"location\": \"Australia East\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"path\": \"\",\r\n \"listenerType\": \"RelayedConnection\",\r\n \"listenerCount\": 0,\r\n \"createdAt\": \"2017-03-30T02:49:19.8665689Z\",\r\n \"updatedAt\": \"2017-03-30T02:49:19.8665689Z\",\r\n \"relayType\": \"NetTcp\",\r\n \"requiresClientAuthorization\": true,\r\n \"requiresTransportSecurity\": true,\r\n \"publishToRegistry\": false,\r\n \"isDynamic\": false\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:49:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b35c4b89-2d19-425c-a894-59348f610d06_M1_M1" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "da771f7e-bb1d-4573-8538-12a3bf04dfbb" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T024920Z:da771f7e-bb1d-4573-8538-12a3bf04dfbb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-4969/WcfRelays?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtNDk2OS9XY2ZSZWxheXM/YXBpLXZlcnNpb249MjAxNi0wNy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "8f894b9c-9e42-417e-bb22-3b3d0622c51c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-4969/WcfRelays/sdk-relay-wcf-2783\",\r\n \"name\": \"sdk-relay-wcf-2783\",\r\n \"type\": \"Microsoft.Relay/WcfRelays\",\r\n \"location\": \"Australia East\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"path\": \"\",\r\n \"listenerType\": \"RelayedConnection\",\r\n \"listenerCount\": 0,\r\n \"createdAt\": \"2017-03-30T02:49:19.8665689Z\",\r\n \"updatedAt\": \"2017-03-30T02:49:21.6608628Z\",\r\n \"relayType\": \"NetTcp\",\r\n \"requiresClientAuthorization\": true,\r\n \"requiresTransportSecurity\": true,\r\n \"publishToRegistry\": false,\r\n \"isDynamic\": false,\r\n \"userMetadata\": \"usermetadata is a placeholder to store user-defined string data for the HybridConnection endpoint.e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:49:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "c859ae69-9f04-4d48-b08c-e464894eef92_M1_M1" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-correlation-request-id": [ + "f731e4a3-02a3-4e59-aa10-be61085413f9" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T024922Z:f731e4a3-02a3-4e59-aa10-be61085413f9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-4969/WcfRelays/sdk-Relay-Wcf-2783?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtNDk2OS9XY2ZSZWxheXMvc2RrLVJlbGF5LVdjZi0yNzgzP2FwaS12ZXJzaW9uPTIwMTYtMDctMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "fd0a8b19-ce97-4c0e-8cc0-e003569fdd28" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:49:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1185" + ], + "x-ms-request-id": [ + "2a5c0fe8-2d73-4b10-a293-346fea687302" + ], + "x-ms-correlation-request-id": [ + "2a5c0fe8-2d73-4b10-a293-346fea687302" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T024923Z:2a5c0fe8-2d73-4b10-a293-346fea687302" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-4969?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtNDk2OT9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9100dfe7-0c09-4e05-90da-cec617c5336d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:49:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-4969/operationresults/sdk-RelayNamespace-4969?api-version=2016-07-01" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "cc302ee9-db30-4a95-9d04-ad9aa70e13a3_M1_M1" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1184" + ], + "x-ms-correlation-request-id": [ + "0bc227ce-f281-4d1e-959a-bc43a7cf7572" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T024924Z:0bc227ce-f281-4d1e-959a-bc43a7cf7572" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-4969/operationresults/sdk-RelayNamespace-4969?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtNDk2OS9vcGVyYXRpb25yZXN1bHRzL3Nkay1SZWxheU5hbWVzcGFjZS00OTY5P2FwaS12ZXJzaW9uPTIwMTYtMDctMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:49:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "689ba19c-51fb-4fbd-b277-cb5843b36c99_M1_M1" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-correlation-request-id": [ + "358d6c93-12ed-4b46-b30e-b310846077f3" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20170330T024954Z:358d6c93-12ed-4b46-b30e-b310846077f3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "WCFRelayCreateGetUpdateDelete": [ + "sdk-RelayNamespace-4969", + "sdk-Relay-Wcf-2783" + ] + }, + "Variables": { + "SubscriptionId": "e2f361f0-3b27-4503-a9cc-21cfba380093" + } +} \ No newline at end of file diff --git a/src/ResourceManagement/Relay/Relay.Tests/SessionRecords/Relay.Tests.ScenarioTests.ScenarioTests/WCFRelayCreateGetUpdateDeleteAuthorizationRules.json b/src/ResourceManagement/Relay/Relay.Tests/SessionRecords/Relay.Tests.ScenarioTests.ScenarioTests/WCFRelayCreateGetUpdateDeleteAuthorizationRules.json new file mode 100644 index 000000000000..d677aff86811 --- /dev/null +++ b/src/ResourceManagement/Relay/Relay.Tests/SessionRecords/Relay.Tests.ScenarioTests.ScenarioTests/WCFRelayCreateGetUpdateDeleteAuthorizationRules.json @@ -0,0 +1,1500 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/providers/Microsoft.Relay?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXk/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "80efc2bc-49e8-41ff-ba25-21936946afdf" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/providers/Microsoft.Relay\",\r\n \"namespace\": \"Microsoft.Relay\",\r\n \"authorization\": {\r\n \"applicationId\": \"80369ed6-5f11-4dd9-bef3-692475845e77\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"namespaces\",\r\n \"locations\": [\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Brazil South\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"Korea Central\",\r\n \"Korea South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2016-07-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2016-07-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2016-07-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:49:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-request-id": [ + "08fbff3f-e0f1-4b4d-901c-8d5f6dd4d5c8" + ], + "x-ms-correlation-request-id": [ + "08fbff3f-e0f1-4b4d-901c-8d5f6dd4d5c8" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024956Z:08fbff3f-e0f1-4b4d-901c-8d5f6dd4d5c8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourcegroups?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlZ3JvdXBzP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "539fc358-213e-4324-b1b6-d43405e452a3" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-EventHub-SouthCentralUS\",\r\n \"name\": \"Default-EventHub-SouthCentralUS\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-MachineLearning-SouthCentralUS\",\r\n \"name\": \"Default-MachineLearning-SouthCentralUS\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Networking\",\r\n \"name\": \"Default-Networking\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast\",\r\n \"name\": \"Default-NotificationHubs-AustraliaEast\",\r\n \"location\": \"australiaeast\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-CentralUS\",\r\n \"name\": \"Default-NotificationHubs-CentralUS\",\r\n \"location\": \"centralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS\",\r\n \"name\": \"Default-ServiceBus-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-SQL-WestUS\",\r\n \"name\": \"Default-SQL-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-CentralUS\",\r\n \"name\": \"Default-Storage-CentralUS\",\r\n \"location\": \"centralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-EastAsia\",\r\n \"name\": \"Default-Storage-EastAsia\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-SouthCentralUS\",\r\n \"name\": \"Default-Storage-SouthCentralUS\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-WestUS\",\r\n \"name\": \"Default-Storage-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Web-WestUS\",\r\n \"name\": \"Default-Web-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-APPHOST\",\r\n \"name\": \"DL-SB-APPHOST\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-DS1\",\r\n \"name\": \"DL-SB-DS1\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-DS2\",\r\n \"name\": \"DL-SB-DS2\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-ECA\",\r\n \"name\": \"DL-SB-ECA\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/DL-SB-FILE\",\r\n \"name\": \"DL-SB-FILE\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/dl-sb-TSG\",\r\n \"name\": \"dl-sb-TSG\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Mobile-Default-Web-WestUS\",\r\n \"name\": \"Mobile-Default-Web-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:49:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-request-id": [ + "3eb2ff8f-d66f-41f2-94ed-3e6e101f0091" + ], + "x-ms-correlation-request-id": [ + "3eb2ff8f-d66f-41f2-94ed-3e6e101f0091" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T024956Z:3eb2ff8f-d66f-41f2-94ed-3e6e101f0091" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjQ4OD9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"location\": \"Australia East\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "167" + ], + "x-ms-client-request-id": [ + "5da05de7-52fa-4e86-b57f-386b9e89ff85" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488\",\r\n \"name\": \"sdk-RelayNamespace-2488\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Unknown\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-2488\",\r\n \"enabled\": false,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:50:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e218636f-16cb-4034-bf71-3532f96b5ef3_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "28ca0cbd-f685-4a63-8de4-3bd1b05cde47" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T025001Z:28ca0cbd-f685-4a63-8de4-3bd1b05cde47" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjQ4OD9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488\",\r\n \"name\": \"sdk-RelayNamespace-2488\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-2488\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:49:59.487Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-2488.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:50:25.05Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:50:31 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ad8b30a2-f04d-4774-a9ed-0cf306ce57d0_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "5e204919-6469-4262-892f-257340486a21" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T025031Z:5e204919-6469-4262-892f-257340486a21" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjQ4OD9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d6938e81-343f-4e63-92d0-dbcbcb1cfe77" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488\",\r\n \"name\": \"sdk-RelayNamespace-2488\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-2488\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:49:59.487Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-2488.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:50:25.05Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:50:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9b8ff862-b55a-45bd-8e7c-bf258ee9a6c5_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "66aa6383-c30d-4290-98ae-f2104de79472" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T025036Z:66aa6383-c30d-4290-98ae-f2104de79472" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjQ4OD9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "dfefd052-8711-4c9c-b56e-742f130d18dd" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488\",\r\n \"name\": \"sdk-RelayNamespace-2488\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-2488\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:49:59.487Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-2488.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:50:25.05Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:50:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "bd33e563-2aef-43ee-b119-9fc7fcaa43e6_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "767ba8ce-0ef4-40d5-b90b-8fd3736a74d3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T025036Z:767ba8ce-0ef4-40d5-b90b-8fd3736a74d3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/Namespaces?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvTmFtZXNwYWNlcz9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f7984cd1-efa7-4648-a6fc-1470e0ada80a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/Namespaces/sdk-RelayNamespace-2488\",\r\n \"name\": \"sdk-RelayNamespace-2488\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-2488\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:49:59.487Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-2488.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:50:25.05Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:50:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "df021170-2a01-40bb-b5fd-50f0af331924_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "373d113d-6000-4201-ad08-5f9c9f0244c9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T025036Z:373d113d-6000-4201-ad08-5f9c9f0244c9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/providers/Microsoft.Relay/Namespaces?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvTmFtZXNwYWNlcz9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "106cc446-75df-427a-94c7-d8e07d853800" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9752\",\r\n \"name\": \"sdk-RelayNamespace-9752\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-9752\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-02-01T23:31:43.867Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-9752.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-02-01T23:32:07.607Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-1598\",\r\n \"name\": \"sdk-RelayNamespace-1598\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-1598\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-23T23:00:15.143Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-1598.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-23T23:00:39.343Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-6656\",\r\n \"name\": \"sdk-RelayNamespace-6656\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-6656\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-23T22:28:18.913Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-6656.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-23T22:28:43.253Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-6342\",\r\n \"name\": \"sdk-RelayNamespace-6342\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-6342\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-23T22:14:33.343Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-6342.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-23T22:14:57.813Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-8028\",\r\n \"name\": \"sdk-RelayNamespace-8028\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-8028\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-02-01T21:52:25.363Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-8028.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-02-01T21:52:49.31Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-344\",\r\n \"name\": \"sdk-RelayNamespace-344\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-344\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-23T23:02:05.46Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-344.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-23T23:02:31.657Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-342\",\r\n \"name\": \"sdk-RelayNamespace-342\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-342\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-02-01T19:50:31.173Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-342.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-02-01T19:50:55.293Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-7456\",\r\n \"name\": \"sdk-RelayNamespace-7456\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-7456\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-02-01T22:23:31.02Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-7456.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-02-01T22:23:53.837Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-4953\",\r\n \"name\": \"sdk-RelayNamespace-4953\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-4953\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-02-01T23:37:57.54Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-4953.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-02-01T23:38:21.573Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-6847\",\r\n \"name\": \"sdk-RelayNamespace-6847\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-6847\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-09T20:14:39.793Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-6847.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-09T20:15:46.717Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-257\",\r\n \"name\": \"sdk-RelayNamespace-257\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-257\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-23T21:16:07.71Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-257.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-23T21:16:32.18Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/Test-Realy\",\r\n \"name\": \"Test-Realy\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:test-realy\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-01-18T01:53:45.86Z\",\r\n \"serviceBusEndpoint\": \"https://Test-Realy.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-01-18T01:54:09.757Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488\",\r\n \"name\": \"sdk-RelayNamespace-2488\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"Australia East\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-2488\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-30T02:49:59.487Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-2488.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-30T02:50:25.05Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2372\",\r\n \"name\": \"sdk-RelayNamespace-2372\",\r\n \"type\": \"Microsoft.Relay/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Relay\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-2372\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-03-23T19:35:03.913Z\",\r\n \"serviceBusEndpoint\": \"https://sdk-RelayNamespace-2372.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"updatedAt\": \"2017-03-23T19:35:26.2Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"Relay\",\r\n \"messagingSku\": 2\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:50:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "55a60b42-5cc5-4b4c-8013-6ab49d025eba_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "59f87e91-5a7b-4004-ad46-60f0d80c68cd" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T025036Z:59f87e91-5a7b-4004-ad46-60f0d80c68cd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488/WcfRelays/sdk-Relay-Wcf-8132?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjQ4OC9XY2ZSZWxheXMvc2RrLVJlbGF5LVdjZi04MTMyP2FwaS12ZXJzaW9uPTIwMTYtMDctMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"relayType\": \"NetTcp\",\r\n \"requiresClientAuthorization\": true,\r\n \"requiresTransportSecurity\": true\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "137" + ], + "x-ms-client-request-id": [ + "9bb14d20-7b36-423f-9bf7-51303b53f70d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488/WcfRelays/sdk-Relay-Wcf-8132\",\r\n \"name\": \"sdk-Relay-Wcf-8132\",\r\n \"type\": \"Microsoft.Relay/WcfRelays\",\r\n \"location\": \"Australia East\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"path\": \"\",\r\n \"listenerType\": \"RelayedConnection\",\r\n \"createdAt\": \"2017-03-30T02:50:38.5939248Z\",\r\n \"updatedAt\": \"2017-03-30T02:50:38.5939248Z\",\r\n \"relayType\": \"NetTcp\",\r\n \"requiresClientAuthorization\": true,\r\n \"requiresTransportSecurity\": true,\r\n \"publishToRegistry\": false,\r\n \"isDynamic\": false\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:50:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "8532143d-ffea-4d48-aedd-948cb915e244_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "ce26badf-6b25-4ff8-ab7a-89bf537fb4a9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T025038Z:ce26badf-6b25-4ff8-ab7a-89bf537fb4a9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488/WcfRelays/sdk-Relay-Wcf-8132?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjQ4OC9XY2ZSZWxheXMvc2RrLVJlbGF5LVdjZi04MTMyP2FwaS12ZXJzaW9uPTIwMTYtMDctMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7458b95b-ba93-423a-a817-f184be4601a6" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488/WcfRelays/sdk-Relay-Wcf-8132\",\r\n \"name\": \"sdk-Relay-Wcf-8132\",\r\n \"type\": \"Microsoft.Relay/WcfRelays\",\r\n \"location\": \"Australia East\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"path\": \"\",\r\n \"listenerType\": \"RelayedConnection\",\r\n \"listenerCount\": 0,\r\n \"createdAt\": \"2017-03-30T02:50:38.5939248Z\",\r\n \"updatedAt\": \"2017-03-30T02:50:38.5939248Z\",\r\n \"relayType\": \"NetTcp\",\r\n \"requiresClientAuthorization\": true,\r\n \"requiresTransportSecurity\": true,\r\n \"publishToRegistry\": false,\r\n \"isDynamic\": false\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:50:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "8564e3e4-405f-470e-872a-7e4e62ede14c_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "054b5da5-9070-49ac-9db1-f7b6af1148cc" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T025038Z:054b5da5-9070-49ac-9db1-f7b6af1148cc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488/WcfRelays/sdk-Relay-Wcf-8132/authorizationRules/sdk-RelayAuthRules-1301?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjQ4OC9XY2ZSZWxheXMvc2RrLVJlbGF5LVdjZi04MTMyL2F1dGhvcml6YXRpb25SdWxlcy9zZGstUmVsYXlBdXRoUnVsZXMtMTMwMT9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"rights\": [\r\n \"Listen\",\r\n \"Send\"\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "83" + ], + "x-ms-client-request-id": [ + "fda98a6a-57aa-4c75-847a-35d17ffed333" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488/WcfRelays/sdk-Relay-Wcf-8132/authorizationRules/sdk-RelayAuthRules-1301\",\r\n \"name\": \"sdk-RelayAuthRules-1301\",\r\n \"type\": \"Microsoft.Relay/AuthorizationRules\",\r\n \"location\": \"Australia East\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"rights\": [\r\n \"Listen\",\r\n \"Send\"\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:50:44 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "2ae1ea93-51cd-49d1-9711-604aae40c81d_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "710154d7-fbba-4abf-8e36-6b4e8a2a3faf" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T025044Z:710154d7-fbba-4abf-8e36-6b4e8a2a3faf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488/WcfRelays/sdk-Relay-Wcf-8132/authorizationRules/sdk-RelayAuthRules-1301?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjQ4OC9XY2ZSZWxheXMvc2RrLVJlbGF5LVdjZi04MTMyL2F1dGhvcml6YXRpb25SdWxlcy9zZGstUmVsYXlBdXRoUnVsZXMtMTMwMT9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"rights\": [\r\n \"Listen\",\r\n \"Send\"\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "83" + ], + "x-ms-client-request-id": [ + "b98a6d98-005a-421f-916d-d2c5b14b3404" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488/WcfRelays/sdk-Relay-Wcf-8132/authorizationRules/sdk-RelayAuthRules-1301\",\r\n \"name\": \"sdk-RelayAuthRules-1301\",\r\n \"type\": \"Microsoft.Relay/AuthorizationRules\",\r\n \"location\": \"Australia East\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"rights\": [\r\n \"Listen\",\r\n \"Send\"\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:50:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "77dfaa37-27e1-46e5-b6b9-61f3ac50a650_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "b895b294-10b0-4578-8fd4-30002b436fca" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T025050Z:b895b294-10b0-4578-8fd4-30002b436fca" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488/WcfRelays/sdk-Relay-Wcf-8132/authorizationRules/sdk-RelayAuthRules-1301?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjQ4OC9XY2ZSZWxheXMvc2RrLVJlbGF5LVdjZi04MTMyL2F1dGhvcml6YXRpb25SdWxlcy9zZGstUmVsYXlBdXRoUnVsZXMtMTMwMT9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"rights\": [\r\n \"Listen\"\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "68" + ], + "x-ms-client-request-id": [ + "c4519f5a-668d-4558-8e9d-ffa5df9662d6" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488/WcfRelays/sdk-Relay-Wcf-8132/authorizationRules/sdk-RelayAuthRules-1301\",\r\n \"name\": \"sdk-RelayAuthRules-1301\",\r\n \"type\": \"Microsoft.Relay/AuthorizationRules\",\r\n \"location\": \"Australia East\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"rights\": [\r\n \"Listen\"\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:50:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9dcec125-5608-4eea-8203-d84929d5f16d_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "259afdc6-3c4f-4f41-8e83-da426ba1ec7e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T025056Z:259afdc6-3c4f-4f41-8e83-da426ba1ec7e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488/WcfRelays/sdk-Relay-Wcf-8132/authorizationRules/sdk-RelayAuthRules-1301?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjQ4OC9XY2ZSZWxheXMvc2RrLVJlbGF5LVdjZi04MTMyL2F1dGhvcml6YXRpb25SdWxlcy9zZGstUmVsYXlBdXRoUnVsZXMtMTMwMT9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "bc7d542d-bf21-4374-86fc-de8355d76c4c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488/WcfRelays/sdk-Relay-Wcf-8132/authorizationRules/sdk-RelayAuthRules-1301\",\r\n \"name\": \"sdk-RelayAuthRules-1301\",\r\n \"type\": \"Microsoft.Relay/AuthorizationRules\",\r\n \"location\": \"Australia East\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"rights\": [\r\n \"Listen\",\r\n \"Send\"\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:50:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e23b0d34-33b3-40a4-bb19-2a1f0be6a195_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "1ae1764f-db32-4ede-bdae-9455a8ce5c8e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T025050Z:1ae1764f-db32-4ede-bdae-9455a8ce5c8e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488/WcfRelays/sdk-Relay-Wcf-8132/authorizationRules/sdk-RelayAuthRules-1301?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjQ4OC9XY2ZSZWxheXMvc2RrLVJlbGF5LVdjZi04MTMyL2F1dGhvcml6YXRpb25SdWxlcy9zZGstUmVsYXlBdXRoUnVsZXMtMTMwMT9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b4b92957-f4ff-4829-ae29-21a643c01d97" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488/WcfRelays/sdk-Relay-Wcf-8132/authorizationRules/sdk-RelayAuthRules-1301\",\r\n \"name\": \"sdk-RelayAuthRules-1301\",\r\n \"type\": \"Microsoft.Relay/AuthorizationRules\",\r\n \"location\": \"Australia East\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"rights\": [\r\n \"Listen\"\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:50:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "544c7c75-358f-476a-85ef-02b71a1ee1f7_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "533ae06f-0277-4e72-be79-dc0a96d29e7d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T025057Z:533ae06f-0277-4e72-be79-dc0a96d29e7d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488/WcfRelays/sdk-Relay-Wcf-8132/authorizationRules?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjQ4OC9XY2ZSZWxheXMvc2RrLVJlbGF5LVdjZi04MTMyL2F1dGhvcml6YXRpb25SdWxlcz9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d82e5ae3-2d95-449d-8103-d91bfeb14bca" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488/WcfRelays/sdk-Relay-Wcf-8132/authorizationRules/sdk-RelayAuthRules-1301\",\r\n \"name\": \"sdk-RelayAuthRules-1301\",\r\n \"type\": \"Microsoft.Relay/AuthorizationRules\",\r\n \"location\": \"Australia East\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"rights\": [\r\n \"Listen\",\r\n \"Send\"\r\n ]\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:50:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7816f677-5d6b-4315-8942-abe29c3dfb6e_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "265ba229-e7fc-4798-bc94-444e2b08bddd" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T025051Z:265ba229-e7fc-4798-bc94-444e2b08bddd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488/WcfRelays/sdk-Relay-Wcf-8132/authorizationRules/sdk-RelayAuthRules-1301/ListKeys?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjQ4OC9XY2ZSZWxheXMvc2RrLVJlbGF5LVdjZi04MTMyL2F1dGhvcml6YXRpb25SdWxlcy9zZGstUmVsYXlBdXRoUnVsZXMtMTMwMS9MaXN0S2V5cz9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6eb734c2-4652-4484-9597-36fd43fae3ca" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"primaryConnectionString\": \"Endpoint=sb://sdk-relaynamespace-2488.servicebus.windows.net/;SharedAccessKeyName=sdk-RelayAuthRules-1301;SharedAccessKey=y3uEv7uvtu5RlqHiN3wk2SuFQeqlqDjrxp1uxDJf64A=;EntityPath=sdk-Relay-Wcf-8132\",\r\n \"secondaryConnectionString\": \"Endpoint=sb://sdk-relaynamespace-2488.servicebus.windows.net/;SharedAccessKeyName=sdk-RelayAuthRules-1301;SharedAccessKey=no+zJXbTkAWx3rdW5EdfyMcJi+NpgYTDmgSrRD0SyqI=;EntityPath=sdk-Relay-Wcf-8132\",\r\n \"primaryKey\": \"y3uEv7uvtu5RlqHiN3wk2SuFQeqlqDjrxp1uxDJf64A=\",\r\n \"secondaryKey\": \"no+zJXbTkAWx3rdW5EdfyMcJi+NpgYTDmgSrRD0SyqI=\",\r\n \"keyName\": \"sdk-RelayAuthRules-1301\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:50:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "920a733a-30d3-4783-b14d-51f4bba9b9c4_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "4969a258-bf23-40fb-9a21-f49cc5e0bf55" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T025057Z:4969a258-bf23-40fb-9a21-f49cc5e0bf55" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488/WcfRelays/sdk-Relay-Wcf-8132/authorizationRules/sdk-RelayAuthRules-1301/regenerateKeys?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjQ4OC9XY2ZSZWxheXMvc2RrLVJlbGF5LVdjZi04MTMyL2F1dGhvcml6YXRpb25SdWxlcy9zZGstUmVsYXlBdXRoUnVsZXMtMTMwMS9yZWdlbmVyYXRlS2V5cz9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"policyKey\": \"PrimaryKey\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "33" + ], + "x-ms-client-request-id": [ + "d2b40652-f51f-4b5b-8d8f-be8685f4939b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"primaryConnectionString\": \"Endpoint=sb://sdk-relaynamespace-2488.servicebus.windows.net/;SharedAccessKeyName=sdk-RelayAuthRules-1301;SharedAccessKey=RFt7CEbSVaCwDqQa3s8XXkzdAWp3fhnBA//odp3F6QE=;EntityPath=sdk-Relay-Wcf-8132\",\r\n \"secondaryConnectionString\": \"Endpoint=sb://sdk-relaynamespace-2488.servicebus.windows.net/;SharedAccessKeyName=sdk-RelayAuthRules-1301;SharedAccessKey=no+zJXbTkAWx3rdW5EdfyMcJi+NpgYTDmgSrRD0SyqI=;EntityPath=sdk-Relay-Wcf-8132\",\r\n \"primaryKey\": \"RFt7CEbSVaCwDqQa3s8XXkzdAWp3fhnBA//odp3F6QE=\",\r\n \"secondaryKey\": \"no+zJXbTkAWx3rdW5EdfyMcJi+NpgYTDmgSrRD0SyqI=\",\r\n \"keyName\": \"sdk-RelayAuthRules-1301\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:50:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f5a68ee0-8006-44d6-a1ae-cd457cd0bdce_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-correlation-request-id": [ + "7db8dbc1-dd10-4da0-a958-b0f875a7d45f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T025058Z:7db8dbc1-dd10-4da0-a958-b0f875a7d45f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488/WcfRelays/sdk-Relay-Wcf-8132/authorizationRules/sdk-RelayAuthRules-1301/regenerateKeys?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjQ4OC9XY2ZSZWxheXMvc2RrLVJlbGF5LVdjZi04MTMyL2F1dGhvcml6YXRpb25SdWxlcy9zZGstUmVsYXlBdXRoUnVsZXMtMTMwMS9yZWdlbmVyYXRlS2V5cz9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"policyKey\": \"SecondaryKey\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "35" + ], + "x-ms-client-request-id": [ + "ecc3431d-e02c-4043-9a9a-f5e7f5893e82" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "{\r\n \"primaryConnectionString\": \"Endpoint=sb://sdk-relaynamespace-2488.servicebus.windows.net/;SharedAccessKeyName=sdk-RelayAuthRules-1301;SharedAccessKey=RFt7CEbSVaCwDqQa3s8XXkzdAWp3fhnBA//odp3F6QE=;EntityPath=sdk-Relay-Wcf-8132\",\r\n \"secondaryConnectionString\": \"Endpoint=sb://sdk-relaynamespace-2488.servicebus.windows.net/;SharedAccessKeyName=sdk-RelayAuthRules-1301;SharedAccessKey=5+vLrTdXX4Gjr3A9IOw8pjfQORtLJXwyAFEnceOBlbg=;EntityPath=sdk-Relay-Wcf-8132\",\r\n \"primaryKey\": \"RFt7CEbSVaCwDqQa3s8XXkzdAWp3fhnBA//odp3F6QE=\",\r\n \"secondaryKey\": \"5+vLrTdXX4Gjr3A9IOw8pjfQORtLJXwyAFEnceOBlbg=\",\r\n \"keyName\": \"sdk-RelayAuthRules-1301\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:50:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "1ba56e3a-f048-4998-ae2e-7ad7dcc6341e_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1192" + ], + "x-ms-correlation-request-id": [ + "c898acf5-7e44-4699-bc42-ed202d698bfc" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T025059Z:c898acf5-7e44-4699-bc42-ed202d698bfc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488/WcfRelays/sdk-Relay-Wcf-8132/authorizationRules/sdk-RelayAuthRules-1301?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjQ4OC9XY2ZSZWxheXMvc2RrLVJlbGF5LVdjZi04MTMyL2F1dGhvcml6YXRpb25SdWxlcy9zZGstUmVsYXlBdXRoUnVsZXMtMTMwMT9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "508eae5e-7385-40cf-ad05-e32c510cb694" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:50:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "c3fda96d-2cdb-4dcc-b7df-0d44d9152dd6_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1191" + ], + "x-ms-correlation-request-id": [ + "b6fa5ad9-f2d5-46c0-b74a-cd564b2b7f84" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T025100Z:b6fa5ad9-f2d5-46c0-b74a-cd564b2b7f84" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488/WcfRelays/sdk-Relay-Wcf-8132?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjQ4OC9XY2ZSZWxheXMvc2RrLVJlbGF5LVdjZi04MTMyP2FwaS12ZXJzaW9uPTIwMTYtMDctMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7f2b1980-37e5-4c41-b641-7716acba5ebd" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:51:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1190" + ], + "x-ms-request-id": [ + "09f059a6-8b56-4c9e-a793-bcde37d5ad12" + ], + "x-ms-correlation-request-id": [ + "09f059a6-8b56-4c9e-a793-bcde37d5ad12" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T025100Z:09f059a6-8b56-4c9e-a793-bcde37d5ad12" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjQ4OD9hcGktdmVyc2lvbj0yMDE2LTA3LTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e0ce6aac-b29f-4892-a65c-4f19dd7a4cc2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:51:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488/operationresults/sdk-RelayNamespace-2488?api-version=2016-07-01" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "bd676a54-4544-4038-a3e0-53a68bfea30f_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1189" + ], + "x-ms-correlation-request-id": [ + "21094a26-a292-41bd-affb-53bc2f62bc21" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T025102Z:21094a26-a292-41bd-affb-53bc2f62bc21" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2488/operationresults/sdk-RelayNamespace-2488?api-version=2016-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTJmMzYxZjAtM2IyNy00NTAzLWE5Y2MtMjFjZmJhMzgwMDkzL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTm90aWZpY2F0aW9uSHVicy1BdXN0cmFsaWFFYXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVsYXkvbmFtZXNwYWNlcy9zZGstUmVsYXlOYW1lc3BhY2UtMjQ4OC9vcGVyYXRpb25yZXN1bHRzL3Nkay1SZWxheU5hbWVzcGFjZS0yNDg4P2FwaS12ZXJzaW9uPTIwMTYtMDctMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.24410.01", + "Microsoft.Azure.Management.Relay.RelayManagementClient/0.0.1-preview" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Mar 2017 02:51:31 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "8da6e0e2-7988-4d1b-b886-b51ff7664394_M0_M0" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "6fe85430-c832-4be4-bdb9-d1f96447cc0a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170330T025132Z:6fe85430-c832-4be4-bdb9-d1f96447cc0a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "WCFRelayCreateGetUpdateDeleteAuthorizationRules": [ + "sdk-RelayNamespace-2488", + "sdk-Relay-Wcf-8132", + "sdk-RelayAuthRules-1301" + ] + }, + "Variables": { + "SubscriptionId": "e2f361f0-3b27-4503-a9cc-21cfba380093", + "CreatePrimaryKey": "r0Ecnd2dGd53EhJAHMhhzWLaqtORY+O5xo/iZ7b8xEk=", + "UpdatePrimaryKey": "ANY8sHcspnZztlf7l0RS1nYpsvMF+ZE+dw1rC6hB/Xk=" + } +} \ No newline at end of file diff --git a/src/ResourceManagement/Relay/Relay.Tests/Tests/ScenarioTests.CheckNameAvailability.cs b/src/ResourceManagement/Relay/Relay.Tests/Tests/ScenarioTests.CheckNameAvailability.cs new file mode 100644 index 000000000000..ea3e82b6d077 --- /dev/null +++ b/src/ResourceManagement/Relay/Relay.Tests/Tests/ScenarioTests.CheckNameAvailability.cs @@ -0,0 +1,95 @@ +// +// +// Copyright (c) Microsoft. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +namespace Relay.Tests.ScenarioTests +{ + using System; + using System.Collections.Generic; + using System.Linq; + using Microsoft.Azure.Management.Relay; + using Microsoft.Azure.Management.Relay.Models; + using Microsoft.Rest.ClientRuntime.Azure.TestFramework; + using Relay.Tests.TestHelper; + using Xunit; + public partial class ScenarioTests + { + [Fact] + public void CheckNameAvailability() + { + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + InitializeClients(context); + var location = this.ResourceManagementClient.GetLocationFromProvider(); + var resourceGroup = this.ResourceManagementClient.TryGetResourceGroup(location); + if (string.IsNullOrWhiteSpace(resourceGroup)) + { + resourceGroup = TestUtilities.GenerateName(RelayManagementHelper.ResourceGroupPrefix); + this.ResourceManagementClient.TryRegisterResourceGroup(location, resourceGroup); + } + + // Create Namespace + var namespaceName = TestUtilities.GenerateName(RelayManagementHelper.NamespacePrefix); + + // CheckNameAvailability + var checkNameAvailabilityResponse = this.RelayManagementClient.Namespaces.CheckNameAvailabilityMethod(new CheckNameAvailability { Name = namespaceName }); + + Assert.True(checkNameAvailabilityResponse.NameAvailable); + + var createNamespaceResponse = this.RelayManagementClient.Namespaces.CreateOrUpdate(resourceGroup, namespaceName, + new RelayNamespace() + { + Location = location, + //Sku = new Sku + //{ + // Name = "Standard" + //}, + + Tags = new Dictionary() + { + {"tag1", "value1"}, + {"tag2", "value2"} + } + + }); + + Assert.NotNull(createNamespaceResponse); + Assert.Equal(createNamespaceResponse.Name, namespaceName); + Assert.Equal(createNamespaceResponse.Tags.Count, 2); + Assert.Equal(createNamespaceResponse.Type, "Microsoft.Relay/namespaces"); + TestUtilities.Wait(TimeSpan.FromSeconds(5)); + + + // CheckNameAvailability + var checkNameAvailabilityResponse1 = this.RelayManagementClient.Namespaces.CheckNameAvailabilityMethod(new CheckNameAvailability { Name = namespaceName }); + Assert.False(checkNameAvailabilityResponse1.NameAvailable); + Assert.True(checkNameAvailabilityResponse1.Reason == UnavailableReason.NameInUse); + + checkNameAvailabilityResponse1 = this.RelayManagementClient.Namespaces.CheckNameAvailabilityMethod(new CheckNameAvailability { Name = "12@" }); + Assert.False(checkNameAvailabilityResponse1.NameAvailable); + Assert.True(checkNameAvailabilityResponse1.Reason == UnavailableReason.InvalidName); + + try + { + // Delete namespace + RelayManagementClient.Namespaces.Delete(resourceGroup, namespaceName); + } + catch (Exception ex) + { + Assert.True(ex.Message.Contains("NotFound")); + } + } + } + } +} diff --git a/src/ResourceManagement/Relay/Relay.Tests/Tests/ScenarioTests.HybridConnectionsTests.CRUD.cs b/src/ResourceManagement/Relay/Relay.Tests/Tests/ScenarioTests.HybridConnectionsTests.CRUD.cs new file mode 100644 index 000000000000..fc0801b0324b --- /dev/null +++ b/src/ResourceManagement/Relay/Relay.Tests/Tests/ScenarioTests.HybridConnectionsTests.CRUD.cs @@ -0,0 +1,145 @@ +// +// +// Copyright (c) Microsoft. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +namespace Relay.Tests.ScenarioTests +{ + using System; + using System.Collections.Generic; + using System.Linq; + using Microsoft.Azure.Management.Relay; + using Microsoft.Azure.Management.Relay.Models; + using Microsoft.Rest.ClientRuntime.Azure.TestFramework; + using Relay.Tests.TestHelper; + using Xunit; + public partial class ScenarioTests + { + [Fact] + public void HybridConnectionsCreateGetUpdateDelete() + { + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + InitializeClients(context); + var location = this.ResourceManagementClient.GetLocationFromProvider(); + + var resourceGroup = this.ResourceManagementClient.TryGetResourceGroup(location); + if (string.IsNullOrWhiteSpace(resourceGroup)) + { + resourceGroup = TestUtilities.GenerateName(RelayManagementHelper.ResourceGroupPrefix); + this.ResourceManagementClient.TryRegisterResourceGroup(location, resourceGroup); + } + + // Create Namespace + var namespaceName = TestUtilities.GenerateName(RelayManagementHelper.NamespacePrefix); + + var responseOperationlist = this.RelayManagementClient.Operations.List(); + + var responseCheckNameAvailability = this.RelayManagementClient.Namespaces.CheckNameAvailabilityMethod(new CheckNameAvailability { Name = namespaceName }); + + var createNamespaceResponse = this.RelayManagementClient.Namespaces.CreateOrUpdate(resourceGroup, namespaceName, + new RelayNamespace() + { + Location = location, + Tags = new Dictionary() + { + {"tag1", "value1"}, + {"tag2", "value2"} + } + + }); + + Assert.NotNull(createNamespaceResponse); + Assert.Equal(createNamespaceResponse.Name, namespaceName); + Assert.Equal(createNamespaceResponse.Tags.Count, 2); + Assert.Equal(createNamespaceResponse.Type, "Microsoft.Relay/namespaces"); + TestUtilities.Wait(TimeSpan.FromSeconds(5)); + + // Get the created namespace + var getNamespaceResponse = RelayManagementClient.Namespaces.Get(resourceGroup, namespaceName); + if (string.Compare(getNamespaceResponse.ProvisioningState, "Succeeded", true) != 0) + TestUtilities.Wait(TimeSpan.FromSeconds(5)); + + getNamespaceResponse = RelayManagementClient.Namespaces.Get(resourceGroup, namespaceName); + Assert.NotNull(getNamespaceResponse); + Assert.Equal("Succeeded", getNamespaceResponse.ProvisioningState, StringComparer.CurrentCultureIgnoreCase); + Assert.Equal(location, getNamespaceResponse.Location, StringComparer.CurrentCultureIgnoreCase); + + // Get all namespaces created within a resourceGroup + var getAllNamespacesResponse = RelayManagementClient.Namespaces.ListByResourceGroup(resourceGroup); + Assert.NotNull(getAllNamespacesResponse); + Assert.True(getAllNamespacesResponse.Count() >= 1); + Assert.True(getAllNamespacesResponse.Any(ns => ns.Name == namespaceName)); + Assert.True(getAllNamespacesResponse.All(ns => ns.Id.Contains(resourceGroup))); + + // Get all namespaces created within the subscription irrespective of the resourceGroup + getAllNamespacesResponse = RelayManagementClient.Namespaces.List(); + Assert.NotNull(getAllNamespacesResponse); + Assert.True(getAllNamespacesResponse.Count() >= 1); + Assert.True(getAllNamespacesResponse.Any(ns => ns.Name == namespaceName)); + + // Create HybridConnections Relay - + var hybridConnectionsName = TestUtilities.GenerateName(RelayManagementHelper.HybridPrefix); + var createdWCFRelayResponse = RelayManagementClient.HybridConnections.CreateOrUpdate(resourceGroup, namespaceName, hybridConnectionsName, new HybridConnection() + { + RequiresClientAuthorization = true + }); + + Assert.NotNull(createdWCFRelayResponse); + Assert.Equal(createdWCFRelayResponse.Name, hybridConnectionsName); + Assert.True(createdWCFRelayResponse.RequiresClientAuthorization); + + var getWCFRelaysResponse = RelayManagementClient.HybridConnections.Get(resourceGroup, namespaceName, hybridConnectionsName); + + Assert.NotNull(createdWCFRelayResponse); + Assert.Equal(createdWCFRelayResponse.Name, hybridConnectionsName); + Assert.True(createdWCFRelayResponse.RequiresClientAuthorization); + + //Update User Metadata for HybridConnections + string strUserMetadata = "usermetadata is a placeholder to store user-defined string data for the HybridConnection endpoint.e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored."; + createdWCFRelayResponse.UserMetadata = strUserMetadata; + + var updateWCFRelays = RelayManagementClient.HybridConnections.CreateOrUpdate(resourceGroup, namespaceName, hybridConnectionsName, createdWCFRelayResponse); + Assert.Equal(createdWCFRelayResponse.Name, hybridConnectionsName); + Assert.True(createdWCFRelayResponse.RequiresClientAuthorization); + Assert.Equal(createdWCFRelayResponse.UserMetadata, strUserMetadata); + + //Get List of all Hybridconnections in given NameSpace. + var listAllHybridConnectionResponse = RelayManagementClient.HybridConnections.ListByNamespace(resourceGroup, namespaceName); + Assert.NotNull(listAllHybridConnectionResponse); + Assert.True(listAllHybridConnectionResponse.Count() >= 1); + Assert.True(listAllHybridConnectionResponse.All(hy => hy.Id.Contains(resourceGroup))); + + //Delete the HybridConnections created + try + { + RelayManagementClient.HybridConnections.Delete(resourceGroup, namespaceName, hybridConnectionsName); + } + catch (Exception ex) + { + Assert.True(ex.Message.Contains("NotFound")); + } + + try + { + // Delete namespace + RelayManagementClient.Namespaces.Delete(resourceGroup, namespaceName); + } + catch (Exception ex) + { + Assert.True(ex.Message.Contains("NotFound")); + } + } + } + } +} diff --git a/src/ResourceManagement/Relay/Relay.Tests/Tests/ScenarioTests.HybridConnectionsTests.CRUDAuthorizationRules.cs b/src/ResourceManagement/Relay/Relay.Tests/Tests/ScenarioTests.HybridConnectionsTests.CRUDAuthorizationRules.cs new file mode 100644 index 000000000000..7e71f8157ff1 --- /dev/null +++ b/src/ResourceManagement/Relay/Relay.Tests/Tests/ScenarioTests.HybridConnectionsTests.CRUDAuthorizationRules.cs @@ -0,0 +1,213 @@ +// +// +// Copyright (c) Microsoft. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +namespace Relay.Tests.ScenarioTests +{ + using System; + using System.Collections.Generic; + using System.Linq; + using Microsoft.Azure.Management.Relay; + using Microsoft.Azure.Management.Relay.Models; + using Microsoft.Azure.Test.HttpRecorder; + using Microsoft.Rest.ClientRuntime.Azure.TestFramework; + using Relay.Tests.TestHelper; + using Xunit; + public partial class ScenarioTests + { + [Fact] + public void HybridConnectionsCreateGetUpdateDeleteAuthorizationRules() + { + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + InitializeClients(context); + + var location = this.ResourceManagementClient.GetLocationFromProvider(); + var resourceGroup = this.ResourceManagementClient.TryGetResourceGroup(location); + if (string.IsNullOrWhiteSpace(resourceGroup)) + { + resourceGroup = TestUtilities.GenerateName(RelayManagementHelper.ResourceGroupPrefix); + this.ResourceManagementClient.TryRegisterResourceGroup(location, resourceGroup); + } + + // Create Namespace + var namespaceName = TestUtilities.GenerateName(RelayManagementHelper.NamespacePrefix); + + var createNamespaceResponse = this.RelayManagementClient.Namespaces.CreateOrUpdate(resourceGroup, namespaceName, + new RelayNamespace() + { + Location = location, + Tags = new Dictionary() + { + {"tag1", "value1"}, + {"tag2", "value2"} + } + + }); + + Assert.NotNull(createNamespaceResponse); + Assert.Equal(createNamespaceResponse.Name, namespaceName); + Assert.Equal(createNamespaceResponse.Tags.Count, 2); + Assert.Equal(createNamespaceResponse.Type, "Microsoft.Relay/namespaces"); + TestUtilities.Wait(TimeSpan.FromSeconds(5)); + + // Get the created namespace + var getNamespaceResponse = RelayManagementClient.Namespaces.Get(resourceGroup, namespaceName); + if (string.Compare(getNamespaceResponse.ProvisioningState, "Succeeded", true) != 0) + TestUtilities.Wait(TimeSpan.FromSeconds(5)); + + getNamespaceResponse = RelayManagementClient.Namespaces.Get(resourceGroup, namespaceName); + Assert.NotNull(getNamespaceResponse); + Assert.Equal("Succeeded", getNamespaceResponse.ProvisioningState, StringComparer.CurrentCultureIgnoreCase); + Assert.Equal(location, getNamespaceResponse.Location, StringComparer.CurrentCultureIgnoreCase); + + // Get all namespaces created within a resourceGroup + var getAllNamespacesResponse = RelayManagementClient.Namespaces.ListByResourceGroup(resourceGroup); + Assert.NotNull(getAllNamespacesResponse); + Assert.True(getAllNamespacesResponse.Count() >= 1); + Assert.True(getAllNamespacesResponse.Any(ns => ns.Name == namespaceName)); + Assert.True(getAllNamespacesResponse.All(ns => ns.Id.Contains(resourceGroup))); + + // Get all namespaces created within the subscription irrespective of the resourceGroup + getAllNamespacesResponse = RelayManagementClient.Namespaces.List(); + Assert.NotNull(getAllNamespacesResponse); + Assert.True(getAllNamespacesResponse.Count() >= 1); + Assert.True(getAllNamespacesResponse.Any(ns => ns.Name == namespaceName)); + + // Create Relay HybridConnections - + var hybridConnectionsName = TestUtilities.GenerateName(RelayManagementHelper.HybridPrefix); + var createdWCFRelayResponse = RelayManagementClient.HybridConnections.CreateOrUpdate(resourceGroup, namespaceName, hybridConnectionsName, new HybridConnection() + { + RequiresClientAuthorization = true, + }); + + Assert.NotNull(createdWCFRelayResponse); + Assert.Equal(createdWCFRelayResponse.Name, hybridConnectionsName); + Assert.True(createdWCFRelayResponse.RequiresClientAuthorization); + + var getWCFRelaysResponse = RelayManagementClient.HybridConnections.Get(resourceGroup, namespaceName, hybridConnectionsName); + + // Create a HybridConnections AuthorizationRule + var authorizationRuleName = TestUtilities.GenerateName(RelayManagementHelper.AuthorizationRulesPrefix); + string createPrimaryKey = HttpMockServer.GetVariable("CreatePrimaryKey", RelayManagementHelper.GenerateRandomKey()); + var createAutorizationRuleParameter = new AuthorizationRule() + { + Rights = new List() { AccessRights.Listen, AccessRights.Send } + }; + + var jsonStr = RelayManagementHelper.ConvertObjectToJSon(createAutorizationRuleParameter); + + var test = RelayManagementClient.HybridConnections.CreateOrUpdateAuthorizationRule(resourceGroup, namespaceName, hybridConnectionsName, authorizationRuleName, createAutorizationRuleParameter); + + var createNamespaceAuthorizationRuleResponse = RelayManagementClient.HybridConnections.CreateOrUpdateAuthorizationRule(resourceGroup, namespaceName, hybridConnectionsName, + authorizationRuleName, createAutorizationRuleParameter); + Assert.NotNull(createNamespaceAuthorizationRuleResponse); + Assert.True(createNamespaceAuthorizationRuleResponse.Rights.Count == createAutorizationRuleParameter.Rights.Count); + foreach (var right in createAutorizationRuleParameter.Rights) + { + Assert.True(createNamespaceAuthorizationRuleResponse.Rights.Any(r => r == right)); + } + + // Get created HybridConnections AuthorizationRules + var getNamespaceAuthorizationRulesResponse = RelayManagementClient.HybridConnections.GetAuthorizationRule(resourceGroup, namespaceName, hybridConnectionsName, authorizationRuleName); + Assert.NotNull(getNamespaceAuthorizationRulesResponse); + Assert.True(getNamespaceAuthorizationRulesResponse.Rights.Count == createAutorizationRuleParameter.Rights.Count); + foreach (var right in createAutorizationRuleParameter.Rights) + { + Assert.True(getNamespaceAuthorizationRulesResponse.Rights.Any(r => r == right)); + } + + // Get all HybridConnections AuthorizationRules + var getAllNamespaceAuthorizationRulesResponse = RelayManagementClient.HybridConnections.ListAuthorizationRules(resourceGroup, namespaceName, hybridConnectionsName); + Assert.NotNull(getAllNamespaceAuthorizationRulesResponse); + Assert.True(getAllNamespaceAuthorizationRulesResponse.Count() >= 1); + Assert.True(getAllNamespaceAuthorizationRulesResponse.Any(ns => ns.Name == authorizationRuleName)); + + // Update HybridConnections authorizationRule + string updatePrimaryKey = HttpMockServer.GetVariable("UpdatePrimaryKey", RelayManagementHelper.GenerateRandomKey()); + AuthorizationRule updateNamespaceAuthorizationRuleParameter = new AuthorizationRule(); + updateNamespaceAuthorizationRuleParameter.Rights = new List() { AccessRights.Listen }; + + var updateNamespaceAuthorizationRuleResponse = RelayManagementClient.HybridConnections.CreateOrUpdateAuthorizationRule(resourceGroup, + namespaceName, hybridConnectionsName, authorizationRuleName, updateNamespaceAuthorizationRuleParameter); + + Assert.NotNull(updateNamespaceAuthorizationRuleResponse); + Assert.Equal(authorizationRuleName, updateNamespaceAuthorizationRuleResponse.Name); + Assert.True(updateNamespaceAuthorizationRuleResponse.Rights.Count == updateNamespaceAuthorizationRuleParameter.Rights.Count); + foreach (var right in updateNamespaceAuthorizationRuleParameter.Rights) + { + Assert.True(updateNamespaceAuthorizationRuleResponse.Rights.Any(r => r.Equals(right))); + } + + // Get the HybridConnections namespace AuthorizationRule + var getNamespaceAuthorizationRuleResponse = RelayManagementClient.HybridConnections.GetAuthorizationRule(resourceGroup, namespaceName, hybridConnectionsName, authorizationRuleName); + Assert.NotNull(getNamespaceAuthorizationRuleResponse); + Assert.Equal(authorizationRuleName, getNamespaceAuthorizationRuleResponse.Name); + Assert.True(getNamespaceAuthorizationRuleResponse.Rights.Count == updateNamespaceAuthorizationRuleParameter.Rights.Count); + foreach (var right in updateNamespaceAuthorizationRuleParameter.Rights) + { + Assert.True(getNamespaceAuthorizationRuleResponse.Rights.Any(r => r.Equals(right))); + } + + // Get the connectionString to the HybridConnections for a Authorization rule created + var listKeysResponse = RelayManagementClient.HybridConnections.ListKeys(resourceGroup, namespaceName, hybridConnectionsName, authorizationRuleName); + Assert.NotNull(listKeysResponse); + Assert.NotNull(listKeysResponse.PrimaryConnectionString); + Assert.NotNull(listKeysResponse.SecondaryConnectionString); + + // Regenerate AuthorizationRules + var regenerateKeysParameters = new RegenerateKeysParameters(); + regenerateKeysParameters.PolicyKey = PolicyKey.PrimaryKey; + + //Primary Key + var regenerateKeysPrimaryResponse = RelayManagementClient.HybridConnections.RegenerateKeys(resourceGroup, namespaceName, hybridConnectionsName, authorizationRuleName, regenerateKeysParameters); + Assert.NotNull(regenerateKeysPrimaryResponse); + Assert.NotEqual(regenerateKeysPrimaryResponse.PrimaryKey, listKeysResponse.PrimaryKey); + Assert.Equal(regenerateKeysPrimaryResponse.SecondaryKey, listKeysResponse.SecondaryKey); + + + regenerateKeysParameters.PolicyKey = PolicyKey.SecondaryKey; + + //Secondary Key + var regenerateKeysSecondaryResponse = RelayManagementClient.HybridConnections.RegenerateKeys(resourceGroup, namespaceName, hybridConnectionsName, authorizationRuleName, regenerateKeysParameters); + Assert.NotNull(regenerateKeysSecondaryResponse); + Assert.NotEqual(regenerateKeysSecondaryResponse.SecondaryKey, listKeysResponse.SecondaryKey); + Assert.Equal(regenerateKeysSecondaryResponse.PrimaryKey, regenerateKeysPrimaryResponse.PrimaryKey); + + + // Delete HybridConnections authorizationRule + RelayManagementClient.HybridConnections.DeleteAuthorizationRule(resourceGroup, namespaceName, hybridConnectionsName, authorizationRuleName); + + try + { + RelayManagementClient.HybridConnections.Delete(resourceGroup, namespaceName, hybridConnectionsName); + } + catch (Exception ex) + { + Assert.True(ex.Message.Contains("NotFound")); + } + + try + { + // Delete namespace + RelayManagementClient.Namespaces.Delete(resourceGroup, namespaceName); + } + catch (Exception ex) + { + Assert.True(ex.Message.Contains("NotFound")); + } + } + } + } +} diff --git a/src/ResourceManagement/Relay/Relay.Tests/Tests/ScenarioTests.NamespaceTests.CRUD.cs b/src/ResourceManagement/Relay/Relay.Tests/Tests/ScenarioTests.NamespaceTests.CRUD.cs new file mode 100644 index 000000000000..b7c323d8b068 --- /dev/null +++ b/src/ResourceManagement/Relay/Relay.Tests/Tests/ScenarioTests.NamespaceTests.CRUD.cs @@ -0,0 +1,133 @@ +// +// +// Copyright (c) Microsoft. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +namespace Relay.Tests.ScenarioTests +{ + using System; + using System.Collections.Generic; + using System.Linq; + using Microsoft.Azure.Management.Relay; + using Microsoft.Azure.Management.Relay.Models; + using Microsoft.Rest.ClientRuntime.Azure.TestFramework; + using Relay.Tests.TestHelper; + using Xunit; + public partial class ScenarioTests + { + [Fact] + public void NamespaceCreateGetUpdateDelete() + { + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + InitializeClients(context); + + var location = this.ResourceManagementClient.GetLocationFromProvider(); + var resourceGroup = this.ResourceManagementClient.TryGetResourceGroup(location); + if (string.IsNullOrWhiteSpace(resourceGroup)) + { + resourceGroup = TestUtilities.GenerateName(RelayManagementHelper.ResourceGroupPrefix); + this.ResourceManagementClient.TryRegisterResourceGroup(location, resourceGroup); + } + + // Create Namespace + var namespaceName = TestUtilities.GenerateName(RelayManagementHelper.NamespacePrefix); + + + // CheckNameAvailability + var checkNameAvailabilityResponse = this.RelayManagementClient.Namespaces.CheckNameAvailabilityMethod(new CheckNameAvailability { Name = namespaceName }); + + Assert.True(checkNameAvailabilityResponse.NameAvailable); + + var createNamespaceResponse = this.RelayManagementClient.Namespaces.CreateOrUpdate(resourceGroup, namespaceName, + new RelayNamespace() + { + Location = location, + Tags = new Dictionary() + { + {"tag1", "value1"}, + {"tag2", "value2"} + } + + }); + + Assert.NotNull(createNamespaceResponse); + Assert.Equal(createNamespaceResponse.Name, namespaceName); + Assert.Equal(createNamespaceResponse.Tags.Count, 2); + Assert.Equal(createNamespaceResponse.Type, "Microsoft.Relay/namespaces"); + TestUtilities.Wait(TimeSpan.FromSeconds(5)); + + // Get the created namespace + var getNamespaceResponse = RelayManagementClient.Namespaces.Get(resourceGroup, namespaceName); + if (string.Compare(getNamespaceResponse.ProvisioningState, "Succeeded", true) != 0) + TestUtilities.Wait(TimeSpan.FromSeconds(5)); + + getNamespaceResponse = RelayManagementClient.Namespaces.Get(resourceGroup, namespaceName); + Assert.NotNull(getNamespaceResponse); + Assert.Equal("Succeeded", getNamespaceResponse.ProvisioningState, StringComparer.CurrentCultureIgnoreCase); + Assert.Equal(location, getNamespaceResponse.Location, StringComparer.CurrentCultureIgnoreCase); + + // Get all namespaces created within a resourceGroup + var getAllNamespacesResponse = RelayManagementClient.Namespaces.ListByResourceGroup(resourceGroup); + Assert.NotNull(getAllNamespacesResponse); + Assert.True(getAllNamespacesResponse.Count() >= 1); + Assert.True(getAllNamespacesResponse.Any(ns => ns.Name == namespaceName)); + Assert.True(getAllNamespacesResponse.All(ns => ns.Id.Contains(resourceGroup))); + + // Get all namespaces created within the subscription irrespective of the resourceGroup + getAllNamespacesResponse = RelayManagementClient.Namespaces.List(); + Assert.NotNull(getAllNamespacesResponse); + Assert.True(getAllNamespacesResponse.Count() >= 1); + Assert.True(getAllNamespacesResponse.Any(ns => ns.Name == namespaceName)); + + // Update namespace tags + var updateNamespaceParameter = new RelayNamespaceUpdateParameter() + { + Tags = new Dictionary() + { + {"tag3", "value3"}, + {"tag4", "value4"}, + {"tag5", "value5"}, + {"tag6", "value6"} + } + }; + + var updateNamespaceResponse = RelayManagementClient.Namespaces.Update(resourceGroup, namespaceName, updateNamespaceParameter); + + TestUtilities.Wait(TimeSpan.FromSeconds(5)); + + // Get the updated namespace + getNamespaceResponse = RelayManagementClient.Namespaces.Get(resourceGroup, namespaceName); + Assert.NotNull(getNamespaceResponse); + Assert.Equal(location, getNamespaceResponse.Location, StringComparer.CurrentCultureIgnoreCase); + Assert.Equal(namespaceName, getNamespaceResponse.Name); + Assert.Equal(getNamespaceResponse.Tags.Count, 4); + foreach (var tag in updateNamespaceParameter.Tags) + { + Assert.True(getNamespaceResponse.Tags.Any(t => t.Key.Equals(tag.Key))); + Assert.True(getNamespaceResponse.Tags.Any(t => t.Value.Equals(tag.Value))); + } + + try + { + // Delete namespace + RelayManagementClient.Namespaces.Delete(resourceGroup, namespaceName); + } + catch (Exception ex) + { + Assert.True(ex.Message.Contains("NotFound")); + } + } + } + } +} diff --git a/src/ResourceManagement/Relay/Relay.Tests/Tests/ScenarioTests.NamespaceTests.CRUDAuthorizationRules.cs b/src/ResourceManagement/Relay/Relay.Tests/Tests/ScenarioTests.NamespaceTests.CRUDAuthorizationRules.cs new file mode 100644 index 000000000000..6ae7bd18555c --- /dev/null +++ b/src/ResourceManagement/Relay/Relay.Tests/Tests/ScenarioTests.NamespaceTests.CRUDAuthorizationRules.cs @@ -0,0 +1,178 @@ +// +// +// Copyright (c) Microsoft. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +namespace Relay.Tests.ScenarioTests +{ + using System; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using Microsoft.Azure.Management.Relay; + using Microsoft.Azure.Management.Relay.Models; + using Microsoft.Azure.Test.HttpRecorder; + using Microsoft.Rest.Azure; + using Microsoft.Rest.ClientRuntime.Azure.TestFramework; + using Relay.Tests.TestHelper; + using Xunit; + public partial class ScenarioTests + { + [Fact] + public void NamespaceCreateGetUpdateDeleteAuthorizationRules() + { + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + InitializeClients(context); + + var location = this.ResourceManagementClient.GetLocationFromProvider(); + var resourceGroup = this.ResourceManagementClient.TryGetResourceGroup(location); + if (string.IsNullOrWhiteSpace(resourceGroup)) + { + resourceGroup = TestUtilities.GenerateName(RelayManagementHelper.ResourceGroupPrefix); + this.ResourceManagementClient.TryRegisterResourceGroup(location, resourceGroup); + } + + // Create a namespace + var namespaceName = TestUtilities.GenerateName(RelayManagementHelper.NamespacePrefix); + var createNamespaceResponse = RelayManagementClient.Namespaces.CreateOrUpdate(resourceGroup, namespaceName, + new RelayNamespace() + { + Location = location, + }); + + Assert.NotNull(createNamespaceResponse); + Assert.Equal(createNamespaceResponse.Name, namespaceName); + + TestUtilities.Wait(TimeSpan.FromSeconds(5)); + + // Get the created namespace + var getNamespaceResponse = RelayManagementClient.Namespaces.Get(resourceGroup, namespaceName); + if (string.Compare(getNamespaceResponse.ProvisioningState, "Succeeded", true) != 0) + TestUtilities.Wait(TimeSpan.FromSeconds(5)); + + getNamespaceResponse = RelayManagementClient.Namespaces.Get(resourceGroup, namespaceName); + Assert.NotNull(getNamespaceResponse); + Assert.Equal("Succeeded", getNamespaceResponse.ProvisioningState, StringComparer.CurrentCultureIgnoreCase); + Assert.Equal(location, getNamespaceResponse.Location, StringComparer.CurrentCultureIgnoreCase); + + // Create a namespace AuthorizationRule + var authorizationRuleName = TestUtilities.GenerateName(RelayManagementHelper.AuthorizationRulesPrefix); + string createPrimaryKey = HttpMockServer.GetVariable("CreatePrimaryKey", RelayManagementHelper.GenerateRandomKey()); + var createAutorizationRuleParameter = new AuthorizationRule() + { + Rights = new List() { AccessRights.Listen, AccessRights.Send } + }; + + var jsonStr = RelayManagementHelper.ConvertObjectToJSon(createAutorizationRuleParameter); + + var createNamespaceAuthorizationRuleResponse = RelayManagementClient.Namespaces.CreateOrUpdateAuthorizationRule(resourceGroup, namespaceName, + authorizationRuleName, createAutorizationRuleParameter); + Assert.NotNull(createNamespaceAuthorizationRuleResponse); + Assert.True(createNamespaceAuthorizationRuleResponse.Rights.Count == createAutorizationRuleParameter.Rights.Count); + foreach (var right in createAutorizationRuleParameter.Rights) + { + Assert.True(createNamespaceAuthorizationRuleResponse.Rights.Any(r => r == right)); + } + + // Get default namespace AuthorizationRules + var getNamespaceAuthorizationRulesResponse = RelayManagementClient.Namespaces.GetAuthorizationRule(resourceGroup, namespaceName, RelayManagementHelper.DefaultNamespaceAuthorizationRule); + Assert.NotNull(getNamespaceAuthorizationRulesResponse); + Assert.Equal(getNamespaceAuthorizationRulesResponse.Name, RelayManagementHelper.DefaultNamespaceAuthorizationRule); + Assert.True(getNamespaceAuthorizationRulesResponse.Rights.Any(r => r == AccessRights.Listen)); + Assert.True(getNamespaceAuthorizationRulesResponse.Rights.Any(r => r == AccessRights.Send)); + Assert.True(getNamespaceAuthorizationRulesResponse.Rights.Any(r => r == AccessRights.Manage)); + + // Get created namespace AuthorizationRules + getNamespaceAuthorizationRulesResponse = RelayManagementClient.Namespaces.GetAuthorizationRule(resourceGroup, namespaceName, authorizationRuleName); + Assert.NotNull(getNamespaceAuthorizationRulesResponse); + Assert.True(getNamespaceAuthorizationRulesResponse.Rights.Count == createAutorizationRuleParameter.Rights.Count); + foreach (var right in createAutorizationRuleParameter.Rights) + { + Assert.True(getNamespaceAuthorizationRulesResponse.Rights.Any(r => r == right)); + } + + // Get all namespaces AuthorizationRules + var getAllNamespaceAuthorizationRulesResponse = RelayManagementClient.Namespaces.ListAuthorizationRules(resourceGroup, namespaceName); + Assert.NotNull(getAllNamespaceAuthorizationRulesResponse); + Assert.True(getAllNamespaceAuthorizationRulesResponse.Count() > 1); + Assert.True(getAllNamespaceAuthorizationRulesResponse.Any(ns => ns.Name == authorizationRuleName)); + Assert.True(getAllNamespaceAuthorizationRulesResponse.Any(auth => auth.Name == RelayManagementHelper.DefaultNamespaceAuthorizationRule)); + + // Update namespace authorizationRule + string updatePrimaryKey = HttpMockServer.GetVariable("UpdatePrimaryKey", RelayManagementHelper.GenerateRandomKey()); + AuthorizationRule updateNamespaceAuthorizationRuleParameter = new AuthorizationRule(); + updateNamespaceAuthorizationRuleParameter.Rights = new List() { AccessRights.Listen }; + var updateNamespaceAuthorizationRuleResponse = RelayManagementClient.Namespaces.CreateOrUpdateAuthorizationRule(resourceGroup, + namespaceName, authorizationRuleName, updateNamespaceAuthorizationRuleParameter); + + Assert.NotNull(updateNamespaceAuthorizationRuleResponse); + Assert.Equal(authorizationRuleName, updateNamespaceAuthorizationRuleResponse.Name); + Assert.True(updateNamespaceAuthorizationRuleResponse.Rights.Count == updateNamespaceAuthorizationRuleParameter.Rights.Count); + foreach (var right in updateNamespaceAuthorizationRuleParameter.Rights) + { + Assert.True(updateNamespaceAuthorizationRuleResponse.Rights.Any(r => r.Equals(right))); + } + + // Get the updated namespace AuthorizationRule + var getNamespaceAuthorizationRuleResponse = RelayManagementClient.Namespaces.GetAuthorizationRule(resourceGroup, namespaceName,authorizationRuleName); + Assert.NotNull(getNamespaceAuthorizationRuleResponse); + Assert.Equal(authorizationRuleName, getNamespaceAuthorizationRuleResponse.Name); + Assert.True(getNamespaceAuthorizationRuleResponse.Rights.Count == updateNamespaceAuthorizationRuleParameter.Rights.Count); + foreach (var right in updateNamespaceAuthorizationRuleParameter.Rights) + { + Assert.True(getNamespaceAuthorizationRuleResponse.Rights.Any(r => r.Equals(right))); + } + + // Get the connectionString to the namespace for a Authorization rule created + var listKeysResponse = RelayManagementClient.Namespaces.ListKeys(resourceGroup, namespaceName, authorizationRuleName); + Assert.NotNull(listKeysResponse); + Assert.NotNull(listKeysResponse.PrimaryConnectionString); + Assert.NotNull(listKeysResponse.SecondaryConnectionString); + + // Regenerate AuthorizationRules + var regenerateKeysParameters = new RegenerateKeysParameters(); + regenerateKeysParameters.PolicyKey = PolicyKey.PrimaryKey; + + //Primary Key + var regenerateKeysPrimaryResponse = RelayManagementClient.Namespaces.RegenerateKeys(resourceGroup, namespaceName, authorizationRuleName, regenerateKeysParameters); + Assert.NotNull(regenerateKeysPrimaryResponse); + Assert.NotEqual(regenerateKeysPrimaryResponse.PrimaryKey, listKeysResponse.PrimaryKey); + Assert.Equal(regenerateKeysPrimaryResponse.SecondaryKey, listKeysResponse.SecondaryKey); + + + regenerateKeysParameters.PolicyKey = PolicyKey.SecondaryKey; + //Secondary Key + var regenerateKeysSecondaryResponse = RelayManagementClient.Namespaces.RegenerateKeys(resourceGroup, namespaceName, authorizationRuleName, regenerateKeysParameters); + Assert.NotNull(regenerateKeysSecondaryResponse); + Assert.NotEqual(regenerateKeysSecondaryResponse.SecondaryKey, listKeysResponse.SecondaryKey); + Assert.Equal(regenerateKeysSecondaryResponse.PrimaryKey, regenerateKeysPrimaryResponse.PrimaryKey); + // Delete namespace authorizationRule + RelayManagementClient.Namespaces.DeleteAuthorizationRule(resourceGroup, namespaceName, authorizationRuleName); + + TestUtilities.Wait(TimeSpan.FromSeconds(5)); + + try + { + // Delete namespace + RelayManagementClient.Namespaces.Delete(resourceGroup, namespaceName); + } + catch (Exception ex) + { + Assert.True(ex.Message.Contains("NotFound")); + } + } + } + } +} diff --git a/src/ResourceManagement/Relay/Relay.Tests/Tests/ScenarioTests.OperationList.cs b/src/ResourceManagement/Relay/Relay.Tests/Tests/ScenarioTests.OperationList.cs new file mode 100644 index 000000000000..9d2be0a880c0 --- /dev/null +++ b/src/ResourceManagement/Relay/Relay.Tests/Tests/ScenarioTests.OperationList.cs @@ -0,0 +1,44 @@ +// +// +// Copyright (c) Microsoft. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +namespace Relay.Tests.ScenarioTests +{ + using System; + using System.Collections.Generic; + using System.Linq; + using Microsoft.Azure.Management.Relay; + using Microsoft.Azure.Management.Relay.Models; + using Microsoft.Rest.ClientRuntime.Azure.TestFramework; + using Relay.Tests.TestHelper; + using Xunit; + public partial class ScenarioTests + { + [Fact] + public void OperationList() + { + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + InitializeClients(context); + + //Get Operations + var ResponseOperationList = this.RelayManagementClient.Operations.List(); + + //Verify operations are returned + Assert.NotNull(ResponseOperationList); + Assert.True(ResponseOperationList.Count() > 0); + } + } + } +} diff --git a/src/ResourceManagement/Relay/Relay.Tests/Tests/ScenarioTests.WCFRelayTests.CRUD.cs b/src/ResourceManagement/Relay/Relay.Tests/Tests/ScenarioTests.WCFRelayTests.CRUD.cs new file mode 100644 index 000000000000..f97711a86265 --- /dev/null +++ b/src/ResourceManagement/Relay/Relay.Tests/Tests/ScenarioTests.WCFRelayTests.CRUD.cs @@ -0,0 +1,148 @@ +// +// +// Copyright (c) Microsoft. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +namespace Relay.Tests.ScenarioTests +{ + using System; + using System.Collections.Generic; + using System.Linq; + using Microsoft.Azure.Management.Relay; + using Microsoft.Azure.Management.Relay.Models; + using Microsoft.Rest.ClientRuntime.Azure.TestFramework; + using Relay.Tests.TestHelper; + using Xunit; + public partial class ScenarioTests + { + [Fact] + public void WCFRelayCreateGetUpdateDelete() + { + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + InitializeClients(context); + + var location = this.ResourceManagementClient.GetLocationFromProvider(); + var resourceGroup = this.ResourceManagementClient.TryGetResourceGroup(location); + if (string.IsNullOrWhiteSpace(resourceGroup)) + { + resourceGroup = TestUtilities.GenerateName(RelayManagementHelper.ResourceGroupPrefix); + this.ResourceManagementClient.TryRegisterResourceGroup(location, resourceGroup); + } + + // Create Namespace + var namespaceName = TestUtilities.GenerateName(RelayManagementHelper.NamespacePrefix); + + var createNamespaceResponse = this.RelayManagementClient.Namespaces.CreateOrUpdate(resourceGroup, namespaceName, new RelayNamespace() + { + Location = location, + Tags = new Dictionary() + { + {"tag1", "value1"}, + {"tag2", "value2"} + } + }); + + Assert.NotNull(createNamespaceResponse); + Assert.Equal(createNamespaceResponse.Name, namespaceName); + Assert.Equal(createNamespaceResponse.Tags.Count, 2); + Assert.Equal(createNamespaceResponse.Type, "Microsoft.Relay/namespaces"); + TestUtilities.Wait(TimeSpan.FromSeconds(5)); + + // Get the created namespace + var getNamespaceResponse = RelayManagementClient.Namespaces.Get(resourceGroup, namespaceName); + if (string.Compare(getNamespaceResponse.ProvisioningState, "Succeeded", true) != 0) + TestUtilities.Wait(TimeSpan.FromSeconds(5)); + + getNamespaceResponse = RelayManagementClient.Namespaces.Get(resourceGroup, namespaceName); + Assert.NotNull(getNamespaceResponse); + Assert.Equal("Succeeded", getNamespaceResponse.ProvisioningState, StringComparer.CurrentCultureIgnoreCase); + Assert.Equal(location, getNamespaceResponse.Location, StringComparer.CurrentCultureIgnoreCase); + + // Get all namespaces created within a resourceGroup + + var getAllNamespacesResponse = RelayManagementClient.Namespaces.ListByResourceGroup(resourceGroup); + Assert.NotNull(getAllNamespacesResponse); + Assert.True(getAllNamespacesResponse.Count() >= 1); + Assert.True(getAllNamespacesResponse.Any(ns => ns.Name == namespaceName)); + Assert.True(getAllNamespacesResponse.All(ns => ns.Id.Contains(resourceGroup))); + + // Get all namespaces created within the subscription irrespective of the resourceGroup + getAllNamespacesResponse = RelayManagementClient.Namespaces.List(); + Assert.NotNull(getAllNamespacesResponse); + Assert.True(getAllNamespacesResponse.Count() >= 1); + Assert.True(getAllNamespacesResponse.Any(ns => ns.Name == namespaceName)); + + // Create WCF Relay - + var wcfRelayName = TestUtilities.GenerateName(RelayManagementHelper.WcfPrefix); + var createdWCFRelayResponse = RelayManagementClient.WCFRelays.CreateOrUpdate(resourceGroup, namespaceName, wcfRelayName, new WcfRelay() + { + RelayType = Relaytype.NetTcp, + RequiresClientAuthorization = true, + RequiresTransportSecurity = true + }); + + Assert.NotNull(createdWCFRelayResponse); + Assert.Equal(createdWCFRelayResponse.Name, wcfRelayName); + Assert.True(createdWCFRelayResponse.RequiresClientAuthorization); + Assert.True(createdWCFRelayResponse.RequiresTransportSecurity); + Assert.Equal(createdWCFRelayResponse.RelayType, Relaytype.NetTcp); + + var getWCFRelaysResponse = RelayManagementClient.WCFRelays.Get(resourceGroup, namespaceName, wcfRelayName); + + Assert.NotNull(createdWCFRelayResponse); + Assert.Equal(createdWCFRelayResponse.Name, wcfRelayName); + Assert.True(createdWCFRelayResponse.RequiresClientAuthorization); + Assert.True(createdWCFRelayResponse.RequiresTransportSecurity); + Assert.Equal(createdWCFRelayResponse.RelayType, Relaytype.NetTcp); + + //Update User Metadata for WCFRelays + string strUserMetadata = "usermetadata is a placeholder to store user-defined string data for the HybridConnection endpoint.e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored."; + createdWCFRelayResponse.UserMetadata = strUserMetadata; + + var updateWCFRelays = RelayManagementClient.WCFRelays.CreateOrUpdate(resourceGroup, namespaceName, wcfRelayName, createdWCFRelayResponse); + Assert.Equal(createdWCFRelayResponse.Name, wcfRelayName); + Assert.True(createdWCFRelayResponse.RequiresClientAuthorization); + Assert.True(createdWCFRelayResponse.RequiresTransportSecurity); + Assert.Equal(createdWCFRelayResponse.RelayType, Relaytype.NetTcp); + Assert.Equal(createdWCFRelayResponse.UserMetadata, strUserMetadata); + + //Get List of all Hybridconnections in given NameSpace. + var listAllWCFRelaysResponse = RelayManagementClient.WCFRelays.ListByNamespace(resourceGroup, namespaceName); + Assert.NotNull(listAllWCFRelaysResponse); + Assert.True(listAllWCFRelaysResponse.Count() >= 1); + //Assert.True(listAllWCFRelaysResponse.Any(wcfRelay => wcfRelay.Name == wcfRelayName)); + Assert.True(listAllWCFRelaysResponse.All(wcfRelay => wcfRelay.Id.Contains(resourceGroup))); + + try + { + RelayManagementClient.WCFRelays.Delete(resourceGroup, namespaceName, wcfRelayName); + } + catch (Exception ex) + { + Assert.True(ex.Message.Contains("NotFound")); + } + + try + { + // Delete namespace + RelayManagementClient.Namespaces.Delete(resourceGroup, namespaceName); + } + catch (Exception ex) + { + Assert.True(ex.Message.Contains("NotFound")); + } + } + } + } +} diff --git a/src/ResourceManagement/Relay/Relay.Tests/Tests/ScenarioTests.WCFRelayTests.CRUDAuthorizationRules.cs b/src/ResourceManagement/Relay/Relay.Tests/Tests/ScenarioTests.WCFRelayTests.CRUDAuthorizationRules.cs new file mode 100644 index 000000000000..931f69aa856a --- /dev/null +++ b/src/ResourceManagement/Relay/Relay.Tests/Tests/ScenarioTests.WCFRelayTests.CRUDAuthorizationRules.cs @@ -0,0 +1,215 @@ +// +// +// Copyright (c) Microsoft. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +namespace Relay.Tests.ScenarioTests +{ + using System; + using System.Collections.Generic; + using System.Linq; + using Microsoft.Azure.Management.Relay; + using Microsoft.Azure.Management.Relay.Models; + using Microsoft.Azure.Test.HttpRecorder; + using Microsoft.Rest.ClientRuntime.Azure.TestFramework; + using Relay.Tests.TestHelper; + using Xunit; + public partial class ScenarioTests + { + [Fact] + public void WCFRelayCreateGetUpdateDeleteAuthorizationRules() + { + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + InitializeClients(context); + + var location = this.ResourceManagementClient.GetLocationFromProvider(); + + var resourceGroup = this.ResourceManagementClient.TryGetResourceGroup(location); + if (string.IsNullOrWhiteSpace(resourceGroup)) + { + resourceGroup = TestUtilities.GenerateName(RelayManagementHelper.ResourceGroupPrefix); + this.ResourceManagementClient.TryRegisterResourceGroup(location, resourceGroup); + } + + // Create Namespace + var namespaceName = TestUtilities.GenerateName(RelayManagementHelper.NamespacePrefix); + + var createNamespaceResponse = this.RelayManagementClient.Namespaces.CreateOrUpdate(resourceGroup, namespaceName, + new RelayNamespace() + { + Location = location, + Tags = new Dictionary() + { + {"tag1", "value1"}, + {"tag2", "value2"} + } + }); + + Assert.NotNull(createNamespaceResponse); + Assert.Equal(createNamespaceResponse.Name, namespaceName); + Assert.Equal(createNamespaceResponse.Tags.Count, 2); + Assert.Equal(createNamespaceResponse.Type, "Microsoft.Relay/namespaces"); + TestUtilities.Wait(TimeSpan.FromSeconds(5)); + + // Get the created namespace + var getNamespaceResponse = RelayManagementClient.Namespaces.Get(resourceGroup, namespaceName); + if (string.Compare(getNamespaceResponse.ProvisioningState, "Succeeded", true) != 0) + TestUtilities.Wait(TimeSpan.FromSeconds(5)); + + getNamespaceResponse = RelayManagementClient.Namespaces.Get(resourceGroup, namespaceName); + Assert.NotNull(getNamespaceResponse); + Assert.Equal("Succeeded", getNamespaceResponse.ProvisioningState, StringComparer.CurrentCultureIgnoreCase); + Assert.Equal(location, getNamespaceResponse.Location, StringComparer.CurrentCultureIgnoreCase); + + // Get all namespaces created within a resourceGroup + var getAllNamespacesResponse = RelayManagementClient.Namespaces.ListByResourceGroup(resourceGroup); + Assert.NotNull(getAllNamespacesResponse); + Assert.True(getAllNamespacesResponse.Count() >= 1); + Assert.True(getAllNamespacesResponse.Any(ns => ns.Name == namespaceName)); + Assert.True(getAllNamespacesResponse.All(ns => ns.Id.Contains(resourceGroup))); + + // Get all namespaces created within the subscription irrespective of the resourceGroup + getAllNamespacesResponse = RelayManagementClient.Namespaces.List(); + Assert.NotNull(getAllNamespacesResponse); + Assert.True(getAllNamespacesResponse.Count() >= 1); + Assert.True(getAllNamespacesResponse.Any(ns => ns.Name == namespaceName)); + + // Create WCF Relay - + var wcfRelayName = TestUtilities.GenerateName(RelayManagementHelper.WcfPrefix); + var createdWCFRelayResponse = RelayManagementClient.WCFRelays.CreateOrUpdate(resourceGroup, namespaceName, wcfRelayName, new WcfRelay() + { + RelayType = Relaytype.NetTcp, + RequiresClientAuthorization = true, + RequiresTransportSecurity = true + }); + + Assert.NotNull(createdWCFRelayResponse); + Assert.Equal(createdWCFRelayResponse.Name, wcfRelayName); + Assert.True(createdWCFRelayResponse.RequiresClientAuthorization); + Assert.True(createdWCFRelayResponse.RequiresTransportSecurity); + Assert.Equal(createdWCFRelayResponse.RelayType, Relaytype.NetTcp); + + var getWCFRelaysResponse = RelayManagementClient.WCFRelays.Get(resourceGroup, namespaceName, wcfRelayName); + + // Create a WCFRelay AuthorizationRule + var authorizationRuleName = TestUtilities.GenerateName(RelayManagementHelper.AuthorizationRulesPrefix); + string createPrimaryKey = HttpMockServer.GetVariable("CreatePrimaryKey", RelayManagementHelper.GenerateRandomKey()); + var createAutorizationRuleParameter = new AuthorizationRule() + { + Rights = new List() { AccessRights.Listen, AccessRights.Send } + }; + + var jsonStr = RelayManagementHelper.ConvertObjectToJSon(createAutorizationRuleParameter); + + var test = RelayManagementClient.WCFRelays.CreateOrUpdateAuthorizationRule(resourceGroup, namespaceName, wcfRelayName, authorizationRuleName, createAutorizationRuleParameter); + + var createNamespaceAuthorizationRuleResponse = RelayManagementClient.WCFRelays.CreateOrUpdateAuthorizationRule(resourceGroup, namespaceName, wcfRelayName, + authorizationRuleName, createAutorizationRuleParameter); + Assert.NotNull(createNamespaceAuthorizationRuleResponse); + Assert.True(createNamespaceAuthorizationRuleResponse.Rights.Count == createAutorizationRuleParameter.Rights.Count); + foreach (var right in createAutorizationRuleParameter.Rights) + { + Assert.True(createNamespaceAuthorizationRuleResponse.Rights.Any(r => r == right)); + } + + // Get created WCFRelay AuthorizationRules + var getNamespaceAuthorizationRulesResponse = RelayManagementClient.WCFRelays.GetAuthorizationRule(resourceGroup, namespaceName, wcfRelayName, authorizationRuleName); + Assert.NotNull(getNamespaceAuthorizationRulesResponse); + Assert.True(getNamespaceAuthorizationRulesResponse.Rights.Count == createAutorizationRuleParameter.Rights.Count); + foreach (var right in createAutorizationRuleParameter.Rights) + { + Assert.True(getNamespaceAuthorizationRulesResponse.Rights.Any(r => r == right)); + } + + // Get all WCFRelay AuthorizationRules + var getAllNamespaceAuthorizationRulesResponse = RelayManagementClient.WCFRelays.ListAuthorizationRules(resourceGroup, namespaceName,wcfRelayName); + Assert.NotNull(getAllNamespaceAuthorizationRulesResponse); + Assert.True(getAllNamespaceAuthorizationRulesResponse.Count() >= 1); + Assert.True(getAllNamespaceAuthorizationRulesResponse.Any(ns => ns.Name == authorizationRuleName)); + + // Update WCFRelay authorizationRule + string updatePrimaryKey = HttpMockServer.GetVariable("UpdatePrimaryKey", RelayManagementHelper.GenerateRandomKey()); + AuthorizationRule updateNamespaceAuthorizationRuleParameter = new AuthorizationRule(); + updateNamespaceAuthorizationRuleParameter.Rights = new List() { AccessRights.Listen }; + + var updateNamespaceAuthorizationRuleResponse = RelayManagementClient.WCFRelays.CreateOrUpdateAuthorizationRule(resourceGroup, + namespaceName, wcfRelayName, authorizationRuleName, updateNamespaceAuthorizationRuleParameter); + + Assert.NotNull(updateNamespaceAuthorizationRuleResponse); + Assert.Equal(authorizationRuleName, updateNamespaceAuthorizationRuleResponse.Name); + Assert.True(updateNamespaceAuthorizationRuleResponse.Rights.Count == updateNamespaceAuthorizationRuleParameter.Rights.Count); + foreach (var right in updateNamespaceAuthorizationRuleParameter.Rights) + { + Assert.True(updateNamespaceAuthorizationRuleResponse.Rights.Any(r => r.Equals(right))); + } + + // Get the WCFRelay namespace AuthorizationRule + var getNamespaceAuthorizationRuleResponse = RelayManagementClient.WCFRelays.GetAuthorizationRule(resourceGroup, namespaceName, wcfRelayName, authorizationRuleName); + Assert.NotNull(getNamespaceAuthorizationRuleResponse); + Assert.Equal(authorizationRuleName, getNamespaceAuthorizationRuleResponse.Name); + Assert.True(getNamespaceAuthorizationRuleResponse.Rights.Count == updateNamespaceAuthorizationRuleParameter.Rights.Count); + foreach (var right in updateNamespaceAuthorizationRuleParameter.Rights) + { + Assert.True(getNamespaceAuthorizationRuleResponse.Rights.Any(r => r.Equals(right))); + } + + // Get the connectionString to the WCFRelay for a Authorization rule created + var listKeysResponse = RelayManagementClient.WCFRelays.ListKeys(resourceGroup, namespaceName, wcfRelayName, authorizationRuleName); + Assert.NotNull(listKeysResponse); + Assert.NotNull(listKeysResponse.PrimaryConnectionString); + Assert.NotNull(listKeysResponse.SecondaryConnectionString); + + // Regenerate AuthorizationRules + var regenerateKeysParameters = new RegenerateKeysParameters(); + regenerateKeysParameters.PolicyKey = PolicyKey.PrimaryKey; + + //Primary Key + var regenerateKeysPrimaryResponse = RelayManagementClient.WCFRelays.RegenerateKeys(resourceGroup, namespaceName, wcfRelayName, authorizationRuleName, regenerateKeysParameters); + Assert.NotNull(regenerateKeysPrimaryResponse); + Assert.NotEqual(regenerateKeysPrimaryResponse.PrimaryKey, listKeysResponse.PrimaryKey); + Assert.Equal(regenerateKeysPrimaryResponse.SecondaryKey, listKeysResponse.SecondaryKey); + + regenerateKeysParameters.PolicyKey = PolicyKey.SecondaryKey; + + //Secondary Key + var regenerateKeysSecondaryResponse = RelayManagementClient.WCFRelays.RegenerateKeys(resourceGroup, namespaceName, wcfRelayName, authorizationRuleName, regenerateKeysParameters); + Assert.NotNull(regenerateKeysSecondaryResponse); + Assert.NotEqual(regenerateKeysSecondaryResponse.SecondaryKey, listKeysResponse.SecondaryKey); + Assert.Equal(regenerateKeysSecondaryResponse.PrimaryKey, regenerateKeysPrimaryResponse.PrimaryKey); + + // Delete WCFRelay authorizationRule + RelayManagementClient.WCFRelays.DeleteAuthorizationRule(resourceGroup, namespaceName, wcfRelayName, authorizationRuleName); + + try + { + RelayManagementClient.WCFRelays.Delete(resourceGroup, namespaceName, wcfRelayName); + } + catch (Exception ex) + { + Assert.True(ex.Message.Contains("NotFound")); + } + + try + { + // Delete namespace + RelayManagementClient.Namespaces.Delete(resourceGroup, namespaceName); + } + catch (Exception ex) + { + Assert.True(ex.Message.Contains("NotFound")); + } + } + } + } +} diff --git a/src/ResourceManagement/Relay/Relay.Tests/Tests/ScenarioTests.cs b/src/ResourceManagement/Relay/Relay.Tests/Tests/ScenarioTests.cs new file mode 100644 index 000000000000..dbda18d81085 --- /dev/null +++ b/src/ResourceManagement/Relay/Relay.Tests/Tests/ScenarioTests.cs @@ -0,0 +1,68 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +namespace Relay.Tests.ScenarioTests +{ + using System.Net; + using Microsoft.Azure.Management.Resources; + using Microsoft.Azure.Management.Relay; + using Microsoft.Rest.ClientRuntime.Azure.TestFramework; + using Relay.Tests.TestHelper; + + public partial class ScenarioTests + { + private ResourceManagementClient _resourceManagementClient; + private RelayManagementClient _relayManagementClient; + private RecordedDelegatingHandler handler = new RecordedDelegatingHandler(); + + protected bool m_initialized = false; + protected object m_lock = new object(); + public string Location { get; set; } + public string ResourceGroupName { get; set; } + public string NamespaceName { get; set; } + + + protected void InitializeClients(MockContext context) + { + if (!m_initialized) + { + lock (m_lock) + { + if (!m_initialized) + { + _resourceManagementClient = RelayManagementHelper.GetResourceManagementClient(context, new RecordedDelegatingHandler { StatusCodeToReturn = HttpStatusCode.OK }); + _relayManagementClient = RelayManagementHelper.GetRelayManagementClient(context, new RecordedDelegatingHandler { StatusCodeToReturn = HttpStatusCode.OK }); + } + } + } + } + + public ResourceManagementClient ResourceManagementClient + { + get + { + return _resourceManagementClient; + } + } + + public RelayManagementClient RelayManagementClient + { + get + { + return _relayManagementClient; + } + } + } +} diff --git a/src/ResourceManagement/Relay/Relay.Tests/project.json b/src/ResourceManagement/Relay/Relay.Tests/project.json new file mode 100644 index 000000000000..ac12eb033069 --- /dev/null +++ b/src/ResourceManagement/Relay/Relay.Tests/project.json @@ -0,0 +1,40 @@ +{ + "version": "1.0.0-*", + "description": "Relay.Tests Class Library", + "authors": [ "Microsoft Corporation" ], + + "packOptions": { + "summary": "Microsoft Azure Relay Management Library Tests.", + "tags": [ "" ], + "projectUrl": "https://github.com/Azure/azure-sdk-for-net", + "licenseUrl": "https://raw.githubusercontent.com/Microsoft/dotnet/master/LICENSE", + }, + + "buildOptions": { + "delaySign": true, + "publicSign": false, + "keyFile": "../../../../tools/MSSharedLibKey.snk", + "compile": "../../../../tools/DisableTestRunParallel.cs" + }, + + "testRunner": "xunit", + "frameworks": { + "netcoreapp1.0": { + "imports": ["dnxcore50", "portable-net45+win8"], + "dependencies": { + } + } + }, + "dependencies": { + "Microsoft.NETCore.App": { + "type": "platform", + "version": "1.0.0" + }, + "Microsoft.Rest.ClientRuntime.Azure.TestFramework": "1.6.0", + "Microsoft.Rest.ClientRuntime.Azure": "[3.3.5,4.0.0)", + "Microsoft.Azure.Management.Relay": "0.0.1-preview", + "Microsoft.Azure.ResourceManager": "1.0.0-preview", + "xunit": "2.2.0-beta2-build3300", + "dotnet-test-xunit": "2.2.0-preview2-build1029" + } +} \ No newline at end of file diff --git a/src/ResourceManagement/Relay/Relay.sln b/src/ResourceManagement/Relay/Relay.sln new file mode 100644 index 000000000000..b6cf16d00fbe --- /dev/null +++ b/src/ResourceManagement/Relay/Relay.sln @@ -0,0 +1,58 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "HttpRecorder", "..\..\TestFramework\Microsoft.Azure.Test.HttpRecorder\HttpRecorder.xproj", "{5D12D45A-E55F-410E-B8AF-9DC90E81B237}" +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TestFramework", "..\..\TestFramework\Microsoft.Rest.ClientRuntime.Azure.TestFramework\TestFramework.xproj", "{C4C4E1C8-B99D-4D90-8C27-6D0C0A268BA5}" +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Rest.ClientRuntime", "..\..\ClientRuntime\Microsoft.Rest.ClientRuntime\Microsoft.Rest.ClientRuntime.xproj", "{EDDB6367-5C7B-428C-B54C-96BCD90F6E6C}" +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Rest.ClientRuntime.Azure", "..\..\ClientRuntime\Microsoft.Rest.ClientRuntime.Azure\Microsoft.Rest.ClientRuntime.Azure.xproj", "{D5296EAB-C13E-4A88-9532-BD0677D18EC9}" +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Rest.ClientRuntime.Azure.Authentication", "..\..\ClientRuntime\Microsoft.Rest.ClientRuntime.Azure.Authentication\Microsoft.Rest.ClientRuntime.Azure.Authentication.xproj", "{6319205D-BBFC-4150-BEAE-31B1C9B911DD}" +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Relay.Tests", "Relay.Tests\Relay.Tests.xproj", "{AFA0A1A6-7481-434E-889D-EEA52F5E489B}" +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Azure.Management.Relay", "Microsoft.Azure.Management.Relay\Microsoft.Azure.Management.Relay.xproj", "{C0E50B63-6F6E-4C3D-BAFE-139092D0B5FA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5D12D45A-E55F-410E-B8AF-9DC90E81B237}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5D12D45A-E55F-410E-B8AF-9DC90E81B237}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5D12D45A-E55F-410E-B8AF-9DC90E81B237}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5D12D45A-E55F-410E-B8AF-9DC90E81B237}.Release|Any CPU.Build.0 = Release|Any CPU + {C4C4E1C8-B99D-4D90-8C27-6D0C0A268BA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C4C4E1C8-B99D-4D90-8C27-6D0C0A268BA5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C4C4E1C8-B99D-4D90-8C27-6D0C0A268BA5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C4C4E1C8-B99D-4D90-8C27-6D0C0A268BA5}.Release|Any CPU.Build.0 = Release|Any CPU + {EDDB6367-5C7B-428C-B54C-96BCD90F6E6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EDDB6367-5C7B-428C-B54C-96BCD90F6E6C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EDDB6367-5C7B-428C-B54C-96BCD90F6E6C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EDDB6367-5C7B-428C-B54C-96BCD90F6E6C}.Release|Any CPU.Build.0 = Release|Any CPU + {D5296EAB-C13E-4A88-9532-BD0677D18EC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D5296EAB-C13E-4A88-9532-BD0677D18EC9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D5296EAB-C13E-4A88-9532-BD0677D18EC9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D5296EAB-C13E-4A88-9532-BD0677D18EC9}.Release|Any CPU.Build.0 = Release|Any CPU + {6319205D-BBFC-4150-BEAE-31B1C9B911DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6319205D-BBFC-4150-BEAE-31B1C9B911DD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6319205D-BBFC-4150-BEAE-31B1C9B911DD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6319205D-BBFC-4150-BEAE-31B1C9B911DD}.Release|Any CPU.Build.0 = Release|Any CPU + {AFA0A1A6-7481-434E-889D-EEA52F5E489B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AFA0A1A6-7481-434E-889D-EEA52F5E489B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AFA0A1A6-7481-434E-889D-EEA52F5E489B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AFA0A1A6-7481-434E-889D-EEA52F5E489B}.Release|Any CPU.Build.0 = Release|Any CPU + {C0E50B63-6F6E-4C3D-BAFE-139092D0B5FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C0E50B63-6F6E-4C3D-BAFE-139092D0B5FA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C0E50B63-6F6E-4C3D-BAFE-139092D0B5FA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C0E50B63-6F6E-4C3D-BAFE-139092D0B5FA}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/ResourceManagement/Relay/global.json b/src/ResourceManagement/Relay/global.json new file mode 100644 index 000000000000..d185b10e0c49 --- /dev/null +++ b/src/ResourceManagement/Relay/global.json @@ -0,0 +1,3 @@ +{ + "projects": [ "Microsoft.Azure.Management.Relay" ] +} \ No newline at end of file