diff --git a/eng/mgmt/mgmtmetadata/datadog_resource-manager.txt b/eng/mgmt/mgmtmetadata/datadog_resource-manager.txt index 257f0550fb77..4e43f231db6d 100644 --- a/eng/mgmt/mgmtmetadata/datadog_resource-manager.txt +++ b/eng/mgmt/mgmtmetadata/datadog_resource-manager.txt @@ -4,11 +4,12 @@ Commencing code generation Generating CSharp code Executing AutoRest command cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/datadog/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=C:\work\azure-sdk-for-net\sdk -2020-10-09 01:08:52 UTC +Autorest CSharp Version: 2.3.84 +2021-03-28 21:21:11 UTC Azure-rest-api-specs repository information GitHub fork: Azure Branch: master -Commit: 183db615e7e870d12668972c874897f095fe256c +Commit: 83a54687d2b523b537ad86b0c78b56c84687eee8 AutoRest information Requested version: v2 Bootstrapper version: autorest@2.0.4413 diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/AzSdk.RP.props b/sdk/datadog/Microsoft.Azure.Management.Datadog/AzSdk.RP.props index e76727bfc708..650c3fc09e74 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/AzSdk.RP.props +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/AzSdk.RP.props @@ -1,7 +1,7 @@  - Datadog_2020-02-01-preview; + Datadog_2021-03-01; $(PackageTags);$(CommonTags);$(AzureApiTag); \ No newline at end of file diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ApiKeysOperationsExtensions.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ApiKeysOperationsExtensions.cs deleted file mode 100644 index 81015b2c1588..000000000000 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ApiKeysOperationsExtensions.cs +++ /dev/null @@ -1,180 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Datadog -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for ApiKeysOperations. - /// - public static partial class ApiKeysOperationsExtensions - { - /// - /// List the api keys for a given monitor resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group to which the Datadog resource belongs. - /// - /// - /// Monitor resource name - /// - public static IPage List(this IApiKeysOperations operations, string resourceGroupName, string monitorName) - { - return operations.ListAsync(resourceGroupName, monitorName).GetAwaiter().GetResult(); - } - - /// - /// List the api keys for a given monitor resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group to which the Datadog resource belongs. - /// - /// - /// Monitor resource name - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IApiKeysOperations operations, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, monitorName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get the default api key. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group to which the Datadog resource belongs. - /// - /// - /// Monitor resource name - /// - public static DatadogApiKey GetDefaultKey(this IApiKeysOperations operations, string resourceGroupName, string monitorName) - { - return operations.GetDefaultKeyAsync(resourceGroupName, monitorName).GetAwaiter().GetResult(); - } - - /// - /// Get the default api key. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group to which the Datadog resource belongs. - /// - /// - /// Monitor resource name - /// - /// - /// The cancellation token. - /// - public static async Task GetDefaultKeyAsync(this IApiKeysOperations operations, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetDefaultKeyWithHttpMessagesAsync(resourceGroupName, monitorName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Set the default api key. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group to which the Datadog resource belongs. - /// - /// - /// Monitor resource name - /// - /// - /// - public static void SetDefaultKey(this IApiKeysOperations operations, string resourceGroupName, string monitorName, DatadogApiKey body = default(DatadogApiKey)) - { - operations.SetDefaultKeyAsync(resourceGroupName, monitorName, body).GetAwaiter().GetResult(); - } - - /// - /// Set the default api key. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group to which the Datadog resource belongs. - /// - /// - /// Monitor resource name - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task SetDefaultKeyAsync(this IApiKeysOperations operations, string resourceGroupName, string monitorName, DatadogApiKey body = default(DatadogApiKey), CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.SetDefaultKeyWithHttpMessagesAsync(resourceGroupName, monitorName, body, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// List the api keys for a given monitor resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IApiKeysOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List the api keys for a given monitor resource. - /// - /// - /// 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 IApiKeysOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/HostsOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/HostsOperations.cs deleted file mode 100644 index ed1219877a56..000000000000 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/HostsOperations.cs +++ /dev/null @@ -1,420 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Datadog -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - /// - /// HostsOperations operations. - /// - internal partial class HostsOperations : IServiceOperations, IHostsOperations - { - /// - /// Initializes a new instance of the HostsOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal HostsOperations(MicrosoftDatadogClient client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the MicrosoftDatadogClient - /// - public MicrosoftDatadogClient Client { get; private set; } - - /// - /// List the hosts for a given monitor resource. - /// - /// - /// The name of the resource group to which the Datadog resource belongs. - /// - /// - /// Monitor resource 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>> ListWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (monitorName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "monitorName"); - } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("monitorName", monitorName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/listHosts").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{monitorName}", System.Uri.EscapeDataString(monitorName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("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 ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ResourceProviderDefaultErrorResponse _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; - } - - /// - /// List the hosts for a given monitor resource. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (nextPageLink == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextPageLink", nextPageLink); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); - } - // Construct URL - string _url = "{nextLink}"; - _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("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 ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ResourceProviderDefaultErrorResponse _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/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/HostsOperationsExtensions.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/HostsOperationsExtensions.cs deleted file mode 100644 index 44029db154e8..000000000000 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/HostsOperationsExtensions.cs +++ /dev/null @@ -1,99 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Datadog -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for HostsOperations. - /// - public static partial class HostsOperationsExtensions - { - /// - /// List the hosts for a given monitor resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group to which the Datadog resource belongs. - /// - /// - /// Monitor resource name - /// - public static IPage List(this IHostsOperations operations, string resourceGroupName, string monitorName) - { - return operations.ListAsync(resourceGroupName, monitorName).GetAwaiter().GetResult(); - } - - /// - /// List the hosts for a given monitor resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group to which the Datadog resource belongs. - /// - /// - /// Monitor resource name - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IHostsOperations operations, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, monitorName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List the hosts for a given monitor resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IHostsOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List the hosts for a given monitor resource. - /// - /// - /// 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 IHostsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IApiKeysOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IApiKeysOperations.cs deleted file mode 100644 index f41c56a87efe..000000000000 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IApiKeysOperations.cs +++ /dev/null @@ -1,126 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Datadog -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// ApiKeysOperations operations. - /// - public partial interface IApiKeysOperations - { - /// - /// List the api keys for a given monitor resource. - /// - /// - /// The name of the resource group to which the Datadog resource - /// belongs. - /// - /// - /// Monitor resource 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>> ListWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the default api key. - /// - /// - /// The name of the resource group to which the Datadog resource - /// belongs. - /// - /// - /// Monitor resource 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> GetDefaultKeyWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Set the default api key. - /// - /// - /// The name of the resource group to which the Datadog resource - /// belongs. - /// - /// - /// Monitor resource 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 SetDefaultKeyWithHttpMessagesAsync(string resourceGroupName, string monitorName, DatadogApiKey body = default(DatadogApiKey), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List the api keys for a given monitor resource. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IHostsOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IHostsOperations.cs deleted file mode 100644 index c715ef29b2e4..000000000000 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IHostsOperations.cs +++ /dev/null @@ -1,75 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Datadog -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// HostsOperations operations. - /// - public partial interface IHostsOperations - { - /// - /// List the hosts for a given monitor resource. - /// - /// - /// The name of the resource group to which the Datadog resource - /// belongs. - /// - /// - /// Monitor resource 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>> ListWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List the hosts for a given monitor resource. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ILinkedResourcesOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IMarketplaceAgreementsOperations.cs similarity index 52% rename from sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ILinkedResourcesOperations.cs rename to sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IMarketplaceAgreementsOperations.cs index 4db15d26a5c1..9fbc051da3f2 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ILinkedResourcesOperations.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IMarketplaceAgreementsOperations.cs @@ -19,20 +19,34 @@ namespace Microsoft.Azure.Management.Datadog using System.Threading.Tasks; /// - /// LinkedResourcesOperations operations. + /// MarketplaceAgreementsOperations operations. /// - public partial interface ILinkedResourcesOperations + public partial interface IMarketplaceAgreementsOperations { /// - /// List all Azure resources associated to the same Datadog - /// organization as the target resource. + /// List Datadog marketplace agreements in the subscription. /// - /// - /// The name of the resource group to which the Datadog resource - /// belongs. + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. /// - /// - /// Monitor resource name + /// + /// 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)); + /// + /// Create Datadog marketplace agreement in the subscription. + /// + /// + /// Represents the properties of the resource. /// /// /// The headers that will be added to request. @@ -40,7 +54,7 @@ public partial interface ILinkedResourcesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -49,10 +63,9 @@ public partial interface ILinkedResourcesOperations /// /// Thrown when a required parameter is null /// - Task>> ListWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CreateOrUpdateWithHttpMessagesAsync(DatadogAgreementProperties properties = default(DatadogAgreementProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// List all Azure resources associated to the same Datadog - /// organization as the target resource. + /// List Datadog marketplace agreements in the subscription. /// /// /// The NextLink from the previous successful call to List operation. @@ -63,7 +76,7 @@ public partial interface ILinkedResourcesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -72,6 +85,6 @@ public partial interface ILinkedResourcesOperations /// /// Thrown when a required parameter is null /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IMicrosoftDatadogClient.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IMicrosoftDatadogClient.cs index c545fa333570..3185d3eb1555 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IMicrosoftDatadogClient.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IMicrosoftDatadogClient.cs @@ -40,14 +40,14 @@ public partial interface IMicrosoftDatadogClient : System.IDisposable ServiceClientCredentials Credentials { get; } /// - /// The Microsoft Azure subscription ID. + /// The API version to use for this operation. /// - string SubscriptionId { get; set; } + string ApiVersion { get; } /// - /// The API version to use for this operation. + /// The ID of the target subscription. /// - string ApiVersion { get; } + string SubscriptionId { get; set; } /// /// The preferred language for the response. @@ -69,29 +69,9 @@ public partial interface IMicrosoftDatadogClient : System.IDisposable /// - /// Gets the IApiKeysOperations. - /// - IApiKeysOperations ApiKeys { get; } - - /// - /// Gets the IHostsOperations. - /// - IHostsOperations Hosts { get; } - - /// - /// Gets the ILinkedResourcesOperations. - /// - ILinkedResourcesOperations LinkedResources { get; } - - /// - /// Gets the IMonitoredResourcesOperations. + /// Gets the IMarketplaceAgreementsOperations. /// - IMonitoredResourcesOperations MonitoredResources { get; } - - /// - /// Gets the IOperations. - /// - IOperations Operations { get; } + IMarketplaceAgreementsOperations MarketplaceAgreements { get; } /// /// Gets the IMonitorsOperations. @@ -99,9 +79,9 @@ public partial interface IMicrosoftDatadogClient : System.IDisposable IMonitorsOperations Monitors { get; } /// - /// Gets the IRefreshSetPasswordOperations. + /// Gets the IOperations. /// - IRefreshSetPasswordOperations RefreshSetPassword { get; } + IOperations Operations { get; } /// /// Gets the ITagRulesOperations. diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IMonitoredResourcesOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IMonitoredResourcesOperations.cs deleted file mode 100644 index 1f10b2a0bc60..000000000000 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IMonitoredResourcesOperations.cs +++ /dev/null @@ -1,77 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Datadog -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// MonitoredResourcesOperations operations. - /// - public partial interface IMonitoredResourcesOperations - { - /// - /// List the resources currently being monitored by the Datadog monitor - /// resource. - /// - /// - /// The name of the resource group to which the Datadog resource - /// belongs. - /// - /// - /// Monitor resource 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>> ListWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List the resources currently being monitored by the Datadog monitor - /// resource. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IMonitorsOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IMonitorsOperations.cs index 5b573323c75e..155d3057f2fb 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IMonitorsOperations.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IMonitorsOperations.cs @@ -23,6 +23,157 @@ namespace Microsoft.Azure.Management.Datadog /// public partial interface IMonitorsOperations { + /// + /// List the api keys for a given monitor resource. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Monitor resource 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>> ListApiKeysWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get the default api key. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Monitor resource 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> GetDefaultKeyWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Set the default api key. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Monitor resource 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 SetDefaultKeyWithHttpMessagesAsync(string resourceGroupName, string monitorName, DatadogApiKey body = default(DatadogApiKey), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List the hosts for a given monitor resource. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Monitor resource 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>> ListHostsWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List all Azure resources associated to the same Datadog + /// organization as the target resource. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Monitor resource 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>> ListLinkedResourcesWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List the resources currently being monitored by the Datadog monitor + /// resource. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Monitor resource 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>> ListMonitoredResourcesWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// List all monitors under the specified subscription. /// @@ -32,7 +183,7 @@ public partial interface IMonitorsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -46,8 +197,7 @@ public partial interface IMonitorsOperations /// List all monitors under the specified resource group. /// /// - /// The name of the resource group to which the Datadog resource - /// belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// The headers that will be added to request. @@ -55,7 +205,7 @@ public partial interface IMonitorsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -69,8 +219,7 @@ public partial interface IMonitorsOperations /// Get the properties of a specific monitor resource. /// /// - /// The name of the resource group to which the Datadog resource - /// belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name @@ -81,7 +230,7 @@ public partial interface IMonitorsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -95,8 +244,7 @@ public partial interface IMonitorsOperations /// Create a monitor resource. /// /// - /// The name of the resource group to which the Datadog resource - /// belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name @@ -109,7 +257,7 @@ public partial interface IMonitorsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -123,8 +271,7 @@ public partial interface IMonitorsOperations /// Update a monitor resource. /// /// - /// The name of the resource group to which the Datadog resource - /// belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name @@ -137,7 +284,7 @@ public partial interface IMonitorsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -151,8 +298,7 @@ public partial interface IMonitorsOperations /// Delete a monitor resource. /// /// - /// The name of the resource group to which the Datadog resource - /// belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name @@ -163,7 +309,7 @@ public partial interface IMonitorsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -171,11 +317,35 @@ public partial interface IMonitorsOperations /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Refresh the set password link and return a latest one. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Monitor resource 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> RefreshSetPasswordLinkWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Create a monitor resource. /// /// - /// The name of the resource group to which the Datadog resource - /// belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name @@ -188,7 +358,7 @@ public partial interface IMonitorsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -202,8 +372,7 @@ public partial interface IMonitorsOperations /// Delete a monitor resource. /// /// - /// The name of the resource group to which the Datadog resource - /// belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name @@ -214,7 +383,7 @@ public partial interface IMonitorsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -222,6 +391,96 @@ public partial interface IMonitorsOperations /// Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// List the api keys for a given monitor resource. + /// + /// + /// 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>> ListApiKeysNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List the hosts for a given monitor resource. + /// + /// + /// 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>> ListHostsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List all Azure resources associated to the same Datadog + /// organization as the target resource. + /// + /// + /// 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>> ListLinkedResourcesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List the resources currently being monitored by the Datadog monitor + /// resource. + /// + /// + /// 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>> ListMonitoredResourcesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// List all monitors under the specified subscription. /// /// @@ -233,7 +492,7 @@ public partial interface IMonitorsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -255,7 +514,7 @@ public partial interface IMonitorsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IOperations.cs index e5846ca36703..9156d305eade 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IOperations.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IOperations.cs @@ -25,7 +25,7 @@ public partial interface IOperations { /// /// List all operations provided by Microsoft.Datadog for the - /// 2020-02-01-preview api version. + /// 2021-03-01 api version. /// /// /// The headers that will be added to request. @@ -33,7 +33,7 @@ public partial interface IOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -45,7 +45,7 @@ public partial interface IOperations Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// List all operations provided by Microsoft.Datadog for the - /// 2020-02-01-preview api version. + /// 2021-03-01 api version. /// /// /// The NextLink from the previous successful call to List operation. @@ -56,7 +56,7 @@ public partial interface IOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IRefreshSetPasswordOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IRefreshSetPasswordOperations.cs deleted file mode 100644 index c95070e8df9b..000000000000 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IRefreshSetPasswordOperations.cs +++ /dev/null @@ -1,53 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Datadog -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// RefreshSetPasswordOperations operations. - /// - public partial interface IRefreshSetPasswordOperations - { - /// - /// Refresh the set password link and return a latest one. - /// - /// - /// The name of the resource group to which the Datadog resource - /// belongs. - /// - /// - /// Monitor resource 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 monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ISingleSignOnConfigurationsOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ISingleSignOnConfigurationsOperations.cs index 176d2bc8cd65..eb46111f1060 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ISingleSignOnConfigurationsOperations.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ISingleSignOnConfigurationsOperations.cs @@ -28,8 +28,7 @@ public partial interface ISingleSignOnConfigurationsOperations /// resource. /// /// - /// The name of the resource group to which the Datadog resource - /// belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name @@ -40,7 +39,7 @@ public partial interface ISingleSignOnConfigurationsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -54,13 +53,13 @@ public partial interface ISingleSignOnConfigurationsOperations /// Configures single-sign-on for this resource. /// /// - /// The name of the resource group to which the Datadog resource - /// belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name /// /// + /// Configuration name /// /// /// @@ -70,7 +69,7 @@ public partial interface ISingleSignOnConfigurationsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -84,13 +83,13 @@ public partial interface ISingleSignOnConfigurationsOperations /// Gets the datadog single sign-on resource for the given Monitor. /// /// - /// The name of the resource group to which the Datadog resource - /// belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name /// /// + /// Configuration name /// /// /// The headers that will be added to request. @@ -98,7 +97,7 @@ public partial interface ISingleSignOnConfigurationsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -112,13 +111,13 @@ public partial interface ISingleSignOnConfigurationsOperations /// Configures single-sign-on for this resource. /// /// - /// The name of the resource group to which the Datadog resource - /// belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name /// /// + /// Configuration name /// /// /// @@ -128,7 +127,7 @@ public partial interface ISingleSignOnConfigurationsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -151,7 +150,7 @@ public partial interface ISingleSignOnConfigurationsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ITagRulesOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ITagRulesOperations.cs index 0befb5e6db1d..072c29393dd2 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ITagRulesOperations.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ITagRulesOperations.cs @@ -27,8 +27,7 @@ public partial interface ITagRulesOperations /// List the tag rules for a given monitor resource. /// /// - /// The name of the resource group to which the Datadog resource - /// belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name @@ -39,7 +38,7 @@ public partial interface ITagRulesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -53,13 +52,13 @@ public partial interface ITagRulesOperations /// Create or update a tag rule set for a given monitor resource. /// /// - /// The name of the resource group to which the Datadog resource - /// belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name /// /// + /// Rule set name /// /// /// @@ -69,7 +68,7 @@ public partial interface ITagRulesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -83,13 +82,13 @@ public partial interface ITagRulesOperations /// Get a tag rule set for a given monitor resource. /// /// - /// The name of the resource group to which the Datadog resource - /// belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name /// /// + /// Rule set name /// /// /// The headers that will be added to request. @@ -97,7 +96,7 @@ public partial interface ITagRulesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -119,7 +118,7 @@ public partial interface ITagRulesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/LinkedResourcesOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/LinkedResourcesOperations.cs deleted file mode 100644 index 895cfe933331..000000000000 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/LinkedResourcesOperations.cs +++ /dev/null @@ -1,422 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Datadog -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - /// - /// LinkedResourcesOperations operations. - /// - internal partial class LinkedResourcesOperations : IServiceOperations, ILinkedResourcesOperations - { - /// - /// Initializes a new instance of the LinkedResourcesOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal LinkedResourcesOperations(MicrosoftDatadogClient client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the MicrosoftDatadogClient - /// - public MicrosoftDatadogClient Client { get; private set; } - - /// - /// List all Azure resources associated to the same Datadog organization as the - /// target resource. - /// - /// - /// The name of the resource group to which the Datadog resource belongs. - /// - /// - /// Monitor resource 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>> ListWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (monitorName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "monitorName"); - } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("monitorName", monitorName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/listLinkedResources").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{monitorName}", System.Uri.EscapeDataString(monitorName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("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 ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ResourceProviderDefaultErrorResponse _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; - } - - /// - /// List all Azure resources associated to the same Datadog organization as the - /// target resource. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (nextPageLink == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextPageLink", nextPageLink); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); - } - // Construct URL - string _url = "{nextLink}"; - _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("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 ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ResourceProviderDefaultErrorResponse _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/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/LinkedResourcesOperationsExtensions.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/LinkedResourcesOperationsExtensions.cs deleted file mode 100644 index befe4e89caef..000000000000 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/LinkedResourcesOperationsExtensions.cs +++ /dev/null @@ -1,103 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Datadog -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for LinkedResourcesOperations. - /// - public static partial class LinkedResourcesOperationsExtensions - { - /// - /// List all Azure resources associated to the same Datadog organization as the - /// target resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group to which the Datadog resource belongs. - /// - /// - /// Monitor resource name - /// - public static IPage List(this ILinkedResourcesOperations operations, string resourceGroupName, string monitorName) - { - return operations.ListAsync(resourceGroupName, monitorName).GetAwaiter().GetResult(); - } - - /// - /// List all Azure resources associated to the same Datadog organization as the - /// target resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group to which the Datadog resource belongs. - /// - /// - /// Monitor resource name - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this ILinkedResourcesOperations operations, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, monitorName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List all Azure resources associated to the same Datadog organization as the - /// target resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this ILinkedResourcesOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List all Azure resources associated to the same Datadog organization as the - /// target resource. - /// - /// - /// 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 ILinkedResourcesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ApiKeysOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MarketplaceAgreementsOperations.cs similarity index 63% rename from sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ApiKeysOperations.cs rename to sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MarketplaceAgreementsOperations.cs index 769079fd9060..a7539fc0048d 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ApiKeysOperations.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MarketplaceAgreementsOperations.cs @@ -23,12 +23,12 @@ namespace Microsoft.Azure.Management.Datadog using System.Threading.Tasks; /// - /// ApiKeysOperations operations. + /// MarketplaceAgreementsOperations operations. /// - internal partial class ApiKeysOperations : IServiceOperations, IApiKeysOperations + internal partial class MarketplaceAgreementsOperations : IServiceOperations, IMarketplaceAgreementsOperations { /// - /// Initializes a new instance of the ApiKeysOperations class. + /// Initializes a new instance of the MarketplaceAgreementsOperations class. /// /// /// Reference to the service client. @@ -36,7 +36,7 @@ internal partial class ApiKeysOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ApiKeysOperations(MicrosoftDatadogClient client) + internal MarketplaceAgreementsOperations(MicrosoftDatadogClient client) { if (client == null) { @@ -51,21 +51,15 @@ internal ApiKeysOperations(MicrosoftDatadogClient client) public MicrosoftDatadogClient Client { get; private set; } /// - /// List the api keys for a given monitor resource. + /// List Datadog marketplace agreements in the subscription. /// - /// - /// The name of the resource group to which the Datadog resource belongs. - /// - /// - /// Monitor resource name - /// /// /// Headers that will be added to request. /// /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -80,19 +74,18 @@ internal ApiKeysOperations(MicrosoftDatadogClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (monitorName == null) + if (Client.SubscriptionId != null) { - throw new ValidationException(ValidationRules.CannotBeNull, "monitorName"); + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } } if (Client.ApiVersion == null) { @@ -112,17 +105,13 @@ internal ApiKeysOperations(MicrosoftDatadogClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("monitorName", monitorName); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/listApiKeys").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Datadog/agreements").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{monitorName}", System.Uri.EscapeDataString(monitorName)); List _queryParameters = new List(); if (Client.ApiVersion != null) { @@ -135,7 +124,7 @@ internal ApiKeysOperations(MicrosoftDatadogClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -188,11 +177,11 @@ internal ApiKeysOperations(MicrosoftDatadogClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -216,7 +205,7 @@ internal ApiKeysOperations(MicrosoftDatadogClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -229,7 +218,7 @@ internal ApiKeysOperations(MicrosoftDatadogClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -249,13 +238,10 @@ internal ApiKeysOperations(MicrosoftDatadogClient client) } /// - /// Get the default api key. + /// Create Datadog marketplace agreement in the subscription. /// - /// - /// The name of the resource group to which the Datadog resource belongs. - /// - /// - /// Monitor resource name + /// + /// Represents the properties of the resource. /// /// /// Headers that will be added to request. @@ -263,7 +249,7 @@ internal ApiKeysOperations(MicrosoftDatadogClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -278,19 +264,18 @@ internal ApiKeysOperations(MicrosoftDatadogClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetDefaultKeyWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateWithHttpMessagesAsync(DatadogAgreementProperties properties = default(DatadogAgreementProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (monitorName == null) + if (Client.SubscriptionId != null) { - throw new ValidationException(ValidationRules.CannotBeNull, "monitorName"); + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } } if (Client.ApiVersion == null) { @@ -303,6 +288,12 @@ internal ApiKeysOperations(MicrosoftDatadogClient client) throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); } } + DatadogAgreementResource body = default(DatadogAgreementResource); + if (properties != null) + { + body = new DatadogAgreementResource(); + body.Properties = properties; + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -310,17 +301,14 @@ internal ApiKeysOperations(MicrosoftDatadogClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("monitorName", monitorName); + tracingParameters.Add("body", body); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetDefaultKey", tracingParameters); + 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.Datadog/monitors/{monitorName}/getDefaultKey").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Datadog/agreements/default").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{monitorName}", System.Uri.EscapeDataString(monitorName)); List _queryParameters = new List(); if (Client.ApiVersion != null) { @@ -333,7 +321,7 @@ internal ApiKeysOperations(MicrosoftDatadogClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -364,6 +352,12 @@ internal ApiKeysOperations(MicrosoftDatadogClient client) // Serialize Request string _requestContent = null; + if(body != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(body, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -386,11 +380,11 @@ internal ApiKeysOperations(MicrosoftDatadogClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -414,7 +408,7 @@ internal ApiKeysOperations(MicrosoftDatadogClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -427,7 +421,7 @@ internal ApiKeysOperations(MicrosoftDatadogClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -447,197 +441,7 @@ internal ApiKeysOperations(MicrosoftDatadogClient client) } /// - /// Set the default api key. - /// - /// - /// The name of the resource group to which the Datadog resource belongs. - /// - /// - /// Monitor resource 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 SetDefaultKeyWithHttpMessagesAsync(string resourceGroupName, string monitorName, DatadogApiKey body = default(DatadogApiKey), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (monitorName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "monitorName"); - } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (body != null) - { - body.Validate(); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("monitorName", monitorName); - tracingParameters.Add("body", body); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "SetDefaultKey", 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.Datadog/monitors/{monitorName}/setDefaultKey").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{monitorName}", System.Uri.EscapeDataString(monitorName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("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(body != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(body, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ResourceProviderDefaultErrorResponse _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; - } - - /// - /// List the api keys for a given monitor resource. + /// List Datadog marketplace agreements in the subscription. /// /// /// The NextLink from the previous successful call to List operation. @@ -648,7 +452,7 @@ internal ApiKeysOperations(MicrosoftDatadogClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -663,7 +467,7 @@ internal ApiKeysOperations(MicrosoftDatadogClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -691,7 +495,7 @@ internal ApiKeysOperations(MicrosoftDatadogClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -744,11 +548,11 @@ internal ApiKeysOperations(MicrosoftDatadogClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -772,7 +576,7 @@ internal ApiKeysOperations(MicrosoftDatadogClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -785,7 +589,7 @@ internal ApiKeysOperations(MicrosoftDatadogClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MarketplaceAgreementsOperationsExtensions.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MarketplaceAgreementsOperationsExtensions.cs new file mode 100644 index 000000000000..1c717caa3e8c --- /dev/null +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MarketplaceAgreementsOperationsExtensions.cs @@ -0,0 +1,121 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Datadog +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for MarketplaceAgreementsOperations. + /// + public static partial class MarketplaceAgreementsOperationsExtensions + { + /// + /// List Datadog marketplace agreements in the subscription. + /// + /// + /// The operations group for this extension method. + /// + public static IPage List(this IMarketplaceAgreementsOperations operations) + { + return operations.ListAsync().GetAwaiter().GetResult(); + } + + /// + /// List Datadog marketplace agreements in the subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IMarketplaceAgreementsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Create Datadog marketplace agreement in the subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Represents the properties of the resource. + /// + public static DatadogAgreementResource CreateOrUpdate(this IMarketplaceAgreementsOperations operations, DatadogAgreementProperties properties = default(DatadogAgreementProperties)) + { + return operations.CreateOrUpdateAsync(properties).GetAwaiter().GetResult(); + } + + /// + /// Create Datadog marketplace agreement in the subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Represents the properties of the resource. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IMarketplaceAgreementsOperations operations, DatadogAgreementProperties properties = default(DatadogAgreementProperties), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// List Datadog marketplace agreements in the subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IMarketplaceAgreementsOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// List Datadog marketplace agreements in the subscription. + /// + /// + /// 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 IMarketplaceAgreementsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MicrosoftDatadogClient.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MicrosoftDatadogClient.cs index bbbac3388bcd..fa9b31a4204f 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MicrosoftDatadogClient.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MicrosoftDatadogClient.cs @@ -44,14 +44,14 @@ public partial class MicrosoftDatadogClient : ServiceClient - /// The Microsoft Azure subscription ID. + /// The API version to use for this operation. /// - public string SubscriptionId { get; set; } + public string ApiVersion { get; private set; } /// - /// The API version to use for this operation. + /// The ID of the target subscription. /// - public string ApiVersion { get; private set; } + public string SubscriptionId { get; set; } /// /// The preferred language for the response. @@ -72,29 +72,9 @@ public partial class MicrosoftDatadogClient : ServiceClient - /// Gets the IApiKeysOperations. - /// - public virtual IApiKeysOperations ApiKeys { get; private set; } - - /// - /// Gets the IHostsOperations. - /// - public virtual IHostsOperations Hosts { get; private set; } - - /// - /// Gets the ILinkedResourcesOperations. + /// Gets the IMarketplaceAgreementsOperations. /// - public virtual ILinkedResourcesOperations LinkedResources { get; private set; } - - /// - /// Gets the IMonitoredResourcesOperations. - /// - public virtual IMonitoredResourcesOperations MonitoredResources { get; private set; } - - /// - /// Gets the IOperations. - /// - public virtual IOperations Operations { get; private set; } + public virtual IMarketplaceAgreementsOperations MarketplaceAgreements { get; private set; } /// /// Gets the IMonitorsOperations. @@ -102,9 +82,9 @@ public partial class MicrosoftDatadogClient : ServiceClient - /// Gets the IRefreshSetPasswordOperations. + /// Gets the IOperations. /// - public virtual IRefreshSetPasswordOperations RefreshSetPassword { get; private set; } + public virtual IOperations Operations { get; private set; } /// /// Gets the ITagRulesOperations. @@ -357,17 +337,13 @@ public MicrosoftDatadogClient(System.Uri baseUri, ServiceClientCredentials crede /// private void Initialize() { - ApiKeys = new ApiKeysOperations(this); - Hosts = new HostsOperations(this); - LinkedResources = new LinkedResourcesOperations(this); - MonitoredResources = new MonitoredResourcesOperations(this); - Operations = new Operations(this); + MarketplaceAgreements = new MarketplaceAgreementsOperations(this); Monitors = new MonitorsOperations(this); - RefreshSetPassword = new RefreshSetPasswordOperations(this); + Operations = new Operations(this); TagRules = new TagRulesOperations(this); SingleSignOnConfigurations = new SingleSignOnConfigurationsOperations(this); BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2020-02-01-preview"; + ApiVersion = "2021-03-01"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/CreatedByType.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/CreatedByType.cs new file mode 100644 index 000000000000..69d271dd0d94 --- /dev/null +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/CreatedByType.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Datadog.Models +{ + + /// + /// Defines values for CreatedByType. + /// + public static class CreatedByType + { + public const string User = "User"; + public const string Application = "Application"; + public const string ManagedIdentity = "ManagedIdentity"; + public const string Key = "Key"; + } +} diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogAgreementProperties.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogAgreementProperties.cs new file mode 100644 index 000000000000..9db4aaa2077c --- /dev/null +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogAgreementProperties.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. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Datadog.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Terms properties. + /// + public partial class DatadogAgreementProperties + { + /// + /// Initializes a new instance of the DatadogAgreementProperties class. + /// + public DatadogAgreementProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DatadogAgreementProperties class. + /// + /// Publisher identifier string. + /// Product identifier string. + /// Plan identifier string. + /// Link to HTML with Microsoft and + /// Publisher terms. + /// Link to the privacy policy of the + /// publisher. + /// Date and time in UTC of when the + /// terms were accepted. This is empty if Accepted is false. + /// Terms signature. + /// If any version of the terms have been + /// accepted, otherwise false. + public DatadogAgreementProperties(string publisher = default(string), string product = default(string), string plan = default(string), string licenseTextLink = default(string), string privacyPolicyLink = default(string), System.DateTime? retrieveDatetime = default(System.DateTime?), string signature = default(string), bool? accepted = default(bool?)) + { + Publisher = publisher; + Product = product; + Plan = plan; + LicenseTextLink = licenseTextLink; + PrivacyPolicyLink = privacyPolicyLink; + RetrieveDatetime = retrieveDatetime; + Signature = signature; + Accepted = accepted; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets publisher identifier string. + /// + [JsonProperty(PropertyName = "publisher")] + public string Publisher { get; set; } + + /// + /// Gets or sets product identifier string. + /// + [JsonProperty(PropertyName = "product")] + public string Product { get; set; } + + /// + /// Gets or sets plan identifier string. + /// + [JsonProperty(PropertyName = "plan")] + public string Plan { get; set; } + + /// + /// Gets or sets link to HTML with Microsoft and Publisher terms. + /// + [JsonProperty(PropertyName = "licenseTextLink")] + public string LicenseTextLink { get; set; } + + /// + /// Gets or sets link to the privacy policy of the publisher. + /// + [JsonProperty(PropertyName = "privacyPolicyLink")] + public string PrivacyPolicyLink { get; set; } + + /// + /// Gets or sets date and time in UTC of when the terms were accepted. + /// This is empty if Accepted is false. + /// + [JsonProperty(PropertyName = "retrieveDatetime")] + public System.DateTime? RetrieveDatetime { get; set; } + + /// + /// Gets or sets terms signature. + /// + [JsonProperty(PropertyName = "signature")] + public string Signature { get; set; } + + /// + /// Gets or sets if any version of the terms have been accepted, + /// otherwise false. + /// + [JsonProperty(PropertyName = "accepted")] + public bool? Accepted { get; set; } + + } +} diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogAgreementResource.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogAgreementResource.cs new file mode 100644 index 000000000000..a100efea4a84 --- /dev/null +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogAgreementResource.cs @@ -0,0 +1,81 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Datadog.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Linq; + + public partial class DatadogAgreementResource : IResource + { + /// + /// Initializes a new instance of the DatadogAgreementResource class. + /// + public DatadogAgreementResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DatadogAgreementResource class. + /// + /// ARM id of the resource. + /// Name of the agreement. + /// The type of the resource. + /// Represents the properties of the + /// resource. + public DatadogAgreementResource(string id = default(string), string name = default(string), string type = default(string), DatadogAgreementProperties properties = default(DatadogAgreementProperties), SystemData systemData = default(SystemData)) + { + Id = id; + Name = name; + Type = type; + Properties = properties; + SystemData = systemData; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets ARM id of the resource. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets name of the agreement. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets the type of the resource. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + /// + /// Gets or sets represents the properties of the resource. + /// + [JsonProperty(PropertyName = "properties")] + public DatadogAgreementProperties Properties { get; set; } + + /// + /// + [JsonProperty(PropertyName = "systemData")] + public SystemData SystemData { get; private set; } + + } +} diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogMonitorResource.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogMonitorResource.cs index d779b00507b4..74cff3c485c3 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogMonitorResource.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogMonitorResource.cs @@ -33,7 +33,7 @@ public DatadogMonitorResource() /// ARM id of the monitor resource. /// Name of the monitor resource. /// The type of the monitor resource. - public DatadogMonitorResource(string location, string id = default(string), string name = default(string), string type = default(string), ResourceSku sku = default(ResourceSku), MonitorProperties properties = default(MonitorProperties), IdentityProperties identity = default(IdentityProperties), IDictionary tags = default(IDictionary)) + public DatadogMonitorResource(string location, string id = default(string), string name = default(string), string type = default(string), ResourceSku sku = default(ResourceSku), MonitorProperties properties = default(MonitorProperties), IdentityProperties identity = default(IdentityProperties), IDictionary tags = default(IDictionary), SystemData systemData = default(SystemData)) { Id = id; Name = name; @@ -43,6 +43,7 @@ public DatadogMonitorResource() Identity = identity; Tags = tags; Location = location; + SystemData = systemData; CustomInit(); } @@ -94,6 +95,11 @@ public DatadogMonitorResource() [JsonProperty(PropertyName = "location")] public string Location { get; set; } + /// + /// + [JsonProperty(PropertyName = "systemData")] + public SystemData SystemData { get; private set; } + /// /// Validate the object. /// diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogOrganizationProperties.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogOrganizationProperties.cs index 461996f98473..09ede033270f 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogOrganizationProperties.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogOrganizationProperties.cs @@ -13,6 +13,9 @@ namespace Microsoft.Azure.Management.Datadog.Models using Newtonsoft.Json; using System.Linq; + /// + /// Datadog organization properties + /// public partial class DatadogOrganizationProperties { /// @@ -34,14 +37,22 @@ public DatadogOrganizationProperties() /// existing datadog organization. /// The client_id from an existing in /// exchange for an auth token to link organization. + /// The redirect uri for linking. + /// Api key associated to the Datadog + /// organization. + /// Application key associated to the + /// Datadog organization. /// The Id of the Enterprise App used for /// Single sign on. - public DatadogOrganizationProperties(string name = default(string), string id = default(string), string linkingAuthCode = default(string), string linkingClientId = default(string), string enterpriseAppId = default(string)) + public DatadogOrganizationProperties(string name = default(string), string id = default(string), string linkingAuthCode = default(string), string linkingClientId = default(string), string redirectUri = default(string), string apiKey = default(string), string applicationKey = default(string), string enterpriseAppId = default(string)) { Name = name; Id = id; LinkingAuthCode = linkingAuthCode; LinkingClientId = linkingClientId; + RedirectUri = redirectUri; + ApiKey = apiKey; + ApplicationKey = applicationKey; EnterpriseAppId = enterpriseAppId; CustomInit(); } @@ -77,6 +88,25 @@ public DatadogOrganizationProperties() [JsonProperty(PropertyName = "linkingClientId")] public string LinkingClientId { get; set; } + /// + /// Gets or sets the redirect uri for linking. + /// + [JsonProperty(PropertyName = "redirectUri")] + public string RedirectUri { get; set; } + + /// + /// Gets or sets api key associated to the Datadog organization. + /// + [JsonProperty(PropertyName = "apiKey")] + public string ApiKey { get; set; } + + /// + /// Gets or sets application key associated to the Datadog + /// organization. + /// + [JsonProperty(PropertyName = "applicationKey")] + public string ApplicationKey { get; set; } + /// /// Gets or sets the Id of the Enterprise App used for Single sign on. /// diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogSingleSignOnProperties.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogSingleSignOnProperties.cs index d61ed71857ea..394a2c8297ef 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogSingleSignOnProperties.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogSingleSignOnProperties.cs @@ -28,14 +28,18 @@ public DatadogSingleSignOnProperties() /// Initializes a new instance of the DatadogSingleSignOnProperties /// class. /// + /// Possible values include: + /// 'Accepted', 'Creating', 'Updating', 'Deleting', 'Succeeded', + /// 'Failed', 'Canceled', 'Deleted', 'NotSpecified' /// Possible values include: 'Initial', /// 'Enable', 'Disable', 'Existing' /// The Id of the Enterprise App used for /// Single sign-on. /// The login URL specific to this /// Datadog Organization. - public DatadogSingleSignOnProperties(string singleSignOnState = default(string), string enterpriseAppId = default(string), string singleSignOnUrl = default(string)) + public DatadogSingleSignOnProperties(string provisioningState = default(string), string singleSignOnState = default(string), string enterpriseAppId = default(string), string singleSignOnUrl = default(string)) { + ProvisioningState = provisioningState; SingleSignOnState = singleSignOnState; EnterpriseAppId = enterpriseAppId; SingleSignOnUrl = singleSignOnUrl; @@ -47,6 +51,14 @@ public DatadogSingleSignOnProperties() /// partial void CustomInit(); + /// + /// Gets or sets possible values include: 'Accepted', 'Creating', + /// 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled', + /// 'Deleted', 'NotSpecified' + /// + [JsonProperty(PropertyName = "provisioningState")] + public string ProvisioningState { get; set; } + /// /// Gets or sets possible values include: 'Initial', 'Enable', /// 'Disable', 'Existing' @@ -61,10 +73,10 @@ public DatadogSingleSignOnProperties() public string EnterpriseAppId { get; set; } /// - /// Gets or sets the login URL specific to this Datadog Organization. + /// Gets the login URL specific to this Datadog Organization. /// [JsonProperty(PropertyName = "singleSignOnUrl")] - public string SingleSignOnUrl { get; set; } + public string SingleSignOnUrl { get; private set; } } } diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogSingleSignOnResource.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogSingleSignOnResource.cs index f18d9af0b5d6..6f373e59233d 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogSingleSignOnResource.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogSingleSignOnResource.cs @@ -33,12 +33,13 @@ public DatadogSingleSignOnResource() /// ARM id of the resource. /// Name of the configuration. /// The type of the resource. - public DatadogSingleSignOnResource(string id = default(string), string name = default(string), string type = default(string), DatadogSingleSignOnProperties properties = default(DatadogSingleSignOnProperties)) + public DatadogSingleSignOnResource(string id = default(string), string name = default(string), string type = default(string), DatadogSingleSignOnProperties properties = default(DatadogSingleSignOnProperties), SystemData systemData = default(SystemData)) { Id = id; Name = name; Type = type; Properties = properties; + SystemData = systemData; CustomInit(); } @@ -70,5 +71,10 @@ public DatadogSingleSignOnResource() [JsonProperty(PropertyName = "properties")] public DatadogSingleSignOnProperties Properties { get; set; } + /// + /// + [JsonProperty(PropertyName = "systemData")] + public SystemData SystemData { get; private set; } + } } diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ErrorAdditionalInfo.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ErrorAdditionalInfo.cs new file mode 100644 index 000000000000..712389be1444 --- /dev/null +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ErrorAdditionalInfo.cs @@ -0,0 +1,59 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Datadog.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The resource management error additional info. + /// + public partial class ErrorAdditionalInfo + { + /// + /// Initializes a new instance of the ErrorAdditionalInfo class. + /// + public ErrorAdditionalInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ErrorAdditionalInfo class. + /// + /// The additional info type. + /// The additional info. + public ErrorAdditionalInfo(string type = default(string), object info = default(object)) + { + Type = type; + Info = info; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the additional info type. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + /// + /// Gets the additional info. + /// + [JsonProperty(PropertyName = "info")] + public object Info { get; private set; } + + } +} diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ErrorDetail.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ErrorDetail.cs new file mode 100644 index 000000000000..6ddc068b6504 --- /dev/null +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ErrorDetail.cs @@ -0,0 +1,85 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Datadog.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The error detail. + /// + public partial class ErrorDetail + { + /// + /// Initializes a new instance of the ErrorDetail class. + /// + public ErrorDetail() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ErrorDetail class. + /// + /// The error code. + /// The error message. + /// The error target. + /// The error details. + /// The error additional info. + public ErrorDetail(string code = default(string), string message = default(string), string target = default(string), IList details = default(IList), IList additionalInfo = default(IList)) + { + Code = code; + Message = message; + Target = target; + Details = details; + AdditionalInfo = additionalInfo; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the error code. + /// + [JsonProperty(PropertyName = "code")] + public string Code { get; private set; } + + /// + /// Gets the error message. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; private set; } + + /// + /// Gets the error target. + /// + [JsonProperty(PropertyName = "target")] + public string Target { get; private set; } + + /// + /// Gets the error details. + /// + [JsonProperty(PropertyName = "details")] + public IList Details { get; private set; } + + /// + /// Gets the error additional info. + /// + [JsonProperty(PropertyName = "additionalInfo")] + public IList AdditionalInfo { get; private set; } + + } +} diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ResourceProviderDefaultErrorResponse.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ErrorResponse.cs similarity index 57% rename from sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ResourceProviderDefaultErrorResponse.cs rename to sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ErrorResponse.cs index 52bccfa4645c..19a8e022370d 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ResourceProviderDefaultErrorResponse.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ErrorResponse.cs @@ -13,22 +13,29 @@ namespace Microsoft.Azure.Management.Datadog.Models using Newtonsoft.Json; using System.Linq; - public partial class ResourceProviderDefaultErrorResponse + /// + /// Error response + /// + /// + /// Common error response for all Azure Resource Manager APIs to return + /// error details for failed operations. (This also follows the OData error + /// response format.). + /// + public partial class ErrorResponse { /// - /// Initializes a new instance of the - /// ResourceProviderDefaultErrorResponse class. + /// Initializes a new instance of the ErrorResponse class. /// - public ResourceProviderDefaultErrorResponse() + public ErrorResponse() { CustomInit(); } /// - /// Initializes a new instance of the - /// ResourceProviderDefaultErrorResponse class. + /// Initializes a new instance of the ErrorResponse class. /// - public ResourceProviderDefaultErrorResponse(ErrorResponseBody error = default(ErrorResponseBody)) + /// The error object. + public ErrorResponse(ErrorDetail error = default(ErrorDetail)) { Error = error; CustomInit(); @@ -40,9 +47,10 @@ public ResourceProviderDefaultErrorResponse() partial void CustomInit(); /// + /// Gets or sets the error object. /// [JsonProperty(PropertyName = "error")] - public ErrorResponseBody Error { get; set; } + public ErrorDetail Error { get; set; } } } diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ErrorResponseBody.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ErrorResponseBody.cs deleted file mode 100644 index 6bc9344ead5d..000000000000 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ErrorResponseBody.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Datadog.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - public partial class ErrorResponseBody - { - /// - /// Initializes a new instance of the ErrorResponseBody class. - /// - public ErrorResponseBody() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ErrorResponseBody class. - /// - public ErrorResponseBody(string code = default(string), string message = default(string), string target = default(string), IList details = default(IList)) - { - Code = code; - Message = message; - Target = target; - Details = details; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "code")] - public string Code { get; set; } - - /// - /// - [JsonProperty(PropertyName = "message")] - public string Message { get; set; } - - /// - /// - [JsonProperty(PropertyName = "target")] - public string Target { get; set; } - - /// - /// - [JsonProperty(PropertyName = "details")] - public IList Details { get; set; } - - } -} diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ResourceProviderDefaultErrorResponseException.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ErrorResponseException.cs similarity index 63% rename from sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ResourceProviderDefaultErrorResponseException.cs rename to sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ErrorResponseException.cs index 1f7bc4d63fb9..aea9d4fc8dfd 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ResourceProviderDefaultErrorResponseException.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ErrorResponseException.cs @@ -13,10 +13,10 @@ namespace Microsoft.Azure.Management.Datadog.Models using Microsoft.Rest; /// - /// Exception thrown for an invalid response with - /// ResourceProviderDefaultErrorResponse information. + /// Exception thrown for an invalid response with ErrorResponse + /// information. /// - public partial class ResourceProviderDefaultErrorResponseException : RestException + public partial class ErrorResponseException : RestException { /// /// Gets information about the associated HTTP request. @@ -31,30 +31,30 @@ public partial class ResourceProviderDefaultErrorResponseException : RestExcepti /// /// Gets or sets the body object. /// - public ResourceProviderDefaultErrorResponse Body { get; set; } + public ErrorResponse Body { get; set; } /// - /// Initializes a new instance of the ResourceProviderDefaultErrorResponseException class. + /// Initializes a new instance of the ErrorResponseException class. /// - public ResourceProviderDefaultErrorResponseException() + public ErrorResponseException() { } /// - /// Initializes a new instance of the ResourceProviderDefaultErrorResponseException class. + /// Initializes a new instance of the ErrorResponseException class. /// /// The exception message. - public ResourceProviderDefaultErrorResponseException(string message) + public ErrorResponseException(string message) : this(message, null) { } /// - /// Initializes a new instance of the ResourceProviderDefaultErrorResponseException class. + /// Initializes a new instance of the ErrorResponseException class. /// /// The exception message. /// Inner exception. - public ResourceProviderDefaultErrorResponseException(string message, System.Exception innerException) + public ErrorResponseException(string message, System.Exception innerException) : base(message, innerException) { } diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MarketplaceSubscriptionStatus.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MarketplaceSubscriptionStatus.cs index 7ca947d6e37a..3ca57524d9da 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MarketplaceSubscriptionStatus.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MarketplaceSubscriptionStatus.cs @@ -16,7 +16,9 @@ namespace Microsoft.Azure.Management.Datadog.Models /// public static class MarketplaceSubscriptionStatus { + public const string Provisioning = "Provisioning"; public const string Active = "Active"; public const string Suspended = "Suspended"; + public const string Unsubscribed = "Unsubscribed"; } } diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MonitorProperties.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MonitorProperties.cs index 7f124a490d6b..3d24bd84fb7f 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MonitorProperties.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MonitorProperties.cs @@ -35,7 +35,8 @@ public MonitorProperties() /// Possible values include: 'Enabled', /// 'Disabled' /// Possible values - /// include: 'Active', 'Suspended' + /// include: 'Provisioning', 'Active', 'Suspended', + /// 'Unsubscribed' /// Possible values include: /// 'Unknown', 'MonitorLogs' /// The priority of the @@ -72,7 +73,8 @@ public MonitorProperties() public string MonitoringStatus { get; set; } /// - /// Gets or sets possible values include: 'Active', 'Suspended' + /// Gets or sets possible values include: 'Provisioning', 'Active', + /// 'Suspended', 'Unsubscribed' /// [JsonProperty(PropertyName = "marketplaceSubscriptionStatus")] public string MarketplaceSubscriptionStatus { get; set; } diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MonitoringTagRules.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MonitoringTagRules.cs index 8d9088b8cf24..899906aaba1e 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MonitoringTagRules.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MonitoringTagRules.cs @@ -34,12 +34,13 @@ public MonitoringTagRules() /// Name of the rule set. /// The id of the rule set. /// The type of the rule set. - public MonitoringTagRules(string name = default(string), string id = default(string), string type = default(string), MonitoringTagRulesProperties properties = default(MonitoringTagRulesProperties)) + public MonitoringTagRules(string name = default(string), string id = default(string), string type = default(string), MonitoringTagRulesProperties properties = default(MonitoringTagRulesProperties), SystemData systemData = default(SystemData)) { Name = name; Id = id; Type = type; Properties = properties; + SystemData = systemData; CustomInit(); } @@ -71,5 +72,10 @@ public MonitoringTagRules() [JsonProperty(PropertyName = "properties")] public MonitoringTagRulesProperties Properties { get; set; } + /// + /// + [JsonProperty(PropertyName = "systemData")] + public SystemData SystemData { get; private set; } + } } diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MonitoringTagRulesProperties.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MonitoringTagRulesProperties.cs index 5cf27df24b69..9bfd3b6530d9 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MonitoringTagRulesProperties.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MonitoringTagRulesProperties.cs @@ -31,8 +31,12 @@ public MonitoringTagRulesProperties() /// Initializes a new instance of the MonitoringTagRulesProperties /// class. /// - public MonitoringTagRulesProperties(LogRules logRules = default(LogRules), MetricRules metricRules = default(MetricRules)) + /// Possible values include: + /// 'Accepted', 'Creating', 'Updating', 'Deleting', 'Succeeded', + /// 'Failed', 'Canceled', 'Deleted', 'NotSpecified' + public MonitoringTagRulesProperties(string provisioningState = default(string), LogRules logRules = default(LogRules), MetricRules metricRules = default(MetricRules)) { + ProvisioningState = provisioningState; LogRules = logRules; MetricRules = metricRules; CustomInit(); @@ -43,6 +47,14 @@ public MonitoringTagRulesProperties() /// partial void CustomInit(); + /// + /// Gets or sets possible values include: 'Accepted', 'Creating', + /// 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled', + /// 'Deleted', 'NotSpecified' + /// + [JsonProperty(PropertyName = "provisioningState")] + public string ProvisioningState { get; set; } + /// /// [JsonProperty(PropertyName = "logRules")] diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/SystemData.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/SystemData.cs new file mode 100644 index 000000000000..768c23ac7001 --- /dev/null +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/SystemData.cs @@ -0,0 +1,103 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Datadog.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Metadata pertaining to creation and last modification of the resource. + /// + public partial class SystemData + { + /// + /// Initializes a new instance of the SystemData class. + /// + public SystemData() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SystemData class. + /// + /// The identity that created the + /// resource. + /// The type of identity that created the + /// resource. Possible values include: 'User', 'Application', + /// 'ManagedIdentity', 'Key' + /// The timestamp of resource creation + /// (UTC). + /// The identity that last modified the + /// resource. + /// The type of identity that last + /// modified the resource. Possible values include: 'User', + /// 'Application', 'ManagedIdentity', 'Key' + /// The timestamp of resource last + /// modification (UTC) + public SystemData(string createdBy = default(string), string createdByType = default(string), System.DateTime? createdAt = default(System.DateTime?), string lastModifiedBy = default(string), string lastModifiedByType = default(string), System.DateTime? lastModifiedAt = default(System.DateTime?)) + { + CreatedBy = createdBy; + CreatedByType = createdByType; + CreatedAt = createdAt; + LastModifiedBy = lastModifiedBy; + LastModifiedByType = lastModifiedByType; + LastModifiedAt = lastModifiedAt; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the identity that created the resource. + /// + [JsonProperty(PropertyName = "createdBy")] + public string CreatedBy { get; set; } + + /// + /// Gets or sets the type of identity that created the resource. + /// Possible values include: 'User', 'Application', 'ManagedIdentity', + /// 'Key' + /// + [JsonProperty(PropertyName = "createdByType")] + public string CreatedByType { get; set; } + + /// + /// Gets or sets the timestamp of resource creation (UTC). + /// + [JsonProperty(PropertyName = "createdAt")] + public System.DateTime? CreatedAt { get; set; } + + /// + /// Gets or sets the identity that last modified the resource. + /// + [JsonProperty(PropertyName = "lastModifiedBy")] + public string LastModifiedBy { get; set; } + + /// + /// Gets or sets the type of identity that last modified the resource. + /// Possible values include: 'User', 'Application', 'ManagedIdentity', + /// 'Key' + /// + [JsonProperty(PropertyName = "lastModifiedByType")] + public string LastModifiedByType { get; set; } + + /// + /// Gets or sets the timestamp of resource last modification (UTC) + /// + [JsonProperty(PropertyName = "lastModifiedAt")] + public System.DateTime? LastModifiedAt { get; set; } + + } +} diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/UserInfo.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/UserInfo.cs index 3f5d83619f35..deaa6d33be36 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/UserInfo.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/UserInfo.cs @@ -14,6 +14,9 @@ namespace Microsoft.Azure.Management.Datadog.Models using Newtonsoft.Json; using System.Linq; + /// + /// User info + /// public partial class UserInfo { /// diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MonitoredResourcesOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MonitoredResourcesOperations.cs deleted file mode 100644 index 386c7b53818a..000000000000 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MonitoredResourcesOperations.cs +++ /dev/null @@ -1,422 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Datadog -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - /// - /// MonitoredResourcesOperations operations. - /// - internal partial class MonitoredResourcesOperations : IServiceOperations, IMonitoredResourcesOperations - { - /// - /// Initializes a new instance of the MonitoredResourcesOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal MonitoredResourcesOperations(MicrosoftDatadogClient client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the MicrosoftDatadogClient - /// - public MicrosoftDatadogClient Client { get; private set; } - - /// - /// List the resources currently being monitored by the Datadog monitor - /// resource. - /// - /// - /// The name of the resource group to which the Datadog resource belongs. - /// - /// - /// Monitor resource 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>> ListWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (monitorName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "monitorName"); - } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("monitorName", monitorName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/listMonitoredResources").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{monitorName}", System.Uri.EscapeDataString(monitorName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("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 ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ResourceProviderDefaultErrorResponse _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; - } - - /// - /// List the resources currently being monitored by the Datadog monitor - /// resource. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (nextPageLink == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextPageLink", nextPageLink); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); - } - // Construct URL - string _url = "{nextLink}"; - _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("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 ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ResourceProviderDefaultErrorResponse _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/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MonitoredResourcesOperationsExtensions.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MonitoredResourcesOperationsExtensions.cs deleted file mode 100644 index 0cb64a4ac5b8..000000000000 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MonitoredResourcesOperationsExtensions.cs +++ /dev/null @@ -1,103 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Datadog -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for MonitoredResourcesOperations. - /// - public static partial class MonitoredResourcesOperationsExtensions - { - /// - /// List the resources currently being monitored by the Datadog monitor - /// resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group to which the Datadog resource belongs. - /// - /// - /// Monitor resource name - /// - public static IPage List(this IMonitoredResourcesOperations operations, string resourceGroupName, string monitorName) - { - return operations.ListAsync(resourceGroupName, monitorName).GetAwaiter().GetResult(); - } - - /// - /// List the resources currently being monitored by the Datadog monitor - /// resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group to which the Datadog resource belongs. - /// - /// - /// Monitor resource name - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IMonitoredResourcesOperations operations, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, monitorName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List the resources currently being monitored by the Datadog monitor - /// resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IMonitoredResourcesOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List the resources currently being monitored by the Datadog monitor - /// resource. - /// - /// - /// 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 IMonitoredResourcesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MonitorsOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MonitorsOperations.cs index a9909dde73ae..8469d0ff1b21 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MonitorsOperations.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MonitorsOperations.cs @@ -51,15 +51,21 @@ internal MonitorsOperations(MicrosoftDatadogClient client) public MicrosoftDatadogClient Client { get; private set; } /// - /// List all monitors under the specified subscription. + /// List the api keys for a given monitor resource. /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Monitor resource name + /// /// /// Headers that will be added to request. /// /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -74,12 +80,42 @@ internal MonitorsOperations(MicrosoftDatadogClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListApiKeysWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (monitorName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "monitorName"); + } if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); @@ -98,13 +134,17 @@ internal MonitorsOperations(MicrosoftDatadogClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("monitorName", monitorName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListApiKeys", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Datadog/monitors").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/listApiKeys").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{monitorName}", System.Uri.EscapeDataString(monitorName)); List _queryParameters = new List(); if (Client.ApiVersion != null) { @@ -117,7 +157,7 @@ internal MonitorsOperations(MicrosoftDatadogClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -170,11 +210,11 @@ internal MonitorsOperations(MicrosoftDatadogClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -198,7 +238,7 @@ internal MonitorsOperations(MicrosoftDatadogClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -211,7 +251,7 @@ internal MonitorsOperations(MicrosoftDatadogClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -231,10 +271,13 @@ internal MonitorsOperations(MicrosoftDatadogClient client) } /// - /// List all monitors under the specified resource group. + /// Get the default api key. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Monitor resource name /// /// /// Headers that will be added to request. @@ -242,7 +285,7 @@ internal MonitorsOperations(MicrosoftDatadogClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -257,16 +300,42 @@ internal MonitorsOperations(MicrosoftDatadogClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetDefaultKeyWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (monitorName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "monitorName"); + } if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); @@ -286,14 +355,16 @@ internal MonitorsOperations(MicrosoftDatadogClient client) _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("monitorName", monitorName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetDefaultKey", 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.Datadog/monitors").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/getDefaultKey").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{monitorName}", System.Uri.EscapeDataString(monitorName)); List _queryParameters = new List(); if (Client.ApiVersion != null) { @@ -306,7 +377,7 @@ internal MonitorsOperations(MicrosoftDatadogClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -359,11 +430,11 @@ internal MonitorsOperations(MicrosoftDatadogClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -387,7 +458,7 @@ internal MonitorsOperations(MicrosoftDatadogClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -400,7 +471,7 @@ internal MonitorsOperations(MicrosoftDatadogClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -420,26 +491,25 @@ internal MonitorsOperations(MicrosoftDatadogClient client) } /// - /// Get the properties of a specific monitor resource. + /// Set the default api key. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource 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 /// @@ -449,16 +519,38 @@ internal MonitorsOperations(MicrosoftDatadogClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task SetDefaultKeyWithHttpMessagesAsync(string resourceGroupName, string monitorName, DatadogApiKey body = default(DatadogApiKey), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } if (monitorName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "monitorName"); @@ -474,6 +566,10 @@ internal MonitorsOperations(MicrosoftDatadogClient client) throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); } } + if (body != null) + { + body.Validate(); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -483,12 +579,13 @@ internal MonitorsOperations(MicrosoftDatadogClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("monitorName", monitorName); + tracingParameters.Add("body", body); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "SetDefaultKey", 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.Datadog/monitors/{monitorName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/setDefaultKey").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{monitorName}", System.Uri.EscapeDataString(monitorName)); @@ -504,7 +601,7 @@ internal MonitorsOperations(MicrosoftDatadogClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -535,6 +632,12 @@ internal MonitorsOperations(MicrosoftDatadogClient client) // Serialize Request string _requestContent = null; + if(body != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(body, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -557,11 +660,11 @@ internal MonitorsOperations(MicrosoftDatadogClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -585,31 +688,13 @@ internal MonitorsOperations(MicrosoftDatadogClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + 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); @@ -618,47 +703,21 @@ internal MonitorsOperations(MicrosoftDatadogClient client) } /// - /// Create a monitor resource. - /// - /// - /// The name of the resource group to which the Datadog resource belongs. - /// - /// - /// Monitor resource name - /// - /// - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateWithHttpMessagesAsync(string resourceGroupName, string monitorName, DatadogMonitorResource body = default(DatadogMonitorResource), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(resourceGroupName, monitorName, body, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Update a monitor resource. + /// List the hosts for a given monitor resource. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name /// - /// - /// /// /// Headers that will be added to request. /// /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -673,16 +732,38 @@ internal MonitorsOperations(MicrosoftDatadogClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string monitorName, DatadogMonitorResourceUpdateParameters body = default(DatadogMonitorResourceUpdateParameters), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListHostsWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } if (monitorName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "monitorName"); @@ -707,13 +788,12 @@ internal MonitorsOperations(MicrosoftDatadogClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("monitorName", monitorName); - tracingParameters.Add("body", body); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListHosts", 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.Datadog/monitors/{monitorName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/listHosts").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{monitorName}", System.Uri.EscapeDataString(monitorName)); @@ -729,7 +809,7 @@ internal MonitorsOperations(MicrosoftDatadogClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -760,12 +840,6 @@ internal MonitorsOperations(MicrosoftDatadogClient client) // Serialize Request string _requestContent = null; - if(body != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(body, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -788,11 +862,11 @@ internal MonitorsOperations(MicrosoftDatadogClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -816,7 +890,7 @@ internal MonitorsOperations(MicrosoftDatadogClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -829,7 +903,7 @@ internal MonitorsOperations(MicrosoftDatadogClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -849,45 +923,22 @@ internal MonitorsOperations(MicrosoftDatadogClient client) } /// - /// Delete a monitor resource. - /// - /// - /// The name of the resource group to which the Datadog resource belongs. - /// - /// - /// Monitor resource name - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, monitorName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Create a monitor resource. + /// List all Azure resources associated to the same Datadog organization as the + /// target resource. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name /// - /// - /// /// /// Headers that will be added to request. /// /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -902,16 +953,38 @@ internal MonitorsOperations(MicrosoftDatadogClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string monitorName, DatadogMonitorResource body = default(DatadogMonitorResource), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListLinkedResourcesWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } if (monitorName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "monitorName"); @@ -927,10 +1000,6 @@ internal MonitorsOperations(MicrosoftDatadogClient client) throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); } } - if (body != null) - { - body.Validate(); - } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -940,13 +1009,12 @@ internal MonitorsOperations(MicrosoftDatadogClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("monitorName", monitorName); - tracingParameters.Add("body", body); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListLinkedResources", 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.Datadog/monitors/{monitorName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/listLinkedResources").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{monitorName}", System.Uri.EscapeDataString(monitorName)); @@ -962,7 +1030,7 @@ internal MonitorsOperations(MicrosoftDatadogClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -993,12 +1061,6 @@ internal MonitorsOperations(MicrosoftDatadogClient client) // Serialize Request string _requestContent = null; - if(body != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(body, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -1019,13 +1081,13 @@ internal MonitorsOperations(MicrosoftDatadogClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201) + if ((int)_statusCode != 200) { - var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1049,7 +1111,7 @@ internal MonitorsOperations(MicrosoftDatadogClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -1062,25 +1124,7 @@ internal MonitorsOperations(MicrosoftDatadogClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1100,10 +1144,11 @@ internal MonitorsOperations(MicrosoftDatadogClient client) } /// - /// Delete a monitor resource. + /// List the resources currently being monitored by the Datadog monitor + /// resource. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name @@ -1114,9 +1159,12 @@ internal MonitorsOperations(MicrosoftDatadogClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -1126,23 +1174,45 @@ internal MonitorsOperations(MicrosoftDatadogClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListMonitoredResourcesWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (resourceGroupName == null) + if (Client.SubscriptionId != null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } } - if (monitorName == null) + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "monitorName"); + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.ApiVersion == null) + if (resourceGroupName != null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (monitorName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "monitorName"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } if (Client.ApiVersion != null) { @@ -1161,11 +1231,11 @@ internal MonitorsOperations(MicrosoftDatadogClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("monitorName", monitorName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListMonitoredResources", 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.Datadog/monitors/{monitorName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/listMonitoredResources").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{monitorName}", System.Uri.EscapeDataString(monitorName)); @@ -1181,7 +1251,7 @@ internal MonitorsOperations(MicrosoftDatadogClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -1232,13 +1302,13 @@ internal MonitorsOperations(MicrosoftDatadogClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) + if ((int)_statusCode != 200) { - var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1262,13 +1332,2268 @@ internal MonitorsOperations(MicrosoftDatadogClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + 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; + } + + /// + /// List all monitors under the specified 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>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + // 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.Datadog/monitors").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 HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new 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; + } + + /// + /// List all monitors under the specified resource group. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation 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 (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + // 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.Datadog/monitors").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new 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; + } + + /// + /// Get the properties of a specific monitor resource. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Monitor resource 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 monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (monitorName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "monitorName"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("monitorName", monitorName); + 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.Datadog/monitors/{monitorName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{monitorName}", System.Uri.EscapeDataString(monitorName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new 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 a monitor resource. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Monitor resource name + /// + /// + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateWithHttpMessagesAsync(string resourceGroupName, string monitorName, DatadogMonitorResource body = default(DatadogMonitorResource), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(resourceGroupName, monitorName, body, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Update a monitor resource. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Monitor resource 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> UpdateWithHttpMessagesAsync(string resourceGroupName, string monitorName, DatadogMonitorResourceUpdateParameters body = default(DatadogMonitorResourceUpdateParameters), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (monitorName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "monitorName"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("monitorName", monitorName); + tracingParameters.Add("body", body); + 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.Datadog/monitors/{monitorName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{monitorName}", System.Uri.EscapeDataString(monitorName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(body, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new 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; + } + + /// + /// Delete a monitor resource. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Monitor resource name + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, monitorName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Refresh the set password link and return a latest one. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Monitor resource 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> RefreshSetPasswordLinkWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (monitorName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "monitorName"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("monitorName", monitorName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "RefreshSetPasswordLink", 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.Datadog/monitors/{monitorName}/refreshSetPasswordLink").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{monitorName}", System.Uri.EscapeDataString(monitorName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("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; + } + + /// + /// Create a monitor resource. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Monitor resource 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> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string monitorName, DatadogMonitorResource body = default(DatadogMonitorResource), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (monitorName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "monitorName"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (body != null) + { + body.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("monitorName", monitorName); + tracingParameters.Add("body", body); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{monitorName}", System.Uri.EscapeDataString(monitorName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(body, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new 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); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Delete a monitor resource. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Monitor resource 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 monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (monitorName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "monitorName"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("monitorName", monitorName); + 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.Datadog/monitors/{monitorName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{monitorName}", System.Uri.EscapeDataString(monitorName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 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; + } + + /// + /// List the api keys for a given monitor resource. + /// + /// + /// 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>> ListApiKeysNextWithHttpMessagesAsync(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, "ListApiKeysNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("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; + } + + /// + /// List the hosts for a given monitor resource. + /// + /// + /// 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>> ListHostsNextWithHttpMessagesAsync(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, "ListHostsNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("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; + } + + /// + /// List all Azure resources associated to the same Datadog organization as the + /// target resource. + /// + /// + /// 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>> ListLinkedResourcesNextWithHttpMessagesAsync(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, "ListLinkedResourcesNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("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; + } + + /// + /// List the resources currently being monitored by the Datadog monitor + /// resource. + /// + /// + /// 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>> ListMonitoredResourcesNextWithHttpMessagesAsync(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, "ListMonitoredResourcesNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("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); @@ -1288,7 +3613,7 @@ internal MonitorsOperations(MicrosoftDatadogClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1384,11 +3709,11 @@ internal MonitorsOperations(MicrosoftDatadogClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1456,7 +3781,7 @@ internal MonitorsOperations(MicrosoftDatadogClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1552,11 +3877,11 @@ internal MonitorsOperations(MicrosoftDatadogClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MonitorsOperationsExtensions.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MonitorsOperationsExtensions.cs index 60553e63e056..876724cfa6ed 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MonitorsOperationsExtensions.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MonitorsOperationsExtensions.cs @@ -21,6 +21,251 @@ namespace Microsoft.Azure.Management.Datadog /// public static partial class MonitorsOperationsExtensions { + /// + /// List the api keys for a given monitor resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Monitor resource name + /// + public static IPage ListApiKeys(this IMonitorsOperations operations, string resourceGroupName, string monitorName) + { + return operations.ListApiKeysAsync(resourceGroupName, monitorName).GetAwaiter().GetResult(); + } + + /// + /// List the api keys for a given monitor resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Monitor resource name + /// + /// + /// The cancellation token. + /// + public static async Task> ListApiKeysAsync(this IMonitorsOperations operations, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListApiKeysWithHttpMessagesAsync(resourceGroupName, monitorName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get the default api key. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Monitor resource name + /// + public static DatadogApiKey GetDefaultKey(this IMonitorsOperations operations, string resourceGroupName, string monitorName) + { + return operations.GetDefaultKeyAsync(resourceGroupName, monitorName).GetAwaiter().GetResult(); + } + + /// + /// Get the default api key. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Monitor resource name + /// + /// + /// The cancellation token. + /// + public static async Task GetDefaultKeyAsync(this IMonitorsOperations operations, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetDefaultKeyWithHttpMessagesAsync(resourceGroupName, monitorName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Set the default api key. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Monitor resource name + /// + /// + /// + public static void SetDefaultKey(this IMonitorsOperations operations, string resourceGroupName, string monitorName, DatadogApiKey body = default(DatadogApiKey)) + { + operations.SetDefaultKeyAsync(resourceGroupName, monitorName, body).GetAwaiter().GetResult(); + } + + /// + /// Set the default api key. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Monitor resource name + /// + /// + /// + /// + /// The cancellation token. + /// + public static async Task SetDefaultKeyAsync(this IMonitorsOperations operations, string resourceGroupName, string monitorName, DatadogApiKey body = default(DatadogApiKey), CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.SetDefaultKeyWithHttpMessagesAsync(resourceGroupName, monitorName, body, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// List the hosts for a given monitor resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Monitor resource name + /// + public static IPage ListHosts(this IMonitorsOperations operations, string resourceGroupName, string monitorName) + { + return operations.ListHostsAsync(resourceGroupName, monitorName).GetAwaiter().GetResult(); + } + + /// + /// List the hosts for a given monitor resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Monitor resource name + /// + /// + /// The cancellation token. + /// + public static async Task> ListHostsAsync(this IMonitorsOperations operations, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListHostsWithHttpMessagesAsync(resourceGroupName, monitorName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// List all Azure resources associated to the same Datadog organization as the + /// target resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Monitor resource name + /// + public static IPage ListLinkedResources(this IMonitorsOperations operations, string resourceGroupName, string monitorName) + { + return operations.ListLinkedResourcesAsync(resourceGroupName, monitorName).GetAwaiter().GetResult(); + } + + /// + /// List all Azure resources associated to the same Datadog organization as the + /// target resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Monitor resource name + /// + /// + /// The cancellation token. + /// + public static async Task> ListLinkedResourcesAsync(this IMonitorsOperations operations, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListLinkedResourcesWithHttpMessagesAsync(resourceGroupName, monitorName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// List the resources currently being monitored by the Datadog monitor + /// resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Monitor resource name + /// + public static IPage ListMonitoredResources(this IMonitorsOperations operations, string resourceGroupName, string monitorName) + { + return operations.ListMonitoredResourcesAsync(resourceGroupName, monitorName).GetAwaiter().GetResult(); + } + + /// + /// List the resources currently being monitored by the Datadog monitor + /// resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Monitor resource name + /// + /// + /// The cancellation token. + /// + public static async Task> ListMonitoredResourcesAsync(this IMonitorsOperations operations, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListMonitoredResourcesWithHttpMessagesAsync(resourceGroupName, monitorName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// List all monitors under the specified subscription. /// @@ -56,7 +301,7 @@ public static IPage List(this IMonitorsOperations operat /// The operations group for this extension method. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// public static IPage ListByResourceGroup(this IMonitorsOperations operations, string resourceGroupName) { @@ -70,7 +315,7 @@ public static IPage ListByResourceGroup(this IMonitorsOp /// The operations group for this extension method. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// The cancellation token. @@ -90,7 +335,7 @@ public static IPage ListByResourceGroup(this IMonitorsOp /// The operations group for this extension method. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name @@ -107,7 +352,7 @@ public static DatadogMonitorResource Get(this IMonitorsOperations operations, st /// The operations group for this extension method. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name @@ -130,7 +375,7 @@ public static DatadogMonitorResource Get(this IMonitorsOperations operations, st /// The operations group for this extension method. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name @@ -149,7 +394,7 @@ public static DatadogMonitorResource Get(this IMonitorsOperations operations, st /// The operations group for this extension method. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name @@ -174,7 +419,7 @@ public static DatadogMonitorResource Get(this IMonitorsOperations operations, st /// The operations group for this extension method. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name @@ -193,7 +438,7 @@ public static DatadogMonitorResource Get(this IMonitorsOperations operations, st /// The operations group for this extension method. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name @@ -218,7 +463,7 @@ public static DatadogMonitorResource Get(this IMonitorsOperations operations, st /// The operations group for this extension method. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name @@ -235,7 +480,7 @@ public static void Delete(this IMonitorsOperations operations, string resourceGr /// The operations group for this extension method. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name @@ -248,6 +493,46 @@ public static void Delete(this IMonitorsOperations operations, string resourceGr (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, monitorName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } + /// + /// Refresh the set password link and return a latest one. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Monitor resource name + /// + public static DatadogSetPasswordLink RefreshSetPasswordLink(this IMonitorsOperations operations, string resourceGroupName, string monitorName) + { + return operations.RefreshSetPasswordLinkAsync(resourceGroupName, monitorName).GetAwaiter().GetResult(); + } + + /// + /// Refresh the set password link and return a latest one. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Monitor resource name + /// + /// + /// The cancellation token. + /// + public static async Task RefreshSetPasswordLinkAsync(this IMonitorsOperations operations, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.RefreshSetPasswordLinkWithHttpMessagesAsync(resourceGroupName, monitorName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Create a monitor resource. /// @@ -255,7 +540,7 @@ public static void Delete(this IMonitorsOperations operations, string resourceGr /// The operations group for this extension method. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name @@ -274,7 +559,7 @@ public static void Delete(this IMonitorsOperations operations, string resourceGr /// The operations group for this extension method. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name @@ -299,7 +584,7 @@ public static void Delete(this IMonitorsOperations operations, string resourceGr /// The operations group for this extension method. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name @@ -316,7 +601,7 @@ public static void BeginDelete(this IMonitorsOperations operations, string resou /// The operations group for this extension method. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name @@ -329,6 +614,146 @@ public static void BeginDelete(this IMonitorsOperations operations, string resou (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, monitorName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } + /// + /// List the api keys for a given monitor resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListApiKeysNext(this IMonitorsOperations operations, string nextPageLink) + { + return operations.ListApiKeysNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// List the api keys for a given monitor resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListApiKeysNextAsync(this IMonitorsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListApiKeysNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// List the hosts for a given monitor resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListHostsNext(this IMonitorsOperations operations, string nextPageLink) + { + return operations.ListHostsNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// List the hosts for a given monitor resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListHostsNextAsync(this IMonitorsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListHostsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// List all Azure resources associated to the same Datadog organization as the + /// target resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListLinkedResourcesNext(this IMonitorsOperations operations, string nextPageLink) + { + return operations.ListLinkedResourcesNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// List all Azure resources associated to the same Datadog organization as the + /// target resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListLinkedResourcesNextAsync(this IMonitorsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListLinkedResourcesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// List the resources currently being monitored by the Datadog monitor + /// resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListMonitoredResourcesNext(this IMonitorsOperations operations, string nextPageLink) + { + return operations.ListMonitoredResourcesNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// List the resources currently being monitored by the Datadog monitor + /// resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListMonitoredResourcesNextAsync(this IMonitorsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListMonitoredResourcesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// List all monitors under the specified subscription. /// diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Operations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Operations.cs index 0f5d727a6019..581f6ef66e63 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Operations.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Operations.cs @@ -51,8 +51,8 @@ internal Operations(MicrosoftDatadogClient client) public MicrosoftDatadogClient Client { get; private set; } /// - /// List all operations provided by Microsoft.Datadog for the - /// 2020-02-01-preview api version. + /// List all operations provided by Microsoft.Datadog for the 2021-03-01 api + /// version. /// /// /// Headers that will be added to request. @@ -60,7 +60,7 @@ internal Operations(MicrosoftDatadogClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -166,11 +166,11 @@ internal Operations(MicrosoftDatadogClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -227,8 +227,8 @@ internal Operations(MicrosoftDatadogClient client) } /// - /// List all operations provided by Microsoft.Datadog for the - /// 2020-02-01-preview api version. + /// List all operations provided by Microsoft.Datadog for the 2021-03-01 api + /// version. /// /// /// The NextLink from the previous successful call to List operation. @@ -239,7 +239,7 @@ internal Operations(MicrosoftDatadogClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -335,11 +335,11 @@ internal Operations(MicrosoftDatadogClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/OperationsExtensions.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/OperationsExtensions.cs index cd3077a3dabf..a2e74f0dea09 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/OperationsExtensions.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/OperationsExtensions.cs @@ -22,8 +22,8 @@ namespace Microsoft.Azure.Management.Datadog public static partial class OperationsExtensions { /// - /// List all operations provided by Microsoft.Datadog for the - /// 2020-02-01-preview api version. + /// List all operations provided by Microsoft.Datadog for the 2021-03-01 api + /// version. /// /// /// The operations group for this extension method. @@ -34,8 +34,8 @@ public static IPage List(this IOperations operations) } /// - /// List all operations provided by Microsoft.Datadog for the - /// 2020-02-01-preview api version. + /// List all operations provided by Microsoft.Datadog for the 2021-03-01 api + /// version. /// /// /// The operations group for this extension method. @@ -52,8 +52,8 @@ public static IPage List(this IOperations operations) } /// - /// List all operations provided by Microsoft.Datadog for the - /// 2020-02-01-preview api version. + /// List all operations provided by Microsoft.Datadog for the 2021-03-01 api + /// version. /// /// /// The operations group for this extension method. @@ -67,8 +67,8 @@ public static IPage ListNext(this IOperations operations, strin } /// - /// List all operations provided by Microsoft.Datadog for the - /// 2020-02-01-preview api version. + /// List all operations provided by Microsoft.Datadog for the 2021-03-01 api + /// version. /// /// /// The operations group for this extension method. diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/RefreshSetPasswordOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/RefreshSetPasswordOperations.cs deleted file mode 100644 index f185c8186e96..000000000000 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/RefreshSetPasswordOperations.cs +++ /dev/null @@ -1,252 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Datadog -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - /// - /// RefreshSetPasswordOperations operations. - /// - internal partial class RefreshSetPasswordOperations : IServiceOperations, IRefreshSetPasswordOperations - { - /// - /// Initializes a new instance of the RefreshSetPasswordOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal RefreshSetPasswordOperations(MicrosoftDatadogClient client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the MicrosoftDatadogClient - /// - public MicrosoftDatadogClient Client { get; private set; } - - /// - /// Refresh the set password link and return a latest one. - /// - /// - /// The name of the resource group to which the Datadog resource belongs. - /// - /// - /// Monitor resource 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 monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (monitorName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "monitorName"); - } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("monitorName", monitorName); - 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.Datadog/monitors/{monitorName}/refreshSetPasswordLink").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{monitorName}", System.Uri.EscapeDataString(monitorName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("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 ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ResourceProviderDefaultErrorResponse _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/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/RefreshSetPasswordOperationsExtensions.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/RefreshSetPasswordOperationsExtensions.cs deleted file mode 100644 index 9e0867d27fc0..000000000000 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/RefreshSetPasswordOperationsExtensions.cs +++ /dev/null @@ -1,65 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Datadog -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for RefreshSetPasswordOperations. - /// - public static partial class RefreshSetPasswordOperationsExtensions - { - /// - /// Refresh the set password link and return a latest one. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group to which the Datadog resource belongs. - /// - /// - /// Monitor resource name - /// - public static DatadogSetPasswordLink Get(this IRefreshSetPasswordOperations operations, string resourceGroupName, string monitorName) - { - return operations.GetAsync(resourceGroupName, monitorName).GetAwaiter().GetResult(); - } - - /// - /// Refresh the set password link and return a latest one. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group to which the Datadog resource belongs. - /// - /// - /// Monitor resource name - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IRefreshSetPasswordOperations operations, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, monitorName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/SdkInfo_MicrosoftDatadogClient.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/SdkInfo_MicrosoftDatadogClient.cs index 8a14d17a5ea0..25c9b2f86147 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/SdkInfo_MicrosoftDatadogClient.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/SdkInfo_MicrosoftDatadogClient.cs @@ -19,15 +19,11 @@ public static IEnumerable> ApiInfo_MicrosoftDatado { return new Tuple[] { - new Tuple("Datadog", "ApiKeys", "2020-02-01-preview"), - new Tuple("Datadog", "Hosts", "2020-02-01-preview"), - new Tuple("Datadog", "LinkedResources", "2020-02-01-preview"), - new Tuple("Datadog", "MonitoredResources", "2020-02-01-preview"), - new Tuple("Datadog", "Monitors", "2020-02-01-preview"), - new Tuple("Datadog", "Operations", "2020-02-01-preview"), - new Tuple("Datadog", "RefreshSetPassword", "2020-02-01-preview"), - new Tuple("Datadog", "SingleSignOnConfigurations", "2020-02-01-preview"), - new Tuple("Datadog", "TagRules", "2020-02-01-preview"), + new Tuple("Datadog", "MarketplaceAgreements", "2021-03-01"), + new Tuple("Datadog", "Monitors", "2021-03-01"), + new Tuple("Datadog", "Operations", "2021-03-01"), + new Tuple("Datadog", "SingleSignOnConfigurations", "2021-03-01"), + new Tuple("Datadog", "TagRules", "2021-03-01"), }.AsEnumerable(); } } @@ -37,7 +33,7 @@ public static IEnumerable> ApiInfo_MicrosoftDatado public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/datadog/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=C:\\work\\azure-sdk-for-net\\sdk"; public static readonly String GithubForkName = "Azure"; public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "183db615e7e870d12668972c874897f095fe256c"; + public static readonly String GithubCommidId = "83a54687d2b523b537ad86b0c78b56c84687eee8"; public static readonly String CodeGenerationErrors = ""; public static readonly String GithubRepoName = "azure-rest-api-specs"; // END: Code Generation Metadata Section diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/SingleSignOnConfigurationsOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/SingleSignOnConfigurationsOperations.cs index b3d98f639e9b..79f2674192fe 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/SingleSignOnConfigurationsOperations.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/SingleSignOnConfigurationsOperations.cs @@ -54,7 +54,7 @@ internal SingleSignOnConfigurationsOperations(MicrosoftDatadogClient client) /// List the single sign-on configurations for a given monitor resource. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name @@ -65,7 +65,7 @@ internal SingleSignOnConfigurationsOperations(MicrosoftDatadogClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -86,10 +86,32 @@ internal SingleSignOnConfigurationsOperations(MicrosoftDatadogClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } if (monitorName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "monitorName"); @@ -188,11 +210,11 @@ internal SingleSignOnConfigurationsOperations(MicrosoftDatadogClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -252,12 +274,13 @@ internal SingleSignOnConfigurationsOperations(MicrosoftDatadogClient client) /// Configures single-sign-on for this resource. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name /// /// + /// Configuration name /// /// /// @@ -278,12 +301,13 @@ internal SingleSignOnConfigurationsOperations(MicrosoftDatadogClient client) /// Gets the datadog single sign-on resource for the given Monitor. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name /// /// + /// Configuration name /// /// /// Headers that will be added to request. @@ -291,7 +315,7 @@ internal SingleSignOnConfigurationsOperations(MicrosoftDatadogClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -312,10 +336,32 @@ internal SingleSignOnConfigurationsOperations(MicrosoftDatadogClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } if (monitorName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "monitorName"); @@ -420,11 +466,11 @@ internal SingleSignOnConfigurationsOperations(MicrosoftDatadogClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -484,12 +530,13 @@ internal SingleSignOnConfigurationsOperations(MicrosoftDatadogClient client) /// Configures single-sign-on for this resource. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name /// /// + /// Configuration name /// /// /// @@ -499,7 +546,7 @@ internal SingleSignOnConfigurationsOperations(MicrosoftDatadogClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -520,10 +567,32 @@ internal SingleSignOnConfigurationsOperations(MicrosoftDatadogClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } if (monitorName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "monitorName"); @@ -641,11 +710,11 @@ internal SingleSignOnConfigurationsOperations(MicrosoftDatadogClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -731,7 +800,7 @@ internal SingleSignOnConfigurationsOperations(MicrosoftDatadogClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -827,11 +896,11 @@ internal SingleSignOnConfigurationsOperations(MicrosoftDatadogClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/SingleSignOnConfigurationsOperationsExtensions.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/SingleSignOnConfigurationsOperationsExtensions.cs index b68a85fbf3a0..ff38657aecd5 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/SingleSignOnConfigurationsOperationsExtensions.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/SingleSignOnConfigurationsOperationsExtensions.cs @@ -28,7 +28,7 @@ public static partial class SingleSignOnConfigurationsOperationsExtensions /// The operations group for this extension method. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name @@ -45,7 +45,7 @@ public static IPage List(this ISingleSignOnConfigur /// The operations group for this extension method. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name @@ -68,12 +68,13 @@ public static IPage List(this ISingleSignOnConfigur /// The operations group for this extension method. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name /// /// + /// Configuration name /// /// /// @@ -89,12 +90,13 @@ public static IPage List(this ISingleSignOnConfigur /// The operations group for this extension method. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name /// /// + /// Configuration name /// /// /// @@ -116,12 +118,13 @@ public static IPage List(this ISingleSignOnConfigur /// The operations group for this extension method. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name /// /// + /// Configuration name /// public static DatadogSingleSignOnResource Get(this ISingleSignOnConfigurationsOperations operations, string resourceGroupName, string monitorName, string configurationName) { @@ -135,12 +138,13 @@ public static DatadogSingleSignOnResource Get(this ISingleSignOnConfigurationsOp /// The operations group for this extension method. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name /// /// + /// Configuration name /// /// /// The cancellation token. @@ -160,12 +164,13 @@ public static DatadogSingleSignOnResource Get(this ISingleSignOnConfigurationsOp /// The operations group for this extension method. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name /// /// + /// Configuration name /// /// /// @@ -181,12 +186,13 @@ public static DatadogSingleSignOnResource Get(this ISingleSignOnConfigurationsOp /// The operations group for this extension method. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name /// /// + /// Configuration name /// /// /// diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/TagRulesOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/TagRulesOperations.cs index 46f53070713f..fa6e90df3678 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/TagRulesOperations.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/TagRulesOperations.cs @@ -54,7 +54,7 @@ internal TagRulesOperations(MicrosoftDatadogClient client) /// List the tag rules for a given monitor resource. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name @@ -65,7 +65,7 @@ internal TagRulesOperations(MicrosoftDatadogClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -86,10 +86,32 @@ internal TagRulesOperations(MicrosoftDatadogClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } if (monitorName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "monitorName"); @@ -188,11 +210,11 @@ internal TagRulesOperations(MicrosoftDatadogClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -252,12 +274,13 @@ internal TagRulesOperations(MicrosoftDatadogClient client) /// Create or update a tag rule set for a given monitor resource. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name /// /// + /// Rule set name /// /// /// @@ -267,7 +290,7 @@ internal TagRulesOperations(MicrosoftDatadogClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -288,10 +311,32 @@ internal TagRulesOperations(MicrosoftDatadogClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } if (monitorName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "monitorName"); @@ -409,11 +454,11 @@ internal TagRulesOperations(MicrosoftDatadogClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -473,12 +518,13 @@ internal TagRulesOperations(MicrosoftDatadogClient client) /// Get a tag rule set for a given monitor resource. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name /// /// + /// Rule set name /// /// /// Headers that will be added to request. @@ -486,7 +532,7 @@ internal TagRulesOperations(MicrosoftDatadogClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -507,10 +553,32 @@ internal TagRulesOperations(MicrosoftDatadogClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } if (monitorName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "monitorName"); @@ -615,11 +683,11 @@ internal TagRulesOperations(MicrosoftDatadogClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -687,7 +755,7 @@ internal TagRulesOperations(MicrosoftDatadogClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -783,11 +851,11 @@ internal TagRulesOperations(MicrosoftDatadogClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/TagRulesOperationsExtensions.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/TagRulesOperationsExtensions.cs index 28aa217815be..db8d07baeecb 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/TagRulesOperationsExtensions.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/TagRulesOperationsExtensions.cs @@ -28,7 +28,7 @@ public static partial class TagRulesOperationsExtensions /// The operations group for this extension method. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name @@ -45,7 +45,7 @@ public static IPage List(this ITagRulesOperations operations /// The operations group for this extension method. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name @@ -68,12 +68,13 @@ public static IPage List(this ITagRulesOperations operations /// The operations group for this extension method. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name /// /// + /// Rule set name /// /// /// @@ -89,12 +90,13 @@ public static IPage List(this ITagRulesOperations operations /// The operations group for this extension method. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name /// /// + /// Rule set name /// /// /// @@ -116,12 +118,13 @@ public static IPage List(this ITagRulesOperations operations /// The operations group for this extension method. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name /// /// + /// Rule set name /// public static MonitoringTagRules Get(this ITagRulesOperations operations, string resourceGroupName, string monitorName, string ruleSetName) { @@ -135,12 +138,13 @@ public static MonitoringTagRules Get(this ITagRulesOperations operations, string /// The operations group for this extension method. /// /// - /// The name of the resource group to which the Datadog resource belongs. + /// The name of the resource group. The name is case insensitive. /// /// /// Monitor resource name /// /// + /// Rule set name /// /// /// The cancellation token. diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Microsoft.Azure.Management.Datadog.csproj b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Microsoft.Azure.Management.Datadog.csproj index b28c1b2d871c..d4b729ed0fa2 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Microsoft.Azure.Management.Datadog.csproj +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Microsoft.Azure.Management.Datadog.csproj @@ -6,7 +6,7 @@ Microsoft.Azure.Management.Datadog Microsoft Azure Management Datadog library - 0.1.0 + 1.0.0 Microsoft.Azure.Management.Datadog management;datadog; diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Properties/AssemblyInfo.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Properties/AssemblyInfo.cs index 3c5efa9f9be4..da971438b96d 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Properties/AssemblyInfo.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ [assembly: AssemblyTitle("Microsoft Azure Datadog Management Library")] [assembly: AssemblyDescription("Provides Microsoft Azure Datadog management functions for managing the Microsoft Azure Datadog service.")] -[assembly: AssemblyVersion("0.1.0")] -[assembly: AssemblyFileVersion("0.1.0")] +[assembly: AssemblyVersion("1.0.0")] +[assembly: AssemblyFileVersion("1.0.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft")] diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/tests/SessionRecords/DatadogTests/TestResourceLifeCycle.json b/sdk/datadog/Microsoft.Azure.Management.Datadog/tests/SessionRecords/DatadogTests/TestResourceLifeCycle.json index 8d1a098156c3..e32fb93c7a42 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/tests/SessionRecords/DatadogTests/TestResourceLifeCycle.json +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/tests/SessionRecords/DatadogTests/TestResourceLifeCycle.json @@ -1,19 +1,19 @@ { "Entries": [ { - "RequestUri": "/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/resourcegroups/datadog-sdk-test-rg1630?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMzg5MTZkZDEtZGJkYy00ZTc5LTgyNjItY2M1NzI3YThlOTZiL3Jlc291cmNlZ3JvdXBzL2RhdGFkb2ctc2RrLXRlc3QtcmcxNjMwP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestUri": "/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourcegroups/datadog-sdk-test-rg5570?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTBiMTlhM2ItOGYxYS00ZjcyLTgyN2ItOWUxNGJiYTMwNjFlL3Jlc291cmNlZ3JvdXBzL2RhdGFkb2ctc2RrLXRlc3Qtcmc1NTcwP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", "RequestMethod": "PUT", "RequestBody": "{\r\n \"location\": \"westus2\"\r\n}", "RequestHeaders": { "x-ms-client-request-id": [ - "dd127b46-e0c6-45c7-b981-b9906f73f752" + "f2ac590c-23e9-4994-b075-9f8895186e9a" ], - "accept-language": [ + "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.26614.01", + "FxVersion/4.6.29812.02", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.19042.", "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" @@ -29,9 +29,6 @@ "Cache-Control": [ "no-cache" ], - "Date": [ - "Mon, 12 Oct 2020 19:30:57 GMT" - ], "Pragma": [ "no-cache" ], @@ -39,13 +36,13 @@ "1199" ], "x-ms-request-id": [ - "f881d9ad-9e11-44ee-9486-ffbf6930961d" + "4951b40d-658c-4e40-ab67-791928ae1cc2" ], "x-ms-correlation-request-id": [ - "f881d9ad-9e11-44ee-9486-ffbf6930961d" + "4951b40d-658c-4e40-ab67-791928ae1cc2" ], "x-ms-routing-request-id": [ - "WESTUS:20201012T193058Z:f881d9ad-9e11-44ee-9486-ffbf6930961d" + "WESTUS:20210330T011525Z:4951b40d-658c-4e40-ab67-791928ae1cc2" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -53,6 +50,9 @@ "X-Content-Type-Options": [ "nosniff" ], + "Date": [ + "Tue, 30 Mar 2021 01:15:25 GMT" + ], "Content-Length": [ "200" ], @@ -63,124 +63,55 @@ "-1" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/resourceGroups/datadog-sdk-test-rg1630\",\r\n \"name\": \"datadog-sdk-test-rg1630\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/datadog-sdk-test-rg5570\",\r\n \"name\": \"datadog-sdk-test-rg5570\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", "StatusCode": 201 }, { - "RequestUri": "/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/resourceGroups/datadog-sdk-test-rg1630/providers/Microsoft.Datadog/monitors/datadog-sdk-test-resource8350?api-version=2020-02-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMzg5MTZkZDEtZGJkYy00ZTc5LTgyNjItY2M1NzI3YThlOTZiL3Jlc291cmNlR3JvdXBzL2RhdGFkb2ctc2RrLXRlc3QtcmcxNjMwL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGF0YWRvZy9tb25pdG9ycy9kYXRhZG9nLXNkay10ZXN0LXJlc291cmNlODM1MD9hcGktdmVyc2lvbj0yMDIwLTAyLTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/datadog-sdk-test-rg5570/providers/Microsoft.Datadog/monitors/datadog-sdk-test-resource5737?api-version=2021-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTBiMTlhM2ItOGYxYS00ZjcyLTgyN2ItOWUxNGJiYTMwNjFlL3Jlc291cmNlR3JvdXBzL2RhdGFkb2ctc2RrLXRlc3Qtcmc1NTcwL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGF0YWRvZy9tb25pdG9ycy9kYXRhZG9nLXNkay10ZXN0LXJlc291cmNlNTczNz9hcGktdmVyc2lvbj0yMDIxLTAzLTAx", "RequestMethod": "PUT", "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"drawdown_testing_20200904_Monthly\"\r\n },\r\n \"properties\": {\r\n \"userInfo\": {\r\n \"name\": \"Mama Baba\",\r\n \"emailAddress\": \"liftrdevredmond@microsoft.com\",\r\n \"phoneNumber\": \"+1 (425) 5381111\"\r\n }\r\n },\r\n \"identity\": {\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"location\": \"westus2\"\r\n}", "RequestHeaders": { "x-ms-client-request-id": [ - "b227cba2-336e-4120-b7b7-dd379a1cea84" + "928f0e62-8ad0-411a-ae0c-10fa5d8abc16" ], - "accept-language": [ + "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.26614.01", + "FxVersion/4.6.29812.02", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Datadog.MicrosoftDatadogClient/0.1.0" + "Microsoft.Azure.Management.Datadog.MicrosoftDatadogClient/1.0.0" ], "Content-Type": [ "application/json; charset=utf-8" ], "Content-Length": [ - "325" + "319" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], - "Date": [ - "Mon, 12 Oct 2020 19:31:02 GMT" - ], "Pragma": [ "no-cache" ], "ETag": [ - "\"1b000acf-0000-0800-0000-5f84aef60000\"" + "\"02009c20-0000-0800-0000-60627bb10000\"" ], - "Server": [ - "Kestrel" + "Location": [ + "https://management.azure.com/providers/Microsoft.Datadog/locations/WESTUS2/operationStatuses/514b4bb4-0024-4f8a-8b61-f10cdf6c4c7d?api-version=2021-03-01" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "Azure-AsyncOperation": [ - "https://management.azure.com/providers/Microsoft.Datadog/locations/WESTUS2/operationStatuses/c1c0202e-cc8c-4103-9303-c28b02fd88c2?api-version=2020-02-01-preview" - ], - "x-ms-request-id": [ - "c1c0202e-cc8c-4103-9303-c28b02fd88c2" - ], - "x-ms-correlation-request-id": [ - "1007ee64-8047-4988-8595-d39234ab2258" - ], - "x-ms-routing-request-id": [ - "WESTUS:20201012T193102Z:1007ee64-8047-4988-8595-d39234ab2258" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "803" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/resourceGroups/datadog-sdk-test-rg1630/providers/Microsoft.Datadog/monitors/datadog-sdk-test-resource8350\",\r\n \"name\": \"datadog-sdk-test-resource8350\",\r\n \"type\": \"Microsoft.Datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"drawdown_testing_20200904_Monthly\"\r\n },\r\n \"location\": \"westus2\",\r\n \"identity\": {\r\n \"principalId\": \"09875460-2a9c-4043-b6a7-f26a36c402f9\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Accepted\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"datadog-sdk-test-resource8350\",\r\n \"id\": null,\r\n \"linkingAuthCode\": null,\r\n \"linkingClientId\": null,\r\n \"enterpriseAppId\": null\r\n },\r\n \"userInfo\": null,\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/providers/Microsoft.Datadog/locations/WESTUS2/operationStatuses/c1c0202e-cc8c-4103-9303-c28b02fd88c2?api-version=2020-02-01-preview", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGF0YWRvZy9sb2NhdGlvbnMvV0VTVFVTMi9vcGVyYXRpb25TdGF0dXNlcy9jMWMwMjAyZS1jYzhjLTQxMDMtOTMwMy1jMjhiMDJmZDg4YzI/YXBpLXZlcnNpb249MjAyMC0wMi0wMS1wcmV2aWV3", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Datadog.MicrosoftDatadogClient/0.1.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Mon, 12 Oct 2020 19:31:32 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"00005832-0000-0800-0000-5f84aef50000\"" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-reads": [ - "11999" + "x-ms-providerhub-traffic": [ + "True" ], - "x-ms-request-id": [ - "e8950c26-585d-499f-970c-8ca8775ea3a1" - ], - "x-ms-correlation-request-id": [ - "14b57dcb-c2fa-45df-81b6-d0c9d8aecca6" - ], - "x-ms-routing-request-id": [ - "WESTUS:20201012T193132Z:14b57dcb-c2fa-45df-81b6-d0c9d8aecca6" + "Request-Context": [ + "appId=cid-v1:0b211baa-00db-496b-b625-0e3961b2c5bd" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -188,128 +119,23 @@ "X-Content-Type-Options": [ "nosniff" ], - "Content-Length": [ - "392" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/providers/Microsoft.Datadog/locations/WESTUS2/operationStatuses/c1c0202e-cc8c-4103-9303-c28b02fd88c2\",\r\n \"name\": \"c1c0202e-cc8c-4103-9303-c28b02fd88c2\",\r\n \"resourceId\": \"/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/resourceGroups/datadog-sdk-test-rg1630/providers/Microsoft.Datadog/monitors/datadog-sdk-test-resource8350\",\r\n \"status\": \"Accepted\",\r\n \"startTime\": \"2020-10-12T19:31:01.2831719Z\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Datadog/locations/WESTUS2/operationStatuses/c1c0202e-cc8c-4103-9303-c28b02fd88c2?api-version=2020-02-01-preview", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGF0YWRvZy9sb2NhdGlvbnMvV0VTVFVTMi9vcGVyYXRpb25TdGF0dXNlcy9jMWMwMjAyZS1jYzhjLTQxMDMtOTMwMy1jMjhiMDJmZDg4YzI/YXBpLXZlcnNpb249MjAyMC0wMi0wMS1wcmV2aWV3", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Datadog.MicrosoftDatadogClient/0.1.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Mon, 12 Oct 2020 19:32:02 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"00005832-0000-0800-0000-5f84aef50000\"" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-reads": [ - "11998" + "Azure-AsyncOperation": [ + "https://management.azure.com/providers/Microsoft.Datadog/locations/WESTUS2/operationStatuses/514b4bb4-0024-4f8a-8b61-f10cdf6c4c7d?api-version=2021-03-01" ], "x-ms-request-id": [ - "e53d581e-95e4-4670-987c-fdfb5723bf2f" + "514b4bb4-0024-4f8a-8b61-f10cdf6c4c7d" ], "x-ms-correlation-request-id": [ - "5083d008-98a5-4b63-a710-8d087859469b" + "e108aff6-58fd-4612-973d-11b4594c8590" ], "x-ms-routing-request-id": [ - "WESTUS:20201012T193202Z:5083d008-98a5-4b63-a710-8d087859469b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "392" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/providers/Microsoft.Datadog/locations/WESTUS2/operationStatuses/c1c0202e-cc8c-4103-9303-c28b02fd88c2\",\r\n \"name\": \"c1c0202e-cc8c-4103-9303-c28b02fd88c2\",\r\n \"resourceId\": \"/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/resourceGroups/datadog-sdk-test-rg1630/providers/Microsoft.Datadog/monitors/datadog-sdk-test-resource8350\",\r\n \"status\": \"Accepted\",\r\n \"startTime\": \"2020-10-12T19:31:01.2831719Z\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Datadog/locations/WESTUS2/operationStatuses/c1c0202e-cc8c-4103-9303-c28b02fd88c2?api-version=2020-02-01-preview", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGF0YWRvZy9sb2NhdGlvbnMvV0VTVFVTMi9vcGVyYXRpb25TdGF0dXNlcy9jMWMwMjAyZS1jYzhjLTQxMDMtOTMwMy1jMjhiMDJmZDg4YzI/YXBpLXZlcnNpb249MjAyMC0wMi0wMS1wcmV2aWV3", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Datadog.MicrosoftDatadogClient/0.1.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" + "WESTUS:20210330T011529Z:e108aff6-58fd-4612-973d-11b4594c8590" ], "Date": [ - "Mon, 12 Oct 2020 19:32:31 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"00005832-0000-0800-0000-5f84aef50000\"" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-reads": [ - "11997" - ], - "x-ms-request-id": [ - "72c3a3df-9764-4860-b4c6-081244ff2157" - ], - "x-ms-correlation-request-id": [ - "69e3a09e-c05b-4e48-809d-fb43bdfc80a2" - ], - "x-ms-routing-request-id": [ - "WESTUS:20201012T193232Z:69e3a09e-c05b-4e48-809d-fb43bdfc80a2" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" + "Tue, 30 Mar 2021 01:15:29 GMT" ], "Content-Length": [ - "392" + "1142" ], "Content-Type": [ "application/json; charset=utf-8" @@ -318,49 +144,43 @@ "-1" ] }, - "ResponseBody": "{\r\n \"id\": \"/providers/Microsoft.Datadog/locations/WESTUS2/operationStatuses/c1c0202e-cc8c-4103-9303-c28b02fd88c2\",\r\n \"name\": \"c1c0202e-cc8c-4103-9303-c28b02fd88c2\",\r\n \"resourceId\": \"/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/resourceGroups/datadog-sdk-test-rg1630/providers/Microsoft.Datadog/monitors/datadog-sdk-test-resource8350\",\r\n \"status\": \"Accepted\",\r\n \"startTime\": \"2020-10-12T19:31:01.2831719Z\"\r\n}", - "StatusCode": 200 + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/datadog-sdk-test-rg5570/providers/Microsoft.Datadog/monitors/datadog-sdk-test-resource5737\",\r\n \"name\": \"datadog-sdk-test-resource5737\",\r\n \"type\": \"microsoft.datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"drawdown_testing_20200904_Monthly\"\r\n },\r\n \"location\": \"westus2\",\r\n \"systemData\": {\r\n \"createdBy\": \"c63727f5-3780-4166-8bcb-b6464707abd9\",\r\n \"createdByType\": \"Application\",\r\n \"createdAt\": \"2021-03-30T01:15:27.1005762Z\",\r\n \"lastModifiedBy\": \"c63727f5-3780-4166-8bcb-b6464707abd9\",\r\n \"lastModifiedByType\": \"Application\",\r\n \"lastModifiedAt\": \"2021-03-30T01:15:27.1005762Z\"\r\n },\r\n \"identity\": {\r\n \"principalId\": \"391b4663-bd18-4c5f-aa0b-dc504b00af19\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Accepted\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Provisioning\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"datadog-sdk-test-resource5737\",\r\n \"id\": null,\r\n \"linkingAuthCode\": null,\r\n \"linkingClientId\": null,\r\n \"redirectUri\": null,\r\n \"apiKey\": null,\r\n \"applicationKey\": null,\r\n \"enterpriseAppId\": null\r\n },\r\n \"userInfo\": null,\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n}", + "StatusCode": 201 }, { - "RequestUri": "/providers/Microsoft.Datadog/locations/WESTUS2/operationStatuses/c1c0202e-cc8c-4103-9303-c28b02fd88c2?api-version=2020-02-01-preview", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGF0YWRvZy9sb2NhdGlvbnMvV0VTVFVTMi9vcGVyYXRpb25TdGF0dXNlcy9jMWMwMjAyZS1jYzhjLTQxMDMtOTMwMy1jMjhiMDJmZDg4YzI/YXBpLXZlcnNpb249MjAyMC0wMi0wMS1wcmV2aWV3", + "RequestUri": "/providers/Microsoft.Datadog/locations/WESTUS2/operationStatuses/514b4bb4-0024-4f8a-8b61-f10cdf6c4c7d?api-version=2021-03-01", + "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGF0YWRvZy9sb2NhdGlvbnMvV0VTVFVTMi9vcGVyYXRpb25TdGF0dXNlcy81MTRiNGJiNC0wMDI0LTRmOGEtOGI2MS1mMTBjZGY2YzRjN2Q/YXBpLXZlcnNpb249MjAyMS0wMy0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.26614.01", + "FxVersion/4.6.29812.02", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Datadog.MicrosoftDatadogClient/0.1.0" + "Microsoft.Azure.Management.Datadog.MicrosoftDatadogClient/1.0.0" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], - "Date": [ - "Mon, 12 Oct 2020 19:33:01 GMT" - ], "Pragma": [ "no-cache" ], "ETag": [ - "\"00005832-0000-0800-0000-5f84aef50000\"" - ], - "Server": [ - "Kestrel" + "\"07000455-0000-0800-0000-60627bbe0000\"" ], "x-ms-ratelimit-remaining-tenant-reads": [ - "11996" + "11999" ], "x-ms-request-id": [ - "afa94d2b-49f6-41fb-8668-9f797f9d6c59" + "13eb45dd-c3d9-46ec-8ab8-dea45be84db6" ], "x-ms-correlation-request-id": [ - "4822d18e-e360-4e74-b1e1-21aee79eb339" + "a2cda8cf-35c6-4367-8fd6-95aad95c40c0" ], "x-ms-routing-request-id": [ - "WESTUS:20201012T193302Z:4822d18e-e360-4e74-b1e1-21aee79eb339" + "WESTUS:20210330T011559Z:a2cda8cf-35c6-4367-8fd6-95aad95c40c0" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -368,68 +188,11 @@ "X-Content-Type-Options": [ "nosniff" ], - "Content-Length": [ - "392" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/providers/Microsoft.Datadog/locations/WESTUS2/operationStatuses/c1c0202e-cc8c-4103-9303-c28b02fd88c2\",\r\n \"name\": \"c1c0202e-cc8c-4103-9303-c28b02fd88c2\",\r\n \"resourceId\": \"/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/resourceGroups/datadog-sdk-test-rg1630/providers/Microsoft.Datadog/monitors/datadog-sdk-test-resource8350\",\r\n \"status\": \"Accepted\",\r\n \"startTime\": \"2020-10-12T19:31:01.2831719Z\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Datadog/locations/WESTUS2/operationStatuses/c1c0202e-cc8c-4103-9303-c28b02fd88c2?api-version=2020-02-01-preview", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGF0YWRvZy9sb2NhdGlvbnMvV0VTVFVTMi9vcGVyYXRpb25TdGF0dXNlcy9jMWMwMjAyZS1jYzhjLTQxMDMtOTMwMy1jMjhiMDJmZDg4YzI/YXBpLXZlcnNpb249MjAyMC0wMi0wMS1wcmV2aWV3", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Datadog.MicrosoftDatadogClient/0.1.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], "Date": [ - "Mon, 12 Oct 2020 19:33:32 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"00005832-0000-0800-0000-5f84aef50000\"" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-reads": [ - "11995" - ], - "x-ms-request-id": [ - "a0da0c4d-2d18-4dd8-af3e-1d5a6f649144" - ], - "x-ms-correlation-request-id": [ - "0fb70e98-1fd5-411e-bb65-c2174601c4e6" - ], - "x-ms-routing-request-id": [ - "WESTUS:20201012T193332Z:0fb70e98-1fd5-411e-bb65-c2174601c4e6" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" + "Tue, 30 Mar 2021 01:15:59 GMT" ], "Content-Length": [ - "392" + "463" ], "Content-Type": [ "application/json; charset=utf-8" @@ -438,49 +201,46 @@ "-1" ] }, - "ResponseBody": "{\r\n \"id\": \"/providers/Microsoft.Datadog/locations/WESTUS2/operationStatuses/c1c0202e-cc8c-4103-9303-c28b02fd88c2\",\r\n \"name\": \"c1c0202e-cc8c-4103-9303-c28b02fd88c2\",\r\n \"resourceId\": \"/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/resourceGroups/datadog-sdk-test-rg1630/providers/Microsoft.Datadog/monitors/datadog-sdk-test-resource8350\",\r\n \"status\": \"Accepted\",\r\n \"startTime\": \"2020-10-12T19:31:01.2831719Z\"\r\n}", + "ResponseBody": "{\r\n \"id\": \"/providers/Microsoft.Datadog/locations/WESTUS2/operationStatuses/514b4bb4-0024-4f8a-8b61-f10cdf6c4c7d\",\r\n \"name\": \"514b4bb4-0024-4f8a-8b61-f10cdf6c4c7d\",\r\n \"resourceId\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/datadog-sdk-test-rg5570/providers/Microsoft.Datadog/monitors/datadog-sdk-test-resource5737\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2021-03-30T01:15:28.8507923Z\",\r\n \"endTime\": \"2021-03-30T01:15:42.4547162Z\",\r\n \"error\": {},\r\n \"properties\": null\r\n}", "StatusCode": 200 }, { - "RequestUri": "/providers/Microsoft.Datadog/locations/WESTUS2/operationStatuses/c1c0202e-cc8c-4103-9303-c28b02fd88c2?api-version=2020-02-01-preview", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGF0YWRvZy9sb2NhdGlvbnMvV0VTVFVTMi9vcGVyYXRpb25TdGF0dXNlcy9jMWMwMjAyZS1jYzhjLTQxMDMtOTMwMy1jMjhiMDJmZDg4YzI/YXBpLXZlcnNpb249MjAyMC0wMi0wMS1wcmV2aWV3", + "RequestUri": "/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/datadog-sdk-test-rg5570/providers/Microsoft.Datadog/monitors/datadog-sdk-test-resource5737?api-version=2021-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTBiMTlhM2ItOGYxYS00ZjcyLTgyN2ItOWUxNGJiYTMwNjFlL3Jlc291cmNlR3JvdXBzL2RhdGFkb2ctc2RrLXRlc3Qtcmc1NTcwL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGF0YWRvZy9tb25pdG9ycy9kYXRhZG9nLXNkay10ZXN0LXJlc291cmNlNTczNz9hcGktdmVyc2lvbj0yMDIxLTAzLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.26614.01", + "FxVersion/4.6.29812.02", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Datadog.MicrosoftDatadogClient/0.1.0" + "Microsoft.Azure.Management.Datadog.MicrosoftDatadogClient/1.0.0" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], - "Date": [ - "Mon, 12 Oct 2020 19:34:02 GMT" - ], "Pragma": [ "no-cache" ], "ETag": [ - "\"0000ce32-0000-0800-0000-5f84af990000\"" + "\"0200a020-0000-0800-0000-60627bbe0000\"" ], - "Server": [ - "Kestrel" + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" ], - "x-ms-ratelimit-remaining-tenant-reads": [ - "11994" + "x-ms-providerhub-traffic": [ + "True" ], "x-ms-request-id": [ - "7290112b-e3bd-4490-a934-a4745e940bef" + "797f670c-6477-497f-a0a8-cc32c58bea1f" ], "x-ms-correlation-request-id": [ - "34116b62-5056-46ca-9387-8eaece12fa6e" + "484a382b-1be4-4fc6-a495-30abda29f317" ], "x-ms-routing-request-id": [ - "WESTUS:20201012T193402Z:34116b62-5056-46ca-9387-8eaece12fa6e" + "WESTUS:20210330T011600Z:484a382b-1be4-4fc6-a495-30abda29f317" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -488,68 +248,11 @@ "X-Content-Type-Options": [ "nosniff" ], - "Content-Length": [ - "422" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/providers/Microsoft.Datadog/locations/WESTUS2/operationStatuses/c1c0202e-cc8c-4103-9303-c28b02fd88c2\",\r\n \"name\": \"c1c0202e-cc8c-4103-9303-c28b02fd88c2\",\r\n \"resourceId\": \"/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/resourceGroups/datadog-sdk-test-rg1630/providers/Microsoft.Datadog/monitors/datadog-sdk-test-resource8350\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2020-10-12T19:31:01.2831719Z\",\r\n \"error\": {},\r\n \"properties\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/resourceGroups/datadog-sdk-test-rg1630/providers/Microsoft.Datadog/monitors/datadog-sdk-test-resource8350?api-version=2020-02-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMzg5MTZkZDEtZGJkYy00ZTc5LTgyNjItY2M1NzI3YThlOTZiL3Jlc291cmNlR3JvdXBzL2RhdGFkb2ctc2RrLXRlc3QtcmcxNjMwL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGF0YWRvZy9tb25pdG9ycy9kYXRhZG9nLXNkay10ZXN0LXJlc291cmNlODM1MD9hcGktdmVyc2lvbj0yMDIwLTAyLTAxLXByZXZpZXc=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Datadog.MicrosoftDatadogClient/0.1.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], "Date": [ - "Mon, 12 Oct 2020 19:34:02 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1b00a0d5-0000-0800-0000-5f84af990000\"" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "c78a4d5c-79a9-4009-879d-bcffb381db0c" - ], - "x-ms-correlation-request-id": [ - "0468c9fc-d307-4005-8eab-d5475d132a33" - ], - "x-ms-routing-request-id": [ - "WESTUS:20201012T193403Z:0468c9fc-d307-4005-8eab-d5475d132a33" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" + "Tue, 30 Mar 2021 01:15:59 GMT" ], "Content-Length": [ - "818" + "1135" ], "Content-Type": [ "application/json; charset=utf-8" @@ -558,58 +261,49 @@ "-1" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/resourceGroups/datadog-sdk-test-rg1630/providers/Microsoft.Datadog/monitors/datadog-sdk-test-resource8350\",\r\n \"name\": \"datadog-sdk-test-resource8350\",\r\n \"type\": \"Microsoft.Datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"drawdown_testing_20200904_Monthly\"\r\n },\r\n \"location\": \"westus2\",\r\n \"identity\": {\r\n \"principalId\": \"09875460-2a9c-4043-b6a7-f26a36c402f9\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"datadog-sdk-test-resource8350\",\r\n \"id\": \"nyzb6bc67wtnmvjx\",\r\n \"linkingAuthCode\": null,\r\n \"linkingClientId\": null,\r\n \"enterpriseAppId\": null\r\n },\r\n \"userInfo\": null,\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/datadog-sdk-test-rg5570/providers/Microsoft.Datadog/monitors/datadog-sdk-test-resource5737\",\r\n \"name\": \"datadog-sdk-test-resource5737\",\r\n \"type\": \"microsoft.datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"drawdown_testing_20200904_Monthly\"\r\n },\r\n \"location\": \"westus2\",\r\n \"systemData\": {\r\n \"createdBy\": \"c63727f5-3780-4166-8bcb-b6464707abd9\",\r\n \"createdByType\": \"Application\",\r\n \"createdAt\": \"2021-03-30T01:15:27.1005762Z\",\r\n \"lastModifiedBy\": \"ae11f5fb-c627-4eec-b4a0-f7b5969426e5\",\r\n \"lastModifiedByType\": \"Application\",\r\n \"lastModifiedAt\": \"2021-03-30T01:15:42.2508254Z\"\r\n },\r\n \"identity\": {\r\n \"principalId\": \"391b4663-bd18-4c5f-aa0b-dc504b00af19\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"datadog-sdk-test-resource5737\",\r\n \"id\": \"9wfzht5ahs7kxwhz\",\r\n \"linkingAuthCode\": null,\r\n \"linkingClientId\": null,\r\n \"redirectUri\": null,\r\n \"apiKey\": null,\r\n \"applicationKey\": null,\r\n \"enterpriseAppId\": null\r\n },\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/resourceGroups/datadog-sdk-test-rg1630/providers/Microsoft.Datadog/monitors/datadog-sdk-test-resource8350?api-version=2020-02-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMzg5MTZkZDEtZGJkYy00ZTc5LTgyNjItY2M1NzI3YThlOTZiL3Jlc291cmNlR3JvdXBzL2RhdGFkb2ctc2RrLXRlc3QtcmcxNjMwL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGF0YWRvZy9tb25pdG9ycy9kYXRhZG9nLXNkay10ZXN0LXJlc291cmNlODM1MD9hcGktdmVyc2lvbj0yMDIwLTAyLTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/datadog-sdk-test-rg5570/providers/Microsoft.Datadog/monitors/datadog-sdk-test-resource5737?api-version=2021-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTBiMTlhM2ItOGYxYS00ZjcyLTgyN2ItOWUxNGJiYTMwNjFlL3Jlc291cmNlR3JvdXBzL2RhdGFkb2ctc2RrLXRlc3Qtcmc1NTcwL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGF0YWRvZy9tb25pdG9ycy9kYXRhZG9nLXNkay10ZXN0LXJlc291cmNlNTczNz9hcGktdmVyc2lvbj0yMDIxLTAzLTAx", "RequestMethod": "DELETE", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "f75699ff-2dcc-48fc-a006-64a3e1eb2955" + "deaa4a29-72a3-40ca-a3bb-4f6ac541678c" ], - "accept-language": [ + "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.26614.01", + "FxVersion/4.6.29812.02", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Datadog.MicrosoftDatadogClient/0.1.0" + "Microsoft.Azure.Management.Datadog.MicrosoftDatadogClient/1.0.0" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], - "Date": [ - "Mon, 12 Oct 2020 19:34:03 GMT" - ], "Pragma": [ "no-cache" ], "ETag": [ - "\"1b0062d6-0000-0800-0000-5f84afac0000\"" + "\"0200a320-0000-0800-0000-60627bd10000\"" ], "Location": [ - "https://management.azure.com/providers/Microsoft.Datadog/locations/WESTUS2/operationStatuses/52819f24-c42b-4411-bc82-e518a4a994b1?api-version=2020-02-01-preview" - ], - "Server": [ - "Kestrel" + "https://management.azure.com/providers/Microsoft.Datadog/locations/WESTUS2/operationStatuses/61988563-240e-4ecc-9a9b-b5327278614a?api-version=2021-03-01" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], - "x-ms-request-id": [ - "52819f24-c42b-4411-bc82-e518a4a994b1" + "x-ms-providerhub-traffic": [ + "True" ], - "x-ms-correlation-request-id": [ - "dd7ed76f-ef3d-421e-9d77-7b88cef604fa" - ], - "x-ms-routing-request-id": [ - "WESTUS:20201012T193404Z:dd7ed76f-ef3d-421e-9d77-7b88cef604fa" + "Request-Context": [ + "appId=cid-v1:0b211baa-00db-496b-b625-0e3961b2c5bd" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -617,8 +311,20 @@ "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ + "61988563-240e-4ecc-9a9b-b5327278614a" + ], + "x-ms-correlation-request-id": [ + "c941f8f4-e3ae-4def-b4bb-f25dc3123d2e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20210330T011601Z:c941f8f4-e3ae-4def-b4bb-f25dc3123d2e" + ], + "Date": [ + "Tue, 30 Mar 2021 01:16:01 GMT" + ], "Content-Length": [ - "817" + "4" ], "Content-Type": [ "application/json; charset=utf-8" @@ -627,49 +333,43 @@ "-1" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/resourceGroups/datadog-sdk-test-rg1630/providers/Microsoft.Datadog/monitors/datadog-sdk-test-resource8350\",\r\n \"name\": \"datadog-sdk-test-resource8350\",\r\n \"type\": \"Microsoft.Datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"drawdown_testing_20200904_Monthly\"\r\n },\r\n \"location\": \"westus2\",\r\n \"identity\": {\r\n \"principalId\": \"09875460-2a9c-4043-b6a7-f26a36c402f9\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Deleting\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"datadog-sdk-test-resource8350\",\r\n \"id\": \"nyzb6bc67wtnmvjx\",\r\n \"linkingAuthCode\": null,\r\n \"linkingClientId\": null,\r\n \"enterpriseAppId\": null\r\n },\r\n \"userInfo\": null,\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n}", + "ResponseBody": "null", "StatusCode": 202 }, { - "RequestUri": "/providers/Microsoft.Datadog/locations/WESTUS2/operationStatuses/52819f24-c42b-4411-bc82-e518a4a994b1?api-version=2020-02-01-preview", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGF0YWRvZy9sb2NhdGlvbnMvV0VTVFVTMi9vcGVyYXRpb25TdGF0dXNlcy81MjgxOWYyNC1jNDJiLTQ0MTEtYmM4Mi1lNTE4YTRhOTk0YjE/YXBpLXZlcnNpb249MjAyMC0wMi0wMS1wcmV2aWV3", + "RequestUri": "/providers/Microsoft.Datadog/locations/WESTUS2/operationStatuses/61988563-240e-4ecc-9a9b-b5327278614a?api-version=2021-03-01", + "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGF0YWRvZy9sb2NhdGlvbnMvV0VTVFVTMi9vcGVyYXRpb25TdGF0dXNlcy82MTk4ODU2My0yNDBlLTRlY2MtOWE5Yi1iNTMyNzI3ODYxNGE/YXBpLXZlcnNpb249MjAyMS0wMy0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.26614.01", + "FxVersion/4.6.29812.02", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Datadog.MicrosoftDatadogClient/0.1.0" + "Microsoft.Azure.Management.Datadog.MicrosoftDatadogClient/1.0.0" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], - "Date": [ - "Mon, 12 Oct 2020 19:34:33 GMT" - ], "Pragma": [ "no-cache" ], "ETag": [ - "\"0000d332-0000-0800-0000-5f84afaf0000\"" - ], - "Server": [ - "Kestrel" + "\"07000755-0000-0800-0000-60627bd40000\"" ], "x-ms-ratelimit-remaining-tenant-reads": [ "11999" ], "x-ms-request-id": [ - "85fe7fef-5532-48df-8e99-0bec2a7ef1cb" + "2eafcc40-210c-493c-9e52-405857084bf0" ], "x-ms-correlation-request-id": [ - "62ea5233-9184-46a3-918e-fa5c6c2d15d9" + "8b4d93da-8107-4a51-89c5-28c1db61835f" ], "x-ms-routing-request-id": [ - "WESTUS:20201012T193434Z:62ea5233-9184-46a3-918e-fa5c6c2d15d9" + "WESTUS:20210330T011631Z:8b4d93da-8107-4a51-89c5-28c1db61835f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -677,8 +377,11 @@ "X-Content-Type-Options": [ "nosniff" ], + "Date": [ + "Tue, 30 Mar 2021 01:16:31 GMT" + ], "Content-Length": [ - "422" + "463" ], "Content-Type": [ "application/json; charset=utf-8" @@ -687,49 +390,43 @@ "-1" ] }, - "ResponseBody": "{\r\n \"id\": \"/providers/Microsoft.Datadog/locations/WESTUS2/operationStatuses/52819f24-c42b-4411-bc82-e518a4a994b1\",\r\n \"name\": \"52819f24-c42b-4411-bc82-e518a4a994b1\",\r\n \"resourceId\": \"/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/resourceGroups/datadog-sdk-test-rg1630/providers/Microsoft.Datadog/monitors/datadog-sdk-test-resource8350\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2020-10-12T19:34:03.6944091Z\",\r\n \"error\": {},\r\n \"properties\": null\r\n}", + "ResponseBody": "{\r\n \"id\": \"/providers/Microsoft.Datadog/locations/WESTUS2/operationStatuses/61988563-240e-4ecc-9a9b-b5327278614a\",\r\n \"name\": \"61988563-240e-4ecc-9a9b-b5327278614a\",\r\n \"resourceId\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/datadog-sdk-test-rg5570/providers/Microsoft.Datadog/monitors/datadog-sdk-test-resource5737\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2021-03-30T01:16:00.6880578Z\",\r\n \"endTime\": \"2021-03-30T01:16:04.7928694Z\",\r\n \"error\": {},\r\n \"properties\": null\r\n}", "StatusCode": 200 }, { - "RequestUri": "/providers/Microsoft.Datadog/locations/WESTUS2/operationStatuses/52819f24-c42b-4411-bc82-e518a4a994b1?api-version=2020-02-01-preview", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGF0YWRvZy9sb2NhdGlvbnMvV0VTVFVTMi9vcGVyYXRpb25TdGF0dXNlcy81MjgxOWYyNC1jNDJiLTQ0MTEtYmM4Mi1lNTE4YTRhOTk0YjE/YXBpLXZlcnNpb249MjAyMC0wMi0wMS1wcmV2aWV3", + "RequestUri": "/providers/Microsoft.Datadog/locations/WESTUS2/operationStatuses/61988563-240e-4ecc-9a9b-b5327278614a?api-version=2021-03-01", + "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGF0YWRvZy9sb2NhdGlvbnMvV0VTVFVTMi9vcGVyYXRpb25TdGF0dXNlcy82MTk4ODU2My0yNDBlLTRlY2MtOWE5Yi1iNTMyNzI3ODYxNGE/YXBpLXZlcnNpb249MjAyMS0wMy0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.26614.01", + "FxVersion/4.6.29812.02", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Datadog.MicrosoftDatadogClient/0.1.0" + "Microsoft.Azure.Management.Datadog.MicrosoftDatadogClient/1.0.0" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], - "Date": [ - "Mon, 12 Oct 2020 19:34:33 GMT" - ], "Pragma": [ "no-cache" ], "ETag": [ - "\"0000d332-0000-0800-0000-5f84afaf0000\"" - ], - "Server": [ - "Kestrel" + "\"07000755-0000-0800-0000-60627bd40000\"" ], "x-ms-ratelimit-remaining-tenant-reads": [ "11998" ], "x-ms-request-id": [ - "086be8b7-e8bb-4bde-9b4a-6268e85f852e" + "28661051-23d3-4e04-9dca-e623f26e521b" ], "x-ms-correlation-request-id": [ - "568d44f8-ecb7-48bf-a820-a87a80be31db" + "8080a008-2944-488d-9e17-96e05c4222c5" ], "x-ms-routing-request-id": [ - "WESTUS:20201012T193434Z:568d44f8-ecb7-48bf-a820-a87a80be31db" + "WESTUS:20210330T011631Z:8080a008-2944-488d-9e17-96e05c4222c5" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -737,8 +434,11 @@ "X-Content-Type-Options": [ "nosniff" ], + "Date": [ + "Tue, 30 Mar 2021 01:16:31 GMT" + ], "Content-Length": [ - "422" + "463" ], "Content-Type": [ "application/json; charset=utf-8" @@ -747,53 +447,50 @@ "-1" ] }, - "ResponseBody": "{\r\n \"id\": \"/providers/Microsoft.Datadog/locations/WESTUS2/operationStatuses/52819f24-c42b-4411-bc82-e518a4a994b1\",\r\n \"name\": \"52819f24-c42b-4411-bc82-e518a4a994b1\",\r\n \"resourceId\": \"/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/resourceGroups/datadog-sdk-test-rg1630/providers/Microsoft.Datadog/monitors/datadog-sdk-test-resource8350\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2020-10-12T19:34:03.6944091Z\",\r\n \"error\": {},\r\n \"properties\": null\r\n}", + "ResponseBody": "{\r\n \"id\": \"/providers/Microsoft.Datadog/locations/WESTUS2/operationStatuses/61988563-240e-4ecc-9a9b-b5327278614a\",\r\n \"name\": \"61988563-240e-4ecc-9a9b-b5327278614a\",\r\n \"resourceId\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/datadog-sdk-test-rg5570/providers/Microsoft.Datadog/monitors/datadog-sdk-test-resource5737\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2021-03-30T01:16:00.6880578Z\",\r\n \"endTime\": \"2021-03-30T01:16:04.7928694Z\",\r\n \"error\": {},\r\n \"properties\": null\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/providers/Microsoft.Datadog/monitors?api-version=2020-02-01-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMzg5MTZkZDEtZGJkYy00ZTc5LTgyNjItY2M1NzI3YThlOTZiL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGF0YWRvZy9tb25pdG9ycz9hcGktdmVyc2lvbj0yMDIwLTAyLTAxLXByZXZpZXc=", + "RequestUri": "/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/providers/Microsoft.Datadog/monitors?api-version=2021-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTBiMTlhM2ItOGYxYS00ZjcyLTgyN2ItOWUxNGJiYTMwNjFlL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGF0YWRvZy9tb25pdG9ycz9hcGktdmVyc2lvbj0yMDIxLTAzLTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "56a71007-37a2-4b26-bfdd-c065af6c4e69" + "bec84c2c-26ff-468d-9e00-55e26c8cd5d5" ], - "accept-language": [ + "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.26614.01", + "FxVersion/4.6.29812.02", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Datadog.MicrosoftDatadogClient/0.1.0" + "Microsoft.Azure.Management.Datadog.MicrosoftDatadogClient/1.0.0" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], - "Date": [ - "Mon, 12 Oct 2020 19:34:34 GMT" - ], "Pragma": [ "no-cache" ], "x-ms-original-request-ids": [ - "50533848-6d63-4161-852b-a32c73c19d05", - "53f8392c-d36d-4a4f-8305-86ad14d4c9d3" + "03404c3b-09fd-41d4-9348-5c92cf0b8c26", + "f3310eeb-0cd5-4945-8570-2933d3bc268b" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], "x-ms-request-id": [ - "11b0ee3f-e469-46d0-be80-e8b1b5a8d3a7" + "ee86d360-2a59-4356-9e51-cd5439f57243" ], "x-ms-correlation-request-id": [ - "11b0ee3f-e469-46d0-be80-e8b1b5a8d3a7" + "ee86d360-2a59-4356-9e51-cd5439f57243" ], "x-ms-routing-request-id": [ - "WESTUS:20201012T193435Z:11b0ee3f-e469-46d0-be80-e8b1b5a8d3a7" + "WESTCENTRALUS:20210330T011632Z:ee86d360-2a59-4356-9e51-cd5439f57243" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -801,33 +498,36 @@ "X-Content-Type-Options": [ "nosniff" ], - "Content-Length": [ - "8659" + "Date": [ + "Tue, 30 Mar 2021 01:16:31 GMT" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" + ], + "Content-Length": [ + "30012" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/resourceGroups/DatadogTest/providers/Microsoft.Datadog/monitors/test82420\",\r\n \"name\": \"test82420\",\r\n \"type\": \"Microsoft.Datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"datadog_private_preview_Monthly\"\r\n },\r\n \"location\": \"eastus2euap\",\r\n \"tags\": {},\r\n \"identity\": {\r\n \"principalId\": \"35f9ad10-10d8-47f7-ac99-817829e0fcca\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Failed\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"test82420\",\r\n \"id\": \"t2xm9xdnl2gljgdd\",\r\n \"enterpriseAppId\": null\r\n },\r\n \"userInfo\": null,\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/resourceGroups/DatadogTest/providers/Microsoft.Datadog/monitors/tset91720\",\r\n \"name\": \"tset91720\",\r\n \"type\": \"Microsoft.Datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"datadog_private_preview_Monthly\"\r\n },\r\n \"location\": \"eastus2euap\",\r\n \"tags\": {},\r\n \"identity\": {\r\n \"principalId\": \"4d2f5cef-0eed-46de-a683-2f8ae72bd51b\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"tset91720\",\r\n \"id\": \"pln57qxyyloc10yb\",\r\n \"linkingAuthCode\": null,\r\n \"linkingClientId\": null,\r\n \"enterpriseAppId\": null\r\n },\r\n \"userInfo\": null,\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/resourceGroups/DatadogTest/providers/Microsoft.Datadog/monitors/test82120\",\r\n \"name\": \"test82120\",\r\n \"type\": \"Microsoft.Datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"datadog_private_preview_Monthly\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"identity\": {\r\n \"principalId\": \"2d5125d1-4418-41e6-89c6-b30c2b3c42e4\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Failed\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"test82120\",\r\n \"id\": \"nqhi51axmaipfg4w\",\r\n \"enterpriseAppId\": null\r\n },\r\n \"userInfo\": null,\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/resourceGroups/DatadogTest/providers/Microsoft.Datadog/monitors/test8212020\",\r\n \"name\": \"test8212020\",\r\n \"type\": \"Microsoft.Datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"datadog_private_preview_Monthly\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"identity\": {\r\n \"principalId\": \"c878a4d7-af57-45fd-a46d-b31e9ef254ba\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Failed\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"test8212020\",\r\n \"id\": \"1dynaa01tf0mlnd2\",\r\n \"enterpriseAppId\": null\r\n },\r\n \"userInfo\": null,\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/resourceGroups/DatadogTest/providers/Microsoft.Datadog/monitors/t82120\",\r\n \"name\": \"t82120\",\r\n \"type\": \"Microsoft.Datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"datadog_private_preview_Monthly\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"identity\": {\r\n \"principalId\": \"db562b9e-9a05-4e12-91c7-e021d474a554\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Failed\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"t82120\",\r\n \"id\": \"etpprizmh7mz4tm1\",\r\n \"enterpriseAppId\": null\r\n },\r\n \"userInfo\": null,\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/resourceGroups/DatadogTest/providers/Microsoft.Datadog/monitors/test81120\",\r\n \"name\": \"test81120\",\r\n \"type\": \"Microsoft.Datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"datadog_private_preview_Monthly\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"identity\": {\r\n \"principalId\": \"c75a89f2-0373-48e8-ad9f-408fe89875a7\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Failed\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"test81120\",\r\n \"id\": \"1lrvipm3p9efawth\",\r\n \"enterpriseAppId\": null\r\n },\r\n \"userInfo\": null,\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/resourceGroups/DatadogTest/providers/Microsoft.Datadog/monitors/test826\",\r\n \"name\": \"test826\",\r\n \"type\": \"Microsoft.Datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"datadog_private_preview_Monthly\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"identity\": {\r\n \"principalId\": \"2a40da6d-19a0-464a-a54d-ed31eb7b480d\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Failed\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"test826\",\r\n \"id\": \"x6vm8qgp5jwombdg\",\r\n \"enterpriseAppId\": null\r\n },\r\n \"userInfo\": null,\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/resourceGroups/datadog-sdk-test-rg152/providers/Microsoft.Datadog/monitors/datadog-sdk-test-resource8168\",\r\n \"name\": \"datadog-sdk-test-resource8168\",\r\n \"type\": \"Microsoft.Datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"free_Monthly\"\r\n },\r\n \"location\": \"westus2\",\r\n \"identity\": {\r\n \"principalId\": \"4894fc04-af06-4d75-b268-50cfe2e3ebe8\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Failed\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"datadog-sdk-test-resource8168\",\r\n \"id\": null,\r\n \"linkingAuthCode\": null,\r\n \"linkingClientId\": null,\r\n \"enterpriseAppId\": null\r\n },\r\n \"userInfo\": null,\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/resourceGroups/datadog-sdk-test-rg6135/providers/Microsoft.Datadog/monitors/datadog-sdk-test-resource6165\",\r\n \"name\": \"datadog-sdk-test-resource6165\",\r\n \"type\": \"Microsoft.Datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"free_Monthly\"\r\n },\r\n \"location\": \"westus2\",\r\n \"identity\": {\r\n \"principalId\": \"df3a34ba-909c-4e31-b563-46e4a4bd0955\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Failed\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"datadog-sdk-test-resource6165\",\r\n \"id\": null,\r\n \"linkingAuthCode\": null,\r\n \"linkingClientId\": null,\r\n \"enterpriseAppId\": null\r\n },\r\n \"userInfo\": null,\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/resourceGroups/datadog-sdk-test-rg8604/providers/Microsoft.Datadog/monitors/datadog-sdk-test-resource7232\",\r\n \"name\": \"datadog-sdk-test-resource7232\",\r\n \"type\": \"Microsoft.Datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"free_Monthly\"\r\n },\r\n \"location\": \"westus2\",\r\n \"identity\": {\r\n \"principalId\": \"8a23aba3-07a9-4c62-aa98-3b077f3336d1\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Failed\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"datadog-sdk-test-resource7232\",\r\n \"id\": null,\r\n \"linkingAuthCode\": null,\r\n \"linkingClientId\": null,\r\n \"enterpriseAppId\": null\r\n },\r\n \"userInfo\": null,\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/resourceGroups/datadog-sdk-test-rg3946/providers/Microsoft.Datadog/monitors/datadog-sdk-test-resource8831\",\r\n \"name\": \"datadog-sdk-test-resource8831\",\r\n \"type\": \"Microsoft.Datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"Free_Monthly\"\r\n },\r\n \"location\": \"westus2\",\r\n \"identity\": {\r\n \"principalId\": \"c79c0bad-edd2-4873-b0c9-7a3a8be14762\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Failed\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"datadog-sdk-test-resource8831\",\r\n \"id\": null,\r\n \"linkingAuthCode\": null,\r\n \"linkingClientId\": null,\r\n \"enterpriseAppId\": null\r\n },\r\n \"userInfo\": null,\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/resourceGroups/datadog-sdk-test-rg5851/providers/Microsoft.Datadog/monitors/datadog-sdk-test-resource3277\",\r\n \"name\": \"datadog-sdk-test-resource3277\",\r\n \"type\": \"Microsoft.Datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"Free_Monthly\"\r\n },\r\n \"location\": \"westus2\",\r\n \"identity\": {\r\n \"principalId\": \"d7105810-bbb7-4a39-90ae-4e2b718e2143\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Failed\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"datadog-sdk-test-resource3277\",\r\n \"id\": null,\r\n \"linkingAuthCode\": null,\r\n \"linkingClientId\": null,\r\n \"enterpriseAppId\": null\r\n },\r\n \"userInfo\": null,\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/dg-int-acr-log-move-prod-wus2-rg-2009/providers/Microsoft.Datadog/monitors/prod-wus2-lf-acr-20200921\",\r\n \"name\": \"prod-wus2-lf-acr-20200921\",\r\n \"type\": \"Microsoft.Datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"drawdown_testing_20200904_Monthly\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"xuefwu@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": \"2020-11-03T06:31:46.2407055Z\",\r\n \"lastModifiedBy\": \"ae11f5fb-c627-4eec-b4a0-f7b5969426e5\",\r\n \"lastModifiedByType\": \"Application\",\r\n \"lastModifiedAt\": \"2020-11-03T06:32:04.0103776Z\"\r\n },\r\n \"identity\": {\r\n \"principalId\": \"d8b985a7-1c82-4a8f-80c5-c116b6955fd5\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"prod-wus2-lf-acr-20200921\",\r\n \"id\": \"2kydjwuh6yd6d6sy\",\r\n \"linkingAuthCode\": null,\r\n \"linkingClientId\": null,\r\n \"enterpriseAppId\": null\r\n },\r\n \"userInfo\": null,\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/token-svc-test-rg-2008/providers/Microsoft.Datadog/monitors/token-svc-test-wus2-200831\",\r\n \"name\": \"token-svc-test-wus2-200831\",\r\n \"type\": \"Microsoft.Datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"drawdown_testing_20200904_Monthly\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"xuefwu@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": \"2020-11-03T06:37:02.807223Z\",\r\n \"lastModifiedBy\": \"ae11f5fb-c627-4eec-b4a0-f7b5969426e5\",\r\n \"lastModifiedByType\": \"Application\",\r\n \"lastModifiedAt\": \"2020-11-03T06:37:21.8777051Z\"\r\n },\r\n \"identity\": {\r\n \"principalId\": \"0530519b-bd49-46c7-a468-91fed3142c95\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"token-svc-test-wus2-200831\",\r\n \"id\": \"2b0750b20yv6rmt0\",\r\n \"linkingAuthCode\": null,\r\n \"linkingClientId\": null,\r\n \"enterpriseAppId\": null\r\n },\r\n \"userInfo\": null,\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/logforwarder-component-test-wus2-rg/providers/Microsoft.Datadog/monitors/lf-comp-test-prod-wus2-1102-dg\",\r\n \"name\": \"lf-comp-test-prod-wus2-1102-dg\",\r\n \"type\": \"Microsoft.Datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"drawdown_testing_20200904_Monthly\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"wuweng@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": \"2020-11-02T15:03:37.9720271Z\",\r\n \"lastModifiedBy\": \"ae11f5fb-c627-4eec-b4a0-f7b5969426e5\",\r\n \"lastModifiedByType\": \"Application\",\r\n \"lastModifiedAt\": \"2020-11-02T20:52:28.1773479Z\"\r\n },\r\n \"identity\": {\r\n \"principalId\": \"bd9ef71c-ccd0-4f8f-9cf2-7a5790e55aea\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"lf-comp-test-prod-wus2-1102-dg\",\r\n \"id\": \"gbnlv68y1vqw1817\",\r\n \"linkingAuthCode\": null,\r\n \"linkingClientId\": null,\r\n \"enterpriseAppId\": null\r\n },\r\n \"userInfo\": null,\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/akshita-test/providers/Microsoft.Datadog/monitors/LinkOverview\",\r\n \"name\": \"LinkOverview\",\r\n \"type\": \"Microsoft.Datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"linked\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"v-xiztan@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-02-19T06:36:37.7741784Z\",\r\n \"lastModifiedBy\": \"ae11f5fb-c627-4eec-b4a0-f7b5969426e5\",\r\n \"lastModifiedByType\": \"Application\",\r\n \"lastModifiedAt\": \"2021-02-19T06:36:57.1181121Z\"\r\n },\r\n \"identity\": {\r\n \"principalId\": \"5c402d75-0942-4368-903a-b95ac5271284\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"SAMPLE219\",\r\n \"id\": \"rh6y5bbntbyzscp4\",\r\n \"linkingAuthCode\": null,\r\n \"linkingClientId\": null,\r\n \"redirectUri\": \"https://portal.azure.com/TokenAuthorize\",\r\n \"apiKey\": null,\r\n \"applicationKey\": null,\r\n \"enterpriseAppId\": null\r\n },\r\n \"userInfo\": null,\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/jenny1207/providers/Microsoft.Datadog/monitors/jenny325\",\r\n \"name\": \"jenny325\",\r\n \"type\": \"Microsoft.Datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"payg_v2_Monthly\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"v-xiztan@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-03-25T01:00:11.8290943Z\",\r\n \"lastModifiedBy\": \"ae11f5fb-c627-4eec-b4a0-f7b5969426e5\",\r\n \"lastModifiedByType\": \"Application\",\r\n \"lastModifiedAt\": \"2021-03-25T01:00:32.1105987Z\"\r\n },\r\n \"identity\": {\r\n \"principalId\": \"7cb77135-7255-447a-9dd7-78a0fcaaf8eb\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"jenny325\",\r\n \"id\": \"04we0p2bce1s6sxo\",\r\n \"redirectUri\": \"\",\r\n \"apiKey\": null,\r\n \"applicationKey\": null,\r\n \"enterpriseAppId\": \"\"\r\n },\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/callendd/providers/Microsoft.Datadog/monitors/callendd0326\",\r\n \"name\": \"callendd0326\",\r\n \"type\": \"microsoft.datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"payg_v2_Monthly\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"v-xiztan@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-03-26T01:36:55.3193156Z\",\r\n \"lastModifiedBy\": \"ae11f5fb-c627-4eec-b4a0-f7b5969426e5\",\r\n \"lastModifiedByType\": \"Application\",\r\n \"lastModifiedAt\": \"2021-03-26T01:37:13.7299871Z\"\r\n },\r\n \"identity\": {\r\n \"principalId\": \"c9b0e4ad-a559-475b-9f92-1b85a0d10281\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"callendd0326\",\r\n \"id\": \"2pnz3hlz1a2w45s3\",\r\n \"redirectUri\": \"\",\r\n \"apiKey\": null,\r\n \"applicationKey\": null,\r\n \"enterpriseAppId\": \"\"\r\n },\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/callendd/providers/Microsoft.Datadog/monitors/callendd032501\",\r\n \"name\": \"callendd032501\",\r\n \"type\": \"microsoft.datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"payg_v2_Monthly\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"v-xiztan@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-03-26T01:49:54.2874153Z\",\r\n \"lastModifiedBy\": \"ae11f5fb-c627-4eec-b4a0-f7b5969426e5\",\r\n \"lastModifiedByType\": \"Application\",\r\n \"lastModifiedAt\": \"2021-03-26T01:50:09.4536123Z\"\r\n },\r\n \"identity\": {\r\n \"principalId\": \"189a5252-5368-4123-b35a-3b267de6ecbf\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"callendd032501\",\r\n \"id\": \"0vvsn1cym7vrshee\",\r\n \"redirectUri\": \"\",\r\n \"apiKey\": null,\r\n \"applicationKey\": null,\r\n \"enterpriseAppId\": \"\"\r\n },\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/jenny1223/providers/Microsoft.Datadog/monitors/doublecheck\",\r\n \"name\": \"doublecheck\",\r\n \"type\": \"microsoft.datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"payg_v2_Monthly\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"liftr-ui-test-msa-01@outlook.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-03-26T06:21:04.6891777Z\",\r\n \"lastModifiedBy\": \"ae11f5fb-c627-4eec-b4a0-f7b5969426e5\",\r\n \"lastModifiedByType\": \"Application\",\r\n \"lastModifiedAt\": \"2021-03-26T06:21:25.7127611Z\"\r\n },\r\n \"identity\": {\r\n \"principalId\": \"4da8ffbe-713d-4f68-9d2a-4b16e7c30bb4\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"doublecheck\",\r\n \"id\": \"4o22vnw5uo0rzhdd\",\r\n \"redirectUri\": \"\",\r\n \"apiKey\": null,\r\n \"applicationKey\": null,\r\n \"enterpriseAppId\": \"\"\r\n },\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/datadog-ui-test2009-eus2euap-rg/providers/Microsoft.Datadog/monitors/datadog-ui-automation-2020\",\r\n \"name\": \"datadog-ui-automation-2020\",\r\n \"type\": \"Microsoft.Datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"drawdown_testing_20200904_Monthly\"\r\n },\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"skipDelete\": \"True\"\r\n },\r\n \"systemData\": {\r\n \"createdBy\": \"v-xiztan@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-01-15T07:18:32.8924866Z\",\r\n \"lastModifiedBy\": \"liftr-ui-test-msa-01@outlook.com\",\r\n \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": \"2021-03-30T00:53:35.8539742Z\"\r\n },\r\n \"identity\": {\r\n \"principalId\": \"d73c451c-9e32-41f2-9490-4dd1a1352f59\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"datadog-ui-automation-2020\",\r\n \"id\": \"nunhjcslrr2560en\",\r\n \"redirectUri\": null,\r\n \"apiKey\": null,\r\n \"applicationKey\": null,\r\n \"enterpriseAppId\": \"\"\r\n },\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/dg-int-acr-log-move-euap-eus2euap-rg-2009/providers/Microsoft.Datadog/monitors/eus2euap-lf-acr-20200921\",\r\n \"name\": \"eus2euap-lf-acr-20200921\",\r\n \"type\": \"Microsoft.Datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"drawdown_testing_20200904_Monthly\"\r\n },\r\n \"location\": \"eastus2euap\",\r\n \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"xuefwu@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": \"2020-11-03T06:34:17.3912986Z\",\r\n \"lastModifiedBy\": \"ae11f5fb-c627-4eec-b4a0-f7b5969426e5\",\r\n \"lastModifiedByType\": \"Application\",\r\n \"lastModifiedAt\": \"2020-11-03T06:34:36.3533092Z\"\r\n },\r\n \"identity\": {\r\n \"principalId\": \"8aafac17-8682-442b-b603-bd4cfadde6ae\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"eus2euap-lf-acr-20200921\",\r\n \"id\": \"xjxxnuk4intawqn4\",\r\n \"linkingAuthCode\": null,\r\n \"linkingClientId\": null,\r\n \"enterpriseAppId\": null\r\n },\r\n \"userInfo\": null,\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/datadog-ui-test2009-eus2euap-rg/providers/Microsoft.Datadog/monitors/Liftr-UI-Automation-Datadog\",\r\n \"name\": \"Liftr-UI-Automation-Datadog\",\r\n \"type\": \"Microsoft.Datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"drawdown_testing_20200904_Monthly\"\r\n },\r\n \"location\": \"eastus2euap\",\r\n \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"xuefwu@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": \"2020-11-03T06:13:16.0460367Z\",\r\n \"lastModifiedBy\": \"xuefwu@microsoft.com\",\r\n \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": \"2020-11-03T06:13:16.0460367Z\"\r\n },\r\n \"identity\": {\r\n \"principalId\": \"27fc73f9-7f5c-444c-bd97-115ea26cf507\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Accepted\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Provisioning\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"Liftr-UI-Automation-Datadog\",\r\n \"id\": null,\r\n \"linkingAuthCode\": null,\r\n \"linkingClientId\": null,\r\n \"enterpriseAppId\": null\r\n },\r\n \"userInfo\": null,\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/token-svc-test-rg-2008/providers/Microsoft.Datadog/monitors/token-svc-test-eus2euap-200831\",\r\n \"name\": \"token-svc-test-eus2euap-200831\",\r\n \"type\": \"Microsoft.Datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"drawdown_testing_20200904_Monthly\"\r\n },\r\n \"location\": \"eastus2euap\",\r\n \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"xuefwu@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": \"2020-11-03T06:37:27.8462234Z\",\r\n \"lastModifiedBy\": \"ae11f5fb-c627-4eec-b4a0-f7b5969426e5\",\r\n \"lastModifiedByType\": \"Application\",\r\n \"lastModifiedAt\": \"2020-11-03T06:37:45.8249343Z\"\r\n },\r\n \"identity\": {\r\n \"principalId\": \"82225e29-1e32-43a8-b30e-f43f857c5746\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"token-svc-test-eus2euap-200831\",\r\n \"id\": \"th1hpdc149gaevru\",\r\n \"linkingAuthCode\": null,\r\n \"linkingClientId\": null,\r\n \"enterpriseAppId\": null\r\n },\r\n \"userInfo\": null,\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/datadog-ui-test2009-eus2euap-rg/providers/Microsoft.Datadog/monitors/datadog-ui-automation-2020\",\r\n \"name\": \"datadog-ui-automation-2020\",\r\n \"type\": \"Microsoft.Datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"drawdown_testing_20200904_Monthly\"\r\n },\r\n \"location\": \"eastus2euap\",\r\n \"tags\": {\r\n \"skipDelete\": \"true\"\r\n },\r\n \"systemData\": {\r\n \"createdBy\": \"liftr-ui-test-msa-01@outlook.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": \"2020-11-17T03:07:27.4387189Z\",\r\n \"lastModifiedBy\": \"liftr-ui-test-msa-01@outlook.com\",\r\n \"lastModifiedByType\": \"User\",\r\n \"lastModifiedAt\": \"2021-01-15T02:32:54.29149Z\"\r\n },\r\n \"identity\": {\r\n \"principalId\": \"16e6e564-767f-4041-9dd7-22dfcea507ee\",\r\n \"tenantId\": \"16e6e564-767f-4041-9dd7-22dfcea507ee\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"datadog-ui-automation-2020\",\r\n \"id\": \"nunhjcslrr2560en\",\r\n \"linkingAuthCode\": null,\r\n \"linkingClientId\": null,\r\n \"enterpriseAppId\": null\r\n },\r\n \"userInfo\": null,\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/token-svc-test-rg-2008/providers/Microsoft.Datadog/monitors/token-svc-test-eus2euap-210114\",\r\n \"name\": \"token-svc-test-eus2euap-210114\",\r\n \"type\": \"Microsoft.Datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"drawdown_testing_20200904_Monthly\"\r\n },\r\n \"location\": \"eastus2euap\",\r\n \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"xuefwu@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-02-10T20:11:48.8890921Z\",\r\n \"lastModifiedBy\": \"ae11f5fb-c627-4eec-b4a0-f7b5969426e5\",\r\n \"lastModifiedByType\": \"Application\",\r\n \"lastModifiedAt\": \"2021-02-19T06:20:13.9796389Z\"\r\n },\r\n \"identity\": {\r\n \"principalId\": \"dd655184-bd1f-4003-9fdc-eec45a9b794f\",\r\n \"tenantId\": \"dd655184-bd1f-4003-9fdc-eec45a9b794f\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"token-svc-test-eus2euap-210114\",\r\n \"id\": \"uau8mthxjcoejsrz\",\r\n \"redirectUri\": \"\",\r\n \"apiKey\": null,\r\n \"applicationKey\": null,\r\n \"enterpriseAppId\": \"\"\r\n },\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/datadog0818/providers/Microsoft.Datadog/monitors/jenny324\",\r\n \"name\": \"jenny324\",\r\n \"type\": \"microsoft.datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"payg_v2_Monthly\"\r\n },\r\n \"location\": \"eastus2euap\",\r\n \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"v-xiztan@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-03-24T07:13:37.1652646Z\",\r\n \"lastModifiedBy\": \"ae11f5fb-c627-4eec-b4a0-f7b5969426e5\",\r\n \"lastModifiedByType\": \"Application\",\r\n \"lastModifiedAt\": \"2021-03-24T07:13:52.9625457Z\"\r\n },\r\n \"identity\": {\r\n \"principalId\": \"5d9ed12e-17a5-488b-9352-19961a302802\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"jenny324\",\r\n \"id\": \"kzpc3ly4whjx602c\",\r\n \"redirectUri\": \"\",\r\n \"apiKey\": null,\r\n \"applicationKey\": null,\r\n \"enterpriseAppId\": \"\"\r\n },\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/datadog0810/providers/Microsoft.Datadog/monitors/cti324\",\r\n \"name\": \"cti324\",\r\n \"type\": \"microsoft.datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"payg_v2_Monthly\"\r\n },\r\n \"location\": \"eastus2euap\",\r\n \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"v-xiztan@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-03-24T07:17:39.4291622Z\",\r\n \"lastModifiedBy\": \"ae11f5fb-c627-4eec-b4a0-f7b5969426e5\",\r\n \"lastModifiedByType\": \"Application\",\r\n \"lastModifiedAt\": \"2021-03-24T07:17:56.5963557Z\"\r\n },\r\n \"identity\": {\r\n \"principalId\": \"76bc0d1a-26df-4197-9ae3-b9d0bc5fc90d\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"cti324\",\r\n \"id\": \"kirj3k36juwtv07z\",\r\n \"redirectUri\": \"\",\r\n \"apiKey\": null,\r\n \"applicationKey\": null,\r\n \"enterpriseAppId\": \"\"\r\n },\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/cti0304/providers/Microsoft.Datadog/monitors/cti0324\",\r\n \"name\": \"cti0324\",\r\n \"type\": \"microsoft.datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"payg_v2_Monthly\"\r\n },\r\n \"location\": \"eastus2euap\",\r\n \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"v-xiztan@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-03-24T09:47:26.6771352Z\",\r\n \"lastModifiedBy\": \"ae11f5fb-c627-4eec-b4a0-f7b5969426e5\",\r\n \"lastModifiedByType\": \"Application\",\r\n \"lastModifiedAt\": \"2021-03-24T09:47:52.2428668Z\"\r\n },\r\n \"identity\": {\r\n \"principalId\": \"e7d32ccd-146a-4ed7-921c-b436b93eff5e\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"cti0324\",\r\n \"id\": \"og6hi8bzue7r6vl6\",\r\n \"redirectUri\": \"\",\r\n \"apiKey\": null,\r\n \"applicationKey\": null,\r\n \"enterpriseAppId\": \"\"\r\n },\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/test666/providers/Microsoft.Datadog/monitors/jennych325\",\r\n \"name\": \"jennych325\",\r\n \"type\": \"microsoft.datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"payg_v2_Monthly\"\r\n },\r\n \"location\": \"eastus2euap\",\r\n \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"v-xiztan@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-03-25T01:02:32.1338603Z\",\r\n \"lastModifiedBy\": \"ae11f5fb-c627-4eec-b4a0-f7b5969426e5\",\r\n \"lastModifiedByType\": \"Application\",\r\n \"lastModifiedAt\": \"2021-03-25T01:02:49.8988553Z\"\r\n },\r\n \"identity\": {\r\n \"principalId\": \"1fbd9753-f6c7-4ae2-a3c6-ad38458ecac2\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"jennych325\",\r\n \"id\": \"hz0srbhhjj1lh9ap\",\r\n \"redirectUri\": \"\",\r\n \"apiKey\": null,\r\n \"applicationKey\": null,\r\n \"enterpriseAppId\": \"\"\r\n },\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/jenny1223/providers/Microsoft.Datadog/monitors/cti0325\",\r\n \"name\": \"cti0325\",\r\n \"type\": \"microsoft.datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"payg_v2_Monthly\"\r\n },\r\n \"location\": \"eastus2euap\",\r\n \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"v-xiztan@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-03-25T07:40:18.4573324Z\",\r\n \"lastModifiedBy\": \"ae11f5fb-c627-4eec-b4a0-f7b5969426e5\",\r\n \"lastModifiedByType\": \"Application\",\r\n \"lastModifiedAt\": \"2021-03-25T07:40:39.2977371Z\"\r\n },\r\n \"identity\": {\r\n \"principalId\": \"8ea20eef-273e-45e7-8845-2a5f4fd580ec\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"cti0325\",\r\n \"id\": \"4b8f5fc2aadvais4\",\r\n \"redirectUri\": \"\",\r\n \"apiKey\": null,\r\n \"applicationKey\": null,\r\n \"enterpriseAppId\": \"\"\r\n },\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/cti0304/providers/Microsoft.Datadog/monitors/cti0325\",\r\n \"name\": \"cti0325\",\r\n \"type\": \"microsoft.datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"payg_v2_Monthly\"\r\n },\r\n \"location\": \"eastus2euap\",\r\n \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"v-cjenny@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-03-25T07:41:01.3067245Z\",\r\n \"lastModifiedBy\": \"ae11f5fb-c627-4eec-b4a0-f7b5969426e5\",\r\n \"lastModifiedByType\": \"Application\",\r\n \"lastModifiedAt\": \"2021-03-25T07:41:17.7412777Z\"\r\n },\r\n \"identity\": {\r\n \"principalId\": \"3b7ac777-7822-4e41-be3c-03a356b1151f\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"cti0325\",\r\n \"id\": \"hk4wauxhr1rz0wvm\",\r\n \"redirectUri\": \"\",\r\n \"apiKey\": null,\r\n \"applicationKey\": null,\r\n \"enterpriseAppId\": \"\"\r\n },\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/cti0304/providers/Microsoft.Datadog/monitors/doublecheck\",\r\n \"name\": \"doublecheck\",\r\n \"type\": \"microsoft.datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"payg_v2_Monthly\"\r\n },\r\n \"location\": \"eastus2euap\",\r\n \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"v-cjenny@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-03-26T01:29:01.9311814Z\",\r\n \"lastModifiedBy\": \"ae11f5fb-c627-4eec-b4a0-f7b5969426e5\",\r\n \"lastModifiedByType\": \"Application\",\r\n \"lastModifiedAt\": \"2021-03-26T01:29:21.9585001Z\"\r\n },\r\n \"identity\": {\r\n \"principalId\": \"dad85875-1514-41b4-abf6-10cef634191c\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"doublecheck\",\r\n \"id\": \"ed4ck5righe7ntm4\",\r\n \"redirectUri\": \"\",\r\n \"apiKey\": null,\r\n \"applicationKey\": null,\r\n \"enterpriseAppId\": \"\"\r\n },\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/callendd/providers/Microsoft.Datadog/monitors/callendd032603\",\r\n \"name\": \"callendd032603\",\r\n \"type\": \"microsoft.datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"payg_v2_Monthly\"\r\n },\r\n \"location\": \"eastus2euap\",\r\n \"tags\": {},\r\n \"systemData\": {\r\n \"createdBy\": \"v-xiztan@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-03-26T02:18:49.0374839Z\",\r\n \"lastModifiedBy\": \"ae11f5fb-c627-4eec-b4a0-f7b5969426e5\",\r\n \"lastModifiedByType\": \"Application\",\r\n \"lastModifiedAt\": \"2021-03-26T02:19:08.1061178Z\"\r\n },\r\n \"identity\": {\r\n \"principalId\": \"5ce67ede-7652-427e-9bc5-28b3b612da76\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"callendd032603\",\r\n \"id\": \"wo5x8vr38aw64m4t\",\r\n \"redirectUri\": \"\",\r\n \"apiKey\": null,\r\n \"applicationKey\": null,\r\n \"enterpriseAppId\": \"\"\r\n },\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/datadog-ui-test2009-eus2euap-rg/providers/Microsoft.Datadog/monitors/liftr-ibiza-032905321\",\r\n \"name\": \"liftr-ibiza-032905321\",\r\n \"type\": \"microsoft.datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"drawdown_testing_20200904_Monthly\"\r\n },\r\n \"location\": \"eastus2euap\",\r\n \"tags\": {\r\n \"Creator\": \"UnitTest\",\r\n \"CreatedAt\": \"3/29/2021\",\r\n \"TestRunningMachine\": \"5e-jenkins-ui-t\",\r\n \"ResourceCreationTimestamp\": \"2021-03-29T00:54:24.1538897Z\"\r\n },\r\n \"systemData\": {\r\n \"createdBy\": \"liftr-ui-test-msa-01@outlook.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-03-29T00:54:45.2036471Z\",\r\n \"lastModifiedBy\": \"ae11f5fb-c627-4eec-b4a0-f7b5969426e5\",\r\n \"lastModifiedByType\": \"Application\",\r\n \"lastModifiedAt\": \"2021-03-29T00:55:01.2140513Z\"\r\n },\r\n \"identity\": {\r\n \"principalId\": \"7c768e22-1109-4909-81bb-fb7f455c33f6\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"liftr-ibiza-032905321\",\r\n \"id\": \"e9i3zi0zag6r486p\",\r\n \"redirectUri\": \"\",\r\n \"apiKey\": null,\r\n \"applicationKey\": null,\r\n \"enterpriseAppId\": \"\"\r\n },\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/datadog-ui-test2009-eus2euap-rg/providers/Microsoft.Datadog/monitors/liftr-ibiza-032945244\",\r\n \"name\": \"liftr-ibiza-032945244\",\r\n \"type\": \"microsoft.datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"drawdown_testing_20200904_Monthly\"\r\n },\r\n \"location\": \"eastus2euap\",\r\n \"tags\": {\r\n \"Creator\": \"UnitTest\",\r\n \"CreatedAt\": \"3/29/2021\",\r\n \"TestRunningMachine\": \"5e-jenkins-ui-t\",\r\n \"ResourceCreationTimestamp\": \"2021-03-29T04:53:44.502158Z\"\r\n },\r\n \"systemData\": {\r\n \"createdBy\": \"liftr-ui-test-msa-01@outlook.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-03-29T04:54:06.3055667Z\",\r\n \"lastModifiedBy\": \"ae11f5fb-c627-4eec-b4a0-f7b5969426e5\",\r\n \"lastModifiedByType\": \"Application\",\r\n \"lastModifiedAt\": \"2021-03-29T04:54:22.5294778Z\"\r\n },\r\n \"identity\": {\r\n \"principalId\": \"99f002fb-62ea-440a-ae03-e482cf05304c\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"liftr-ibiza-032945244\",\r\n \"id\": \"ykmq9n7tyylv95x7\",\r\n \"redirectUri\": \"\",\r\n \"apiKey\": null,\r\n \"applicationKey\": null,\r\n \"enterpriseAppId\": \"\"\r\n },\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/datadog-ui-test2009-eus2euap-rg/providers/Microsoft.Datadog/monitors/liftr-ibiza-032985437\",\r\n \"name\": \"liftr-ibiza-032985437\",\r\n \"type\": \"microsoft.datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"drawdown_testing_20200904_Monthly\"\r\n },\r\n \"location\": \"eastus2euap\",\r\n \"tags\": {\r\n \"Creator\": \"UnitTest\",\r\n \"CreatedAt\": \"3/29/2021\",\r\n \"TestRunningMachine\": \"5e-jenkins-ui-t\",\r\n \"ResourceCreationTimestamp\": \"2021-03-29T08:55:41.7983492Z\"\r\n },\r\n \"systemData\": {\r\n \"createdBy\": \"liftr-ui-test-msa-01@outlook.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-03-29T08:56:01.8562749Z\",\r\n \"lastModifiedBy\": \"ae11f5fb-c627-4eec-b4a0-f7b5969426e5\",\r\n \"lastModifiedByType\": \"Application\",\r\n \"lastModifiedAt\": \"2021-03-29T08:56:17.2457152Z\"\r\n },\r\n \"identity\": {\r\n \"principalId\": \"842624e1-00b3-4286-87a5-b9b428b723cd\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"liftr-ibiza-032985437\",\r\n \"id\": \"7f8yrpvz37l9kf7p\",\r\n \"redirectUri\": \"\",\r\n \"apiKey\": null,\r\n \"applicationKey\": null,\r\n \"enterpriseAppId\": \"\"\r\n },\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/datadog-ui-test2009-eus2euap-rg/providers/Microsoft.Datadog/monitors/liftr-ibiza-0329125429\",\r\n \"name\": \"liftr-ibiza-0329125429\",\r\n \"type\": \"microsoft.datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"drawdown_testing_20200904_Monthly\"\r\n },\r\n \"location\": \"eastus2euap\",\r\n \"tags\": {\r\n \"Creator\": \"UnitTest\",\r\n \"CreatedAt\": \"3/29/2021\",\r\n \"TestRunningMachine\": \"5e-jenkins-ui-t\",\r\n \"ResourceCreationTimestamp\": \"2021-03-29T12:55:28.6458629Z\"\r\n },\r\n \"systemData\": {\r\n \"createdBy\": \"liftr-ui-test-msa-01@outlook.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-03-29T12:55:48.8035096Z\",\r\n \"lastModifiedBy\": \"ae11f5fb-c627-4eec-b4a0-f7b5969426e5\",\r\n \"lastModifiedByType\": \"Application\",\r\n \"lastModifiedAt\": \"2021-03-29T12:56:03.6549619Z\"\r\n },\r\n \"identity\": {\r\n \"principalId\": \"bb34c193-98bd-464e-bc57-83ef306ecf8d\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"liftr-ibiza-0329125429\",\r\n \"id\": \"s0769pko0d507kyd\",\r\n \"redirectUri\": \"\",\r\n \"apiKey\": null,\r\n \"applicationKey\": null,\r\n \"enterpriseAppId\": \"\"\r\n },\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/datadog-ui-test2009-eus2euap-rg/providers/Microsoft.Datadog/monitors/liftr-ibiza-0329165122\",\r\n \"name\": \"liftr-ibiza-0329165122\",\r\n \"type\": \"microsoft.datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"drawdown_testing_20200904_Monthly\"\r\n },\r\n \"location\": \"eastus2euap\",\r\n \"tags\": {\r\n \"Creator\": \"UnitTest\",\r\n \"CreatedAt\": \"3/29/2021\",\r\n \"TestRunningMachine\": \"5e-jenkins-ui-t\",\r\n \"ResourceCreationTimestamp\": \"2021-03-29T16:52:24.6868316Z\"\r\n },\r\n \"systemData\": {\r\n \"createdBy\": \"liftr-ui-test-msa-01@outlook.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-03-29T16:52:54.2033253Z\",\r\n \"lastModifiedBy\": \"ae11f5fb-c627-4eec-b4a0-f7b5969426e5\",\r\n \"lastModifiedByType\": \"Application\",\r\n \"lastModifiedAt\": \"2021-03-29T16:53:10.2226165Z\"\r\n },\r\n \"identity\": {\r\n \"principalId\": \"6609590a-fb51-455b-b248-20802304256f\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"liftr-ibiza-0329165122\",\r\n \"id\": \"03y6inu6zd52587v\",\r\n \"redirectUri\": \"\",\r\n \"apiKey\": null,\r\n \"applicationKey\": null,\r\n \"enterpriseAppId\": \"\"\r\n },\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourceGroups/datadog-ui-test2009-eus2euap-rg/providers/Microsoft.Datadog/monitors/liftr-ibiza-0329205201\",\r\n \"name\": \"liftr-ibiza-0329205201\",\r\n \"type\": \"microsoft.datadog/monitors\",\r\n \"sku\": {\r\n \"name\": \"drawdown_testing_20200904_Monthly\"\r\n },\r\n \"location\": \"eastus2euap\",\r\n \"tags\": {\r\n \"Creator\": \"UnitTest\",\r\n \"CreatedAt\": \"3/29/2021\",\r\n \"TestRunningMachine\": \"5e-jenkins-ui-t\",\r\n \"ResourceCreationTimestamp\": \"2021-03-29T20:53:01.2640674Z\"\r\n },\r\n \"systemData\": {\r\n \"createdBy\": \"liftr-ui-test-msa-01@outlook.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-03-29T20:53:21.7696625Z\",\r\n \"lastModifiedBy\": \"ae11f5fb-c627-4eec-b4a0-f7b5969426e5\",\r\n \"lastModifiedByType\": \"Application\",\r\n \"lastModifiedAt\": \"2021-03-29T20:53:37.4474028Z\"\r\n },\r\n \"identity\": {\r\n \"principalId\": \"294b6a96-3a66-4428-915e-9cf9b886af3a\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"monitoringStatus\": \"Enabled\",\r\n \"marketplaceSubscriptionStatus\": \"Active\",\r\n \"datadogOrganizationProperties\": {\r\n \"name\": \"liftr-ibiza-0329205201\",\r\n \"id\": \"vvs189ab2cpy011h\",\r\n \"redirectUri\": \"\",\r\n \"apiKey\": null,\r\n \"applicationKey\": null,\r\n \"enterpriseAppId\": \"\"\r\n },\r\n \"liftrResourceCategory\": \"MonitorLogs\",\r\n \"liftrResourcePreference\": 0\r\n }\r\n }\r\n ]\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/resourcegroups/datadog-sdk-test-rg1630?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMzg5MTZkZDEtZGJkYy00ZTc5LTgyNjItY2M1NzI3YThlOTZiL3Jlc291cmNlZ3JvdXBzL2RhdGFkb2ctc2RrLXRlc3QtcmcxNjMwP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestUri": "/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/resourcegroups/datadog-sdk-test-rg5570?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTBiMTlhM2ItOGYxYS00ZjcyLTgyN2ItOWUxNGJiYTMwNjFlL3Jlc291cmNlZ3JvdXBzL2RhdGFkb2ctc2RrLXRlc3Qtcmc1NTcwP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", "RequestMethod": "DELETE", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "756949b0-3972-4b12-b2ae-655d0de5e5d7" + "930b5dc9-762e-4175-a94f-4d733bb7263e" ], - "accept-language": [ + "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.26614.01", + "FxVersion/4.6.29812.02", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.19042.", "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" @@ -837,14 +537,11 @@ "Cache-Control": [ "no-cache" ], - "Date": [ - "Mon, 12 Oct 2020 19:34:35 GMT" - ], "Pragma": [ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1EQVRBRE9HOjJEU0RLOjJEVEVTVDoyRFJHMTYzMC1XRVNUVVMyIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMyIn0?api-version=2015-11-01" + "https://management.azure.com/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1EQVRBRE9HOjJEU0RLOjJEVEVTVDoyRFJHNTU3MC1XRVNUVVMyIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMyIn0?api-version=2015-11-01" ], "Retry-After": [ "15" @@ -853,13 +550,13 @@ "14999" ], "x-ms-request-id": [ - "6c2e9fe4-bde8-4d60-8fbb-a14414116677" + "b7786374-06fb-46e6-a249-afff60d20fef" ], "x-ms-correlation-request-id": [ - "6c2e9fe4-bde8-4d60-8fbb-a14414116677" + "b7786374-06fb-46e6-a249-afff60d20fef" ], "x-ms-routing-request-id": [ - "WESTUS:20201012T193436Z:6c2e9fe4-bde8-4d60-8fbb-a14414116677" + "WESTCENTRALUS:20210330T011633Z:b7786374-06fb-46e6-a249-afff60d20fef" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -867,24 +564,27 @@ "X-Content-Type-Options": [ "nosniff" ], - "Content-Length": [ - "0" + "Date": [ + "Tue, 30 Mar 2021 01:16:32 GMT" ], "Expires": [ "-1" + ], + "Content-Length": [ + "0" ] }, "ResponseBody": "", "StatusCode": 202 }, { - "RequestUri": "/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1EQVRBRE9HOjJEU0RLOjJEVEVTVDoyRFJHMTYzMC1XRVNUVVMyIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMyIn0?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMzg5MTZkZDEtZGJkYy00ZTc5LTgyNjItY2M1NzI3YThlOTZiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFFUVZSQlJFOUhPakpFVTBSTE9qSkVWRVZUVkRveVJGSkhNVFl6TUMxWFJWTlVWVk15SWl3aWFtOWlURzlqWVhScGIyNGlPaUozWlhOMGRYTXlJbjA/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestUri": "/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1EQVRBRE9HOjJEU0RLOjJEVEVTVDoyRFJHNTU3MC1XRVNUVVMyIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMyIn0?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTBiMTlhM2ItOGYxYS00ZjcyLTgyN2ItOWUxNGJiYTMwNjFlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFFUVZSQlJFOUhPakpFVTBSTE9qSkVWRVZUVkRveVJGSkhOVFUzTUMxWFJWTlVWVk15SWl3aWFtOWlURzlqWVhScGIyNGlPaUozWlhOMGRYTXlJbjA/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.26614.01", + "FxVersion/4.6.29812.02", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.19042.", "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" @@ -894,14 +594,11 @@ "Cache-Control": [ "no-cache" ], - "Date": [ - "Mon, 12 Oct 2020 19:34:50 GMT" - ], "Pragma": [ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1EQVRBRE9HOjJEU0RLOjJEVEVTVDoyRFJHMTYzMC1XRVNUVVMyIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMyIn0?api-version=2015-11-01" + "https://management.azure.com/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1EQVRBRE9HOjJEU0RLOjJEVEVTVDoyRFJHNTU3MC1XRVNUVVMyIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMyIn0?api-version=2015-11-01" ], "Retry-After": [ "15" @@ -910,13 +607,13 @@ "11999" ], "x-ms-request-id": [ - "76e66806-4205-45ad-9d93-c354b3b7bb10" + "8bace674-bf22-4aa8-9af3-ba73443dcb3f" ], "x-ms-correlation-request-id": [ - "76e66806-4205-45ad-9d93-c354b3b7bb10" + "8bace674-bf22-4aa8-9af3-ba73443dcb3f" ], "x-ms-routing-request-id": [ - "WESTUS:20201012T193451Z:76e66806-4205-45ad-9d93-c354b3b7bb10" + "WESTCENTRALUS:20210330T011648Z:8bace674-bf22-4aa8-9af3-ba73443dcb3f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -924,24 +621,27 @@ "X-Content-Type-Options": [ "nosniff" ], - "Content-Length": [ - "0" + "Date": [ + "Tue, 30 Mar 2021 01:16:47 GMT" ], "Expires": [ "-1" + ], + "Content-Length": [ + "0" ] }, "ResponseBody": "", "StatusCode": 202 }, { - "RequestUri": "/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1EQVRBRE9HOjJEU0RLOjJEVEVTVDoyRFJHMTYzMC1XRVNUVVMyIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMyIn0?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMzg5MTZkZDEtZGJkYy00ZTc5LTgyNjItY2M1NzI3YThlOTZiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFFUVZSQlJFOUhPakpFVTBSTE9qSkVWRVZUVkRveVJGSkhNVFl6TUMxWFJWTlVWVk15SWl3aWFtOWlURzlqWVhScGIyNGlPaUozWlhOMGRYTXlJbjA/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestUri": "/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1EQVRBRE9HOjJEU0RLOjJEVEVTVDoyRFJHNTU3MC1XRVNUVVMyIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMyIn0?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTBiMTlhM2ItOGYxYS00ZjcyLTgyN2ItOWUxNGJiYTMwNjFlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFFUVZSQlJFOUhPakpFVTBSTE9qSkVWRVZUVkRveVJGSkhOVFUzTUMxWFJWTlVWVk15SWl3aWFtOWlURzlqWVhScGIyNGlPaUozWlhOMGRYTXlJbjA/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.26614.01", + "FxVersion/4.6.29812.02", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.19042.", "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" @@ -951,14 +651,11 @@ "Cache-Control": [ "no-cache" ], - "Date": [ - "Mon, 12 Oct 2020 19:35:05 GMT" - ], "Pragma": [ "no-cache" ], "Location": [ - "https://management.azure.com/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1EQVRBRE9HOjJEU0RLOjJEVEVTVDoyRFJHMTYzMC1XRVNUVVMyIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMyIn0?api-version=2015-11-01" + "https://management.azure.com/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1EQVRBRE9HOjJEU0RLOjJEVEVTVDoyRFJHNTU3MC1XRVNUVVMyIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMyIn0?api-version=2015-11-01" ], "Retry-After": [ "15" @@ -967,13 +664,13 @@ "11998" ], "x-ms-request-id": [ - "51f0b984-1ec5-4fb0-8d84-0f2980e643a9" + "b76c060f-d9a1-4f7a-aa98-3708dca573a4" ], "x-ms-correlation-request-id": [ - "51f0b984-1ec5-4fb0-8d84-0f2980e643a9" + "b76c060f-d9a1-4f7a-aa98-3708dca573a4" ], "x-ms-routing-request-id": [ - "WESTUS:20201012T193506Z:51f0b984-1ec5-4fb0-8d84-0f2980e643a9" + "WESTCENTRALUS:20210330T011703Z:b76c060f-d9a1-4f7a-aa98-3708dca573a4" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -981,24 +678,27 @@ "X-Content-Type-Options": [ "nosniff" ], - "Content-Length": [ - "0" + "Date": [ + "Tue, 30 Mar 2021 01:17:02 GMT" ], "Expires": [ "-1" + ], + "Content-Length": [ + "0" ] }, "ResponseBody": "", "StatusCode": 202 }, { - "RequestUri": "/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1EQVRBRE9HOjJEU0RLOjJEVEVTVDoyRFJHMTYzMC1XRVNUVVMyIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMyIn0?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMzg5MTZkZDEtZGJkYy00ZTc5LTgyNjItY2M1NzI3YThlOTZiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFFUVZSQlJFOUhPakpFVTBSTE9qSkVWRVZUVkRveVJGSkhNVFl6TUMxWFJWTlVWVk15SWl3aWFtOWlURzlqWVhScGIyNGlPaUozWlhOMGRYTXlJbjA/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestUri": "/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1EQVRBRE9HOjJEU0RLOjJEVEVTVDoyRFJHNTU3MC1XRVNUVVMyIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMyIn0?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTBiMTlhM2ItOGYxYS00ZjcyLTgyN2ItOWUxNGJiYTMwNjFlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFFUVZSQlJFOUhPakpFVTBSTE9qSkVWRVZUVkRveVJGSkhOVFUzTUMxWFJWTlVWVk15SWl3aWFtOWlURzlqWVhScGIyNGlPaUozWlhOMGRYTXlJbjA/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.26614.01", + "FxVersion/4.6.29812.02", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.19042.", "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" @@ -1008,9 +708,6 @@ "Cache-Control": [ "no-cache" ], - "Date": [ - "Mon, 12 Oct 2020 19:35:20 GMT" - ], "Pragma": [ "no-cache" ], @@ -1018,13 +715,13 @@ "11997" ], "x-ms-request-id": [ - "3ed7a9c5-a003-4c6d-b2db-39d92b010ee2" + "214e02f4-74ea-47f6-a035-fab71f677ba6" ], "x-ms-correlation-request-id": [ - "3ed7a9c5-a003-4c6d-b2db-39d92b010ee2" + "214e02f4-74ea-47f6-a035-fab71f677ba6" ], "x-ms-routing-request-id": [ - "WESTUS:20201012T193521Z:3ed7a9c5-a003-4c6d-b2db-39d92b010ee2" + "WESTCENTRALUS:20210330T011718Z:214e02f4-74ea-47f6-a035-fab71f677ba6" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1032,24 +729,27 @@ "X-Content-Type-Options": [ "nosniff" ], - "Content-Length": [ - "0" + "Date": [ + "Tue, 30 Mar 2021 01:17:18 GMT" ], "Expires": [ "-1" + ], + "Content-Length": [ + "0" ] }, "ResponseBody": "", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/38916dd1-dbdc-4e79-8262-cc5727a8e96b/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1EQVRBRE9HOjJEU0RLOjJEVEVTVDoyRFJHMTYzMC1XRVNUVVMyIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMyIn0?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMzg5MTZkZDEtZGJkYy00ZTc5LTgyNjItY2M1NzI3YThlOTZiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFFUVZSQlJFOUhPakpFVTBSTE9qSkVWRVZUVkRveVJGSkhNVFl6TUMxWFJWTlVWVk15SWl3aWFtOWlURzlqWVhScGIyNGlPaUozWlhOMGRYTXlJbjA/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestUri": "/subscriptions/e0b19a3b-8f1a-4f72-827b-9e14bba3061e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1EQVRBRE9HOjJEU0RLOjJEVEVTVDoyRFJHNTU3MC1XRVNUVVMyIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMyIn0?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZTBiMTlhM2ItOGYxYS00ZjcyLTgyN2ItOWUxNGJiYTMwNjFlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFFUVZSQlJFOUhPakpFVTBSTE9qSkVWRVZUVkRveVJGSkhOVFUzTUMxWFJWTlVWVk15SWl3aWFtOWlURzlqWVhScGIyNGlPaUozWlhOMGRYTXlJbjA/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.26614.01", + "FxVersion/4.6.29812.02", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.19042.", "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" @@ -1059,9 +759,6 @@ "Cache-Control": [ "no-cache" ], - "Date": [ - "Mon, 12 Oct 2020 19:35:20 GMT" - ], "Pragma": [ "no-cache" ], @@ -1069,13 +766,13 @@ "11996" ], "x-ms-request-id": [ - "b68ad2b9-7c54-4c84-824c-0f964e257963" + "25cf4406-f6e2-4dec-9558-a0c26b42cf5e" ], "x-ms-correlation-request-id": [ - "b68ad2b9-7c54-4c84-824c-0f964e257963" + "25cf4406-f6e2-4dec-9558-a0c26b42cf5e" ], "x-ms-routing-request-id": [ - "WESTUS:20201012T193521Z:b68ad2b9-7c54-4c84-824c-0f964e257963" + "WESTCENTRALUS:20210330T011718Z:25cf4406-f6e2-4dec-9558-a0c26b42cf5e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1083,11 +780,14 @@ "X-Content-Type-Options": [ "nosniff" ], - "Content-Length": [ - "0" + "Date": [ + "Tue, 30 Mar 2021 01:17:18 GMT" ], "Expires": [ "-1" + ], + "Content-Length": [ + "0" ] }, "ResponseBody": "", @@ -1096,12 +796,11 @@ ], "Names": { "CreateName": [ - "datadog-sdk-test-rg1630", - "datadog-sdk-test-resource8350", - "default9152" + "datadog-sdk-test-rg5570", + "datadog-sdk-test-resource5737" ] }, "Variables": { - "SubscriptionId": "38916dd1-dbdc-4e79-8262-cc5727a8e96b" + "SubscriptionId": "e0b19a3b-8f1a-4f72-827b-9e14bba3061e" } } \ No newline at end of file