From 5e75e0255761957407431ad04190cec535263215 Mon Sep 17 00:00:00 2001 From: Stephen Budhi Date: Mon, 1 Nov 2021 14:51:46 -0700 Subject: [PATCH] Initial generated SDK --- .../mgmtmetadata/quota_resource-manager.txt | 15 + eng/pipelines/mgmt.yml | 1 + .../AzSdk.RP.props | 7 + .../Microsoft.Azure.Management.Quota.sln | 28 + .../Generated/AzureQuotaExtensionAPIClient.cs | 375 ++++++ .../IAzureQuotaExtensionAPIClient.cs | 88 ++ .../Generated/IQuotaOperationOperations.cs | 76 ++ .../src/Generated/IQuotaOperations.cs | 296 +++++ .../IQuotaRequestStatusOperations.cs | 130 ++ .../src/Generated/IUsagesOperations.cs | 112 ++ .../Models/CommonResourceProperties.cs | 68 + .../CreateGenericQuotaRequestParameters.cs | 55 + .../Generated/Models/CurrentQuotaLimitBase.cs | 79 ++ .../src/Generated/Models/CurrentUsagesBase.cs | 91 ++ .../src/Generated/Models/ExceptionResponse.cs | 51 + .../Models/ExceptionResponseException.cs | 62 + .../src/Generated/Models/LimitJsonObject.cs | 35 + .../src/Generated/Models/LimitObject.cs | 70 + .../src/Generated/Models/LimitType.cs | 21 + .../src/Generated/Models/OperationDisplay.cs | 72 + .../src/Generated/Models/OperationResponse.cs | 58 + .../src/Generated/Models/Page.cs | 53 + .../src/Generated/Models/QuotaGetHeaders.cs | 53 + .../src/Generated/Models/QuotaLimitTypes.cs | 22 + .../Generated/Models/QuotaLimitsResponse.cs | 64 + .../src/Generated/Models/QuotaListHeaders.cs | 53 + .../src/Generated/Models/QuotaProperties.cs | 120 ++ .../Generated/Models/QuotaRequestDetails.cs | 119 ++ .../QuotaRequestOneResourceSubmitResponse.cs | 211 +++ .../Models/QuotaRequestProperties.cs | 92 ++ .../src/Generated/Models/QuotaRequestState.cs | 25 + .../Models/QuotaRequestSubmitResponse.cs | 77 ++ .../Models/QuotaRequestSubmitResponse202.cs | 178 +++ .../src/Generated/Models/ResourceName.cs | 60 + .../src/Generated/Models/ServiceError.cs | 69 + .../Generated/Models/ServiceErrorDetail.cs | 59 + .../src/Generated/Models/SubRequest.cs | 107 ++ .../src/Generated/Models/UsagesGetHeaders.cs | 53 + .../src/Generated/Models/UsagesListHeaders.cs | 54 + .../src/Generated/Models/UsagesObject.cs | 69 + .../src/Generated/Models/UsagesProperties.cs | 135 ++ .../src/Generated/Models/UsagesTypes.cs | 22 + .../src/Generated/QuotaOperationOperations.cs | 403 ++++++ .../QuotaOperationOperationsExtensions.cs | 99 ++ .../src/Generated/QuotaOperations.cs | 1179 +++++++++++++++++ .../Generated/QuotaOperationsExtensions.cs | 467 +++++++ .../Generated/QuotaRequestStatusOperations.cs | 649 +++++++++ .../QuotaRequestStatusOperationsExtensions.cs | 195 +++ .../SdkInfo_AzureQuotaExtensionAPI.cs | 41 + .../src/Generated/UsagesOperations.cs | 649 +++++++++ .../Generated/UsagesOperationsExtensions.cs | 155 +++ .../Microsoft.Azure.Management.Quota.csproj | 23 + .../src/Properties/AssemblyInfo.cs | 18 + .../src/generate.ps1 | 1 + .../tests/Helpers/QuotaTestUtilities.cs | 24 + .../Helpers/RecordedDelegatingHandler.cs | 92 ++ ...rosoft.Azure.Management.Quota.Tests.csproj | 24 + .../tests/ScenarioTests/QuotaTests.cs | 221 +++ .../QuotaTests/Test_GetQuota.json | 71 + .../QuotaTests/Test_GetQuotaRequest.json | 74 ++ .../QuotaTests/Test_GetUsage.json | 71 + .../QuotaTests/Test_ListQuota.json | 71 + .../QuotaTests/Test_ListQuotaRequest.json | 71 + .../Test_ListQuotaRequestWithFilter.json | 71 + .../QuotaTests/Test_ListUsage.json | 71 + .../QuotaTests/Test_SetQuota.json | 86 ++ .../Test_SetQuotaInvalidResourceName.json | 80 ++ 67 files changed, 8391 insertions(+) create mode 100644 eng/mgmt/mgmtmetadata/quota_resource-manager.txt create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/AzSdk.RP.props create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/Microsoft.Azure.Management.Quota.sln create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/AzureQuotaExtensionAPIClient.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/IAzureQuotaExtensionAPIClient.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/IQuotaOperationOperations.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/IQuotaOperations.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/IQuotaRequestStatusOperations.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/IUsagesOperations.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/CommonResourceProperties.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/CreateGenericQuotaRequestParameters.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/CurrentQuotaLimitBase.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/CurrentUsagesBase.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/ExceptionResponse.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/ExceptionResponseException.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/LimitJsonObject.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/LimitObject.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/LimitType.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/OperationDisplay.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/OperationResponse.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/Page.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaGetHeaders.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaLimitTypes.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaLimitsResponse.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaListHeaders.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaProperties.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaRequestDetails.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaRequestOneResourceSubmitResponse.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaRequestProperties.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaRequestState.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaRequestSubmitResponse.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaRequestSubmitResponse202.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/ResourceName.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/ServiceError.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/ServiceErrorDetail.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/SubRequest.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/UsagesGetHeaders.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/UsagesListHeaders.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/UsagesObject.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/UsagesProperties.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/UsagesTypes.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/QuotaOperationOperations.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/QuotaOperationOperationsExtensions.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/QuotaOperations.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/QuotaOperationsExtensions.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/QuotaRequestStatusOperations.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/QuotaRequestStatusOperationsExtensions.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/SdkInfo_AzureQuotaExtensionAPI.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/UsagesOperations.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/UsagesOperationsExtensions.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Microsoft.Azure.Management.Quota.csproj create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/Properties/AssemblyInfo.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/src/generate.ps1 create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/tests/Helpers/QuotaTestUtilities.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/tests/Helpers/RecordedDelegatingHandler.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/tests/Microsoft.Azure.Management.Quota.Tests.csproj create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/tests/ScenarioTests/QuotaTests.cs create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_GetQuota.json create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_GetQuotaRequest.json create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_GetUsage.json create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_ListQuota.json create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_ListQuotaRequest.json create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_ListQuotaRequestWithFilter.json create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_ListUsage.json create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_SetQuota.json create mode 100644 sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_SetQuotaInvalidResourceName.json diff --git a/eng/mgmt/mgmtmetadata/quota_resource-manager.txt b/eng/mgmt/mgmtmetadata/quota_resource-manager.txt new file mode 100644 index 000000000000..44c506a8ad6c --- /dev/null +++ b/eng/mgmt/mgmtmetadata/quota_resource-manager.txt @@ -0,0 +1,15 @@ +Installing AutoRest version: v2 +AutoRest installed successfully. +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/quota/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=C:\One\sbudhi-msft\azure-sdk-for-net\sdk +Autorest CSharp Version: 2.3.82 +2021-11-01 22:11:44 UTC +Azure-rest-api-specs repository information +GitHub fork: Azure +Branch: master +Commit: a861859a287afbbf58930535e75894b0f488e3b3 +AutoRest information +Requested version: v2 +Bootstrapper version: autorest@2.0.4413 diff --git a/eng/pipelines/mgmt.yml b/eng/pipelines/mgmt.yml index ebe205b7d181..000732c0deb7 100644 --- a/eng/pipelines/mgmt.yml +++ b/eng/pipelines/mgmt.yml @@ -133,6 +133,7 @@ pr: - sdk/providerhub/Microsoft.Azure.Management.ProviderHub - sdk/purview/Microsoft.Azure.Management.Purview - sdk/quantum/Microsoft.Azure.Management.Quantum + - sdk/quota/Microsoft.Azure.Management.Quota - sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices - sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup - sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/AzSdk.RP.props b/sdk/quota/Microsoft.Azure.Management.Quota/AzSdk.RP.props new file mode 100644 index 000000000000..decade8a6467 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/AzSdk.RP.props @@ -0,0 +1,7 @@ + + + + Quota_2021-03-15-preview + $(PackageTags);$(CommonTags);$(AzureApiTag); + + \ No newline at end of file diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/Microsoft.Azure.Management.Quota.sln b/sdk/quota/Microsoft.Azure.Management.Quota/Microsoft.Azure.Management.Quota.sln new file mode 100644 index 000000000000..44945fd966c1 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/Microsoft.Azure.Management.Quota.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31702.278 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.Quota", "src\Microsoft.Azure.Management.Quota.csproj", "{04A6DCA5-7FB2-49B9-8108-1667DB3B7C89}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.Quota.Tests", "tests\Microsoft.Azure.Management.Quota.Tests.csproj", "{8CD42394-B471-44E6-AAA1-F00C85AE4A21}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {04A6DCA5-7FB2-49B9-8108-1667DB3B7C89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {04A6DCA5-7FB2-49B9-8108-1667DB3B7C89}.Debug|Any CPU.Build.0 = Debug|Any CPU + {04A6DCA5-7FB2-49B9-8108-1667DB3B7C89}.Release|Any CPU.ActiveCfg = Release|Any CPU + {04A6DCA5-7FB2-49B9-8108-1667DB3B7C89}.Release|Any CPU.Build.0 = Release|Any CPU + {8CD42394-B471-44E6-AAA1-F00C85AE4A21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8CD42394-B471-44E6-AAA1-F00C85AE4A21}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8CD42394-B471-44E6-AAA1-F00C85AE4A21}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8CD42394-B471-44E6-AAA1-F00C85AE4A21}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/AzureQuotaExtensionAPIClient.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/AzureQuotaExtensionAPIClient.cs new file mode 100644 index 000000000000..3543c9999370 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/AzureQuotaExtensionAPIClient.cs @@ -0,0 +1,375 @@ +// +// 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.Quota +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Serialization; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + + /// + /// Microsoft Azure Quota Resource Provider + /// + public partial class AzureQuotaExtensionAPIClient : ServiceClient, IAzureQuotaExtensionAPIClient, IAzureClient + { + /// + /// The base URI of the service. + /// + public System.Uri BaseUri { get; set; } + + /// + /// Gets or sets json serialization settings. + /// + public JsonSerializerSettings SerializationSettings { get; private set; } + + /// + /// Gets or sets json deserialization settings. + /// + public JsonSerializerSettings DeserializationSettings { get; private set; } + + /// + /// Credentials needed for the client to connect to Azure. + /// + public ServiceClientCredentials Credentials { get; private set; } + + /// + /// The API version to use for this operation. + /// + public string ApiVersion { get; private set; } + + /// + /// The preferred language for the response. + /// + public string AcceptLanguage { get; set; } + + /// + /// The retry timeout in seconds for Long Running Operations. Default value is + /// 30. + /// + public int? LongRunningOperationRetryTimeout { get; set; } + + /// + /// Whether a unique x-ms-client-request-id should be generated. When set to + /// true a unique x-ms-client-request-id value is generated and included in + /// each request. Default is true. + /// + public bool? GenerateClientRequestId { get; set; } + + /// + /// Gets the IUsagesOperations. + /// + public virtual IUsagesOperations Usages { get; private set; } + + /// + /// Gets the IQuotaOperations. + /// + public virtual IQuotaOperations Quota { get; private set; } + + /// + /// Gets the IQuotaRequestStatusOperations. + /// + public virtual IQuotaRequestStatusOperations QuotaRequestStatus { get; private set; } + + /// + /// Gets the IQuotaOperationOperations. + /// + public virtual IQuotaOperationOperations QuotaOperation { get; private set; } + + /// + /// Initializes a new instance of the AzureQuotaExtensionAPIClient class. + /// + /// + /// HttpClient to be used + /// + /// + /// True: will dispose the provided httpClient on calling AzureQuotaExtensionAPIClient.Dispose(). False: will not dispose provided httpClient + protected AzureQuotaExtensionAPIClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) + { + Initialize(); + } + + /// + /// Initializes a new instance of the AzureQuotaExtensionAPIClient class. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + protected AzureQuotaExtensionAPIClient(params DelegatingHandler[] handlers) : base(handlers) + { + Initialize(); + } + + /// + /// Initializes a new instance of the AzureQuotaExtensionAPIClient class. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + protected AzureQuotaExtensionAPIClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) + { + Initialize(); + } + + /// + /// Initializes a new instance of the AzureQuotaExtensionAPIClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + protected AzureQuotaExtensionAPIClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + BaseUri = baseUri; + } + + /// + /// Initializes a new instance of the AzureQuotaExtensionAPIClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + protected AzureQuotaExtensionAPIClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + BaseUri = baseUri; + } + + /// + /// Initializes a new instance of the AzureQuotaExtensionAPIClient class. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public AzureQuotaExtensionAPIClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the AzureQuotaExtensionAPIClient class. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// HttpClient to be used + /// + /// + /// True: will dispose the provided httpClient on calling AzureQuotaExtensionAPIClient.Dispose(). False: will not dispose provided httpClient + /// + /// Thrown when a required parameter is null + /// + public AzureQuotaExtensionAPIClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the AzureQuotaExtensionAPIClient class. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public AzureQuotaExtensionAPIClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the AzureQuotaExtensionAPIClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public AzureQuotaExtensionAPIClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + BaseUri = baseUri; + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the AzureQuotaExtensionAPIClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public AzureQuotaExtensionAPIClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + BaseUri = baseUri; + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// An optional partial-method to perform custom initialization. + /// + partial void CustomInitialize(); + /// + /// Initializes client properties. + /// + private void Initialize() + { + Usages = new UsagesOperations(this); + Quota = new QuotaOperations(this); + QuotaRequestStatus = new QuotaRequestStatusOperations(this); + QuotaOperation = new QuotaOperationOperations(this); + BaseUri = new System.Uri("https://management.azure.com"); + ApiVersion = "2021-03-15-preview"; + AcceptLanguage = "en-US"; + LongRunningOperationRetryTimeout = 30; + GenerateClientRequestId = true; + SerializationSettings = new JsonSerializerSettings + { + Formatting = Newtonsoft.Json.Formatting.Indented, + DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, + DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, + NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, + ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, + ContractResolver = new ReadOnlyJsonContractResolver(), + Converters = new List + { + new Iso8601TimeSpanConverter() + } + }; + SerializationSettings.Converters.Add(new TransformationJsonConverter()); + DeserializationSettings = new JsonSerializerSettings + { + DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, + DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, + NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, + ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, + ContractResolver = new ReadOnlyJsonContractResolver(), + Converters = new List + { + new Iso8601TimeSpanConverter() + } + }; + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("limitObjectType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("limitObjectType")); + CustomInitialize(); + DeserializationSettings.Converters.Add(new TransformationJsonConverter()); + DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); + } + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/IAzureQuotaExtensionAPIClient.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/IAzureQuotaExtensionAPIClient.cs new file mode 100644 index 000000000000..fea6e01517bb --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/IAzureQuotaExtensionAPIClient.cs @@ -0,0 +1,88 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Quota +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + + /// + /// Microsoft Azure Quota Resource Provider + /// + public partial interface IAzureQuotaExtensionAPIClient : System.IDisposable + { + /// + /// The base URI of the service. + /// + System.Uri BaseUri { get; set; } + + /// + /// Gets or sets json serialization settings. + /// + JsonSerializerSettings SerializationSettings { get; } + + /// + /// Gets or sets json deserialization settings. + /// + JsonSerializerSettings DeserializationSettings { get; } + + /// + /// Credentials needed for the client to connect to Azure. + /// + ServiceClientCredentials Credentials { get; } + + /// + /// The API version to use for this operation. + /// + string ApiVersion { get; } + + /// + /// The preferred language for the response. + /// + string AcceptLanguage { get; set; } + + /// + /// The retry timeout in seconds for Long Running Operations. Default + /// value is 30. + /// + int? LongRunningOperationRetryTimeout { get; set; } + + /// + /// Whether a unique x-ms-client-request-id should be generated. When + /// set to true a unique x-ms-client-request-id value is generated and + /// included in each request. Default is true. + /// + bool? GenerateClientRequestId { get; set; } + + + /// + /// Gets the IUsagesOperations. + /// + IUsagesOperations Usages { get; } + + /// + /// Gets the IQuotaOperations. + /// + IQuotaOperations Quota { get; } + + /// + /// Gets the IQuotaRequestStatusOperations. + /// + IQuotaRequestStatusOperations QuotaRequestStatus { get; } + + /// + /// Gets the IQuotaOperationOperations. + /// + IQuotaOperationOperations QuotaOperation { get; } + + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/IQuotaOperationOperations.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/IQuotaOperationOperations.cs new file mode 100644 index 000000000000..a0c8312799c8 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/IQuotaOperationOperations.cs @@ -0,0 +1,76 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Quota +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// QuotaOperationOperations operations. + /// + public partial interface IQuotaOperationOperations + { + /// + /// GET quota operations. + /// + /// + /// List all the operations supported by the Microsoft.Quota resource + /// provider. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// GET quota operations. + /// + /// + /// List all the operations supported by the Microsoft.Quota resource + /// provider. + /// + /// + /// 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/quota/Microsoft.Azure.Management.Quota/src/Generated/IQuotaOperations.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/IQuotaOperations.cs new file mode 100644 index 000000000000..d1f3de6435f7 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/IQuotaOperations.cs @@ -0,0 +1,296 @@ +// +// 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.Quota +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// QuotaOperations operations. + /// + public partial interface IQuotaOperations + { + /// + /// Get the quota limit of a resource. The response can be used to + /// determine the remaining quota to calculate a new quota limit that + /// can be submitted with a PUT request. + /// + /// + /// Resource name for a given resource provider. For example: + /// - SKU name for Microsoft.Compute + /// - SKU or TotalLowPriorityCores for + /// Microsoft.MachineLearningServices + /// For Microsoft.Network PublicIPAddresses. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. + /// If a `{resourceName}` is added after `/quotas`, then it's the + /// target Azure resource URI in the GET operation for the specific + /// resource. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceName, string scope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Create or update the quota limit for the specified resource with + /// the requested value. To update the quota, follow these steps: + /// 1. Use the GET operation for quotas and usages to determine how + /// much quota remains for the specific resource and to calculate the + /// new quota limit. These steps are detailed in [this + /// example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670). + /// 2. Use this PUT operation to update the quota limit. Please check + /// the URI in location header for the detailed status of the request. + /// + /// + /// Resource name for a given resource provider. For example: + /// - SKU name for Microsoft.Compute + /// - SKU or TotalLowPriorityCores for + /// Microsoft.MachineLearningServices + /// For Microsoft.Network PublicIPAddresses. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. + /// If a `{resourceName}` is added after `/quotas`, then it's the + /// target Azure resource URI in the GET operation for the specific + /// resource. + /// + /// + /// Quota properties for the specified resource, based on the API + /// called, Quotas or Usages. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceName, string scope, QuotaProperties properties = default(QuotaProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Update the quota limit for a specific resource to the specified + /// value: + /// 1. Use the Usages-GET and Quota-GET operations to determine the + /// remaining quota for the specific resource and to calculate the new + /// quota limit. These steps are detailed in [this + /// example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670). + /// 2. Use this PUT operation to update the quota limit. Please check + /// the URI in location header for the detailed status of the request. + /// + /// + /// Resource name for a given resource provider. For example: + /// - SKU name for Microsoft.Compute + /// - SKU or TotalLowPriorityCores for + /// Microsoft.MachineLearningServices + /// For Microsoft.Network PublicIPAddresses. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. + /// If a `{resourceName}` is added after `/quotas`, then it's the + /// target Azure resource URI in the GET operation for the specific + /// resource. + /// + /// + /// Quota properties for the specified resource, based on the API + /// called, Quotas or Usages. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> UpdateWithHttpMessagesAsync(string resourceName, string scope, QuotaProperties properties = default(QuotaProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get a list of current quota limits of all resources for the + /// specified scope. The response from this GET operation can be + /// leveraged to submit requests to update a quota. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. + /// If a `{resourceName}` is added after `/quotas`, then it's the + /// target Azure resource URI in the GET operation for the specific + /// resource. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task,QuotaListHeaders>> ListWithHttpMessagesAsync(string scope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Create or update the quota limit for the specified resource with + /// the requested value. To update the quota, follow these steps: + /// 1. Use the GET operation for quotas and usages to determine how + /// much quota remains for the specific resource and to calculate the + /// new quota limit. These steps are detailed in [this + /// example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670). + /// 2. Use this PUT operation to update the quota limit. Please check + /// the URI in location header for the detailed status of the request. + /// + /// + /// Resource name for a given resource provider. For example: + /// - SKU name for Microsoft.Compute + /// - SKU or TotalLowPriorityCores for + /// Microsoft.MachineLearningServices + /// For Microsoft.Network PublicIPAddresses. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. + /// If a `{resourceName}` is added after `/quotas`, then it's the + /// target Azure resource URI in the GET operation for the specific + /// resource. + /// + /// + /// Quota properties for the specified resource, based on the API + /// called, Quotas or Usages. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceName, string scope, QuotaProperties properties = default(QuotaProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Update the quota limit for a specific resource to the specified + /// value: + /// 1. Use the Usages-GET and Quota-GET operations to determine the + /// remaining quota for the specific resource and to calculate the new + /// quota limit. These steps are detailed in [this + /// example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670). + /// 2. Use this PUT operation to update the quota limit. Please check + /// the URI in location header for the detailed status of the request. + /// + /// + /// Resource name for a given resource provider. For example: + /// - SKU name for Microsoft.Compute + /// - SKU or TotalLowPriorityCores for + /// Microsoft.MachineLearningServices + /// For Microsoft.Network PublicIPAddresses. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. + /// If a `{resourceName}` is added after `/quotas`, then it's the + /// target Azure resource URI in the GET operation for the specific + /// resource. + /// + /// + /// Quota properties for the specified resource, based on the API + /// called, Quotas or Usages. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginUpdateWithHttpMessagesAsync(string resourceName, string scope, QuotaProperties properties = default(QuotaProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get a list of current quota limits of all resources for the + /// specified scope. The response from this GET operation can be + /// leveraged to submit requests to update a quota. + /// + /// + /// 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,QuotaListHeaders>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/IQuotaRequestStatusOperations.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/IQuotaRequestStatusOperations.cs new file mode 100644 index 000000000000..af90f76cd1ae --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/IQuotaRequestStatusOperations.cs @@ -0,0 +1,130 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Quota +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// QuotaRequestStatusOperations operations. + /// + public partial interface IQuotaRequestStatusOperations + { + /// + /// Get the quota request details and status by quota request ID for + /// the resources of the resource provider at a specific location. The + /// quota request ID **id** is returned in the response of the PUT + /// operation. + /// + /// + /// Quota request ID. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. + /// If a `{resourceName}` is added after `/quotas`, then it's the + /// target Azure resource URI in the GET operation for the specific + /// resource. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string id, string scope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// For the specified scope, get the current quota requests for a one + /// year period ending at the time is made. Use the **oData** filter to + /// select quota requests. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. + /// If a `{resourceName}` is added after `/quotas`, then it's the + /// target Azure resource URI in the GET operation for the specific + /// resource. + /// + /// + /// | Field | Supported operators + /// |---------------------|------------------------ + /// + /// |requestSubmitTime | ge, le, eq, gt, lt + /// |provisioningState eq {QuotaRequestState} + /// |resourceName eq {resourceName} + /// + /// + /// Number of records to return. + /// + /// + /// The **Skiptoken** parameter is used only if a previous operation + /// returned a partial result. If a previous response contains a + /// **nextLink** element, its value includes a **skiptoken** parameter + /// that specifies a starting point to use for subsequent calls. + /// + /// + /// 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 scope, string filter = default(string), int? top = default(int?), string skiptoken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// For the specified scope, get the current quota requests for a one + /// year period ending at the time is made. Use the **oData** filter to + /// select quota requests. + /// + /// + /// 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/quota/Microsoft.Azure.Management.Quota/src/Generated/IUsagesOperations.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/IUsagesOperations.cs new file mode 100644 index 000000000000..8949f6ec3f93 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/IUsagesOperations.cs @@ -0,0 +1,112 @@ +// +// 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.Quota +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// UsagesOperations operations. + /// + public partial interface IUsagesOperations + { + /// + /// Get the current usage of a resource. + /// + /// + /// Resource name for a given resource provider. For example: + /// - SKU name for Microsoft.Compute + /// - SKU or TotalLowPriorityCores for + /// Microsoft.MachineLearningServices + /// For Microsoft.Network PublicIPAddresses. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. + /// If a `{resourceName}` is added after `/quotas`, then it's the + /// target Azure resource URI in the GET operation for the specific + /// resource. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceName, string scope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get a list of current usage for all resources for the scope + /// specified. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. + /// If a `{resourceName}` is added after `/quotas`, then it's the + /// target Azure resource URI in the GET operation for the specific + /// resource. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task,UsagesListHeaders>> ListWithHttpMessagesAsync(string scope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get a list of current usage for all resources for the scope + /// specified. + /// + /// + /// 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,UsagesListHeaders>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/CommonResourceProperties.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/CommonResourceProperties.cs new file mode 100644 index 000000000000..39cc959102f6 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/CommonResourceProperties.cs @@ -0,0 +1,68 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Quota.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Resource properties. + /// + public partial class CommonResourceProperties + { + /// + /// Initializes a new instance of the CommonResourceProperties class. + /// + public CommonResourceProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CommonResourceProperties class. + /// + /// Resource ID + /// Resource name. + /// Resource type. Example: + /// "Microsoft.Quota/quotas" + public CommonResourceProperties(string id = default(string), string name = default(string), string type = default(string)) + { + Id = id; + Name = name; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets resource ID + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets resource name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets resource type. Example: "Microsoft.Quota/quotas" + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/CreateGenericQuotaRequestParameters.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/CreateGenericQuotaRequestParameters.cs new file mode 100644 index 000000000000..1449245e77ca --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/CreateGenericQuotaRequestParameters.cs @@ -0,0 +1,55 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Quota.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Quota change requests information. + /// + public partial class CreateGenericQuotaRequestParameters + { + /// + /// Initializes a new instance of the + /// CreateGenericQuotaRequestParameters class. + /// + public CreateGenericQuotaRequestParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// CreateGenericQuotaRequestParameters class. + /// + /// Quota change requests. + public CreateGenericQuotaRequestParameters(IList value = default(IList)) + { + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets quota change requests. + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/CurrentQuotaLimitBase.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/CurrentQuotaLimitBase.cs new file mode 100644 index 000000000000..2b424e004fa2 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/CurrentQuotaLimitBase.cs @@ -0,0 +1,79 @@ +// +// 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.Quota.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Quota limit. + /// + public partial class CurrentQuotaLimitBase : IResource + { + /// + /// Initializes a new instance of the CurrentQuotaLimitBase class. + /// + public CurrentQuotaLimitBase() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CurrentQuotaLimitBase class. + /// + /// The resource ID. + /// The resource type. + /// The resource name. + /// Quota properties for the specified + /// resource, based on the API called, Quotas or Usages. + public CurrentQuotaLimitBase(string id = default(string), string type = default(string), string name = default(string), QuotaProperties properties = default(QuotaProperties)) + { + Id = id; + Type = type; + Name = name; + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the resource ID. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets the resource type. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + /// + /// Gets the resource name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets or sets quota properties for the specified resource, based on + /// the API called, Quotas or Usages. + /// + [JsonProperty(PropertyName = "properties")] + public QuotaProperties Properties { get; set; } + + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/CurrentUsagesBase.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/CurrentUsagesBase.cs new file mode 100644 index 000000000000..c32c11b2a87e --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/CurrentUsagesBase.cs @@ -0,0 +1,91 @@ +// +// 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.Quota.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Resource usage. + /// + public partial class CurrentUsagesBase : IResource + { + /// + /// Initializes a new instance of the CurrentUsagesBase class. + /// + public CurrentUsagesBase() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CurrentUsagesBase class. + /// + /// The resource ID. + /// The resource type. + /// The resource name. + /// Usage properties for the specified + /// resource. + public CurrentUsagesBase(string id = default(string), string type = default(string), string name = default(string), UsagesProperties properties = default(UsagesProperties)) + { + Id = id; + Type = type; + Name = name; + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the resource ID. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets the resource type. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + /// + /// Gets the resource name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets or sets usage properties for the specified resource. + /// + [JsonProperty(PropertyName = "properties")] + public UsagesProperties Properties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Properties != null) + { + Properties.Validate(); + } + } + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/ExceptionResponse.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/ExceptionResponse.cs new file mode 100644 index 000000000000..ef78bc21ceca --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/ExceptionResponse.cs @@ -0,0 +1,51 @@ +// +// 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.Quota.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Error. + /// + public partial class ExceptionResponse + { + /// + /// Initializes a new instance of the ExceptionResponse class. + /// + public ExceptionResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ExceptionResponse class. + /// + /// API error details. + public ExceptionResponse(ServiceError error = default(ServiceError)) + { + Error = error; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets API error details. + /// + [JsonProperty(PropertyName = "error")] + public ServiceError Error { get; set; } + + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/ExceptionResponseException.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/ExceptionResponseException.cs new file mode 100644 index 000000000000..702332e97dc5 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/ExceptionResponseException.cs @@ -0,0 +1,62 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Quota.Models +{ + using Microsoft.Rest; + + /// + /// Exception thrown for an invalid response with ExceptionResponse + /// information. + /// + public partial class ExceptionResponseException : RestException + { + /// + /// Gets information about the associated HTTP request. + /// + public HttpRequestMessageWrapper Request { get; set; } + + /// + /// Gets information about the associated HTTP response. + /// + public HttpResponseMessageWrapper Response { get; set; } + + /// + /// Gets or sets the body object. + /// + public ExceptionResponse Body { get; set; } + + /// + /// Initializes a new instance of the ExceptionResponseException class. + /// + public ExceptionResponseException() + { + } + + /// + /// Initializes a new instance of the ExceptionResponseException class. + /// + /// The exception message. + public ExceptionResponseException(string message) + : this(message, null) + { + } + + /// + /// Initializes a new instance of the ExceptionResponseException class. + /// + /// The exception message. + /// Inner exception. + public ExceptionResponseException(string message, System.Exception innerException) + : base(message, innerException) + { + } + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/LimitJsonObject.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/LimitJsonObject.cs new file mode 100644 index 000000000000..a3e7487b8fab --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/LimitJsonObject.cs @@ -0,0 +1,35 @@ +// +// 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.Quota.Models +{ + using System.Linq; + + /// + /// LimitJson abstract class. + /// + public partial class LimitJsonObject + { + /// + /// Initializes a new instance of the LimitJsonObject class. + /// + public LimitJsonObject() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/LimitObject.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/LimitObject.cs new file mode 100644 index 000000000000..3fd90c827068 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/LimitObject.cs @@ -0,0 +1,70 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Quota.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The resource quota limit value. + /// + [Newtonsoft.Json.JsonObject("LimitValue")] + public partial class LimitObject : LimitJsonObject + { + /// + /// Initializes a new instance of the LimitObject class. + /// + public LimitObject() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LimitObject class. + /// + /// The quota/limit value + /// Possible values include: 'Independent', + /// 'Shared' + public LimitObject(int value, string limitType = default(string)) + { + Value = value; + LimitType = limitType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the quota/limit value + /// + [JsonProperty(PropertyName = "value")] + public int Value { get; set; } + + /// + /// Gets or sets possible values include: 'Independent', 'Shared' + /// + [JsonProperty(PropertyName = "limitType")] + public string LimitType { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + } + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/LimitType.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/LimitType.cs new file mode 100644 index 000000000000..e243c3112f14 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/LimitType.cs @@ -0,0 +1,21 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Quota.Models +{ + + /// + /// Defines values for LimitType. + /// + public static class LimitType + { + public const string LimitValue = "LimitValue"; + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/OperationDisplay.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/OperationDisplay.cs new file mode 100644 index 000000000000..704a943a8583 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/OperationDisplay.cs @@ -0,0 +1,72 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Quota.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class OperationDisplay + { + /// + /// Initializes a new instance of the OperationDisplay class. + /// + public OperationDisplay() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OperationDisplay class. + /// + /// Provider name. + /// Resource name. + /// Operation name. + /// Operation description. + public OperationDisplay(string provider = default(string), string resource = default(string), string operation = default(string), string description = default(string)) + { + Provider = provider; + Resource = resource; + Operation = operation; + Description = description; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets provider name. + /// + [JsonProperty(PropertyName = "provider")] + public string Provider { get; set; } + + /// + /// Gets or sets resource name. + /// + [JsonProperty(PropertyName = "resource")] + public string Resource { get; set; } + + /// + /// Gets or sets operation name. + /// + [JsonProperty(PropertyName = "operation")] + public string Operation { get; set; } + + /// + /// Gets or sets operation description. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/OperationResponse.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/OperationResponse.cs new file mode 100644 index 000000000000..8aa37d5c5a87 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/OperationResponse.cs @@ -0,0 +1,58 @@ +// +// 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.Quota.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class OperationResponse + { + /// + /// Initializes a new instance of the OperationResponse class. + /// + public OperationResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OperationResponse class. + /// + public OperationResponse(string name = default(string), OperationDisplay display = default(OperationDisplay), string origin = default(string)) + { + Name = name; + Display = display; + Origin = origin; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// + [JsonProperty(PropertyName = "display")] + public OperationDisplay Display { get; set; } + + /// + /// + [JsonProperty(PropertyName = "origin")] + public string Origin { get; set; } + + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/Page.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/Page.cs new file mode 100644 index 000000000000..6a9f464aa301 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/Page.cs @@ -0,0 +1,53 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Quota.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + + /// + /// Defines a page in Azure responses. + /// + /// Type of the page content items + [JsonObject] + public class Page : IPage + { + /// + /// Gets the link to the next page. + /// + [JsonProperty("nextLink")] + public string NextPageLink { get; private set; } + + [JsonProperty("value")] + private IList Items{ get; set; } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + public IEnumerator GetEnumerator() + { + return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaGetHeaders.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaGetHeaders.cs new file mode 100644 index 000000000000..f9fec318d07c --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaGetHeaders.cs @@ -0,0 +1,53 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Quota.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for Get operation. + /// + public partial class QuotaGetHeaders + { + /// + /// Initializes a new instance of the QuotaGetHeaders class. + /// + public QuotaGetHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the QuotaGetHeaders class. + /// + /// Current entity state version. Should be treated + /// as opaque and used to make conditional HTTP requests. + public QuotaGetHeaders(string eTag = default(string)) + { + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current entity state version. Should be treated as + /// opaque and used to make conditional HTTP requests. + /// + [JsonProperty(PropertyName = "ETag")] + public string ETag { get; set; } + + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaLimitTypes.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaLimitTypes.cs new file mode 100644 index 000000000000..840ba313f775 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaLimitTypes.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Quota.Models +{ + + /// + /// Defines values for QuotaLimitTypes. + /// + public static class QuotaLimitTypes + { + public const string Independent = "Independent"; + public const string Shared = "Shared"; + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaLimitsResponse.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaLimitsResponse.cs new file mode 100644 index 000000000000..113dad9e0a98 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaLimitsResponse.cs @@ -0,0 +1,64 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Quota.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Quota limits request response. + /// + public partial class QuotaLimitsResponse + { + /// + /// Initializes a new instance of the QuotaLimitsResponse class. + /// + public QuotaLimitsResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the QuotaLimitsResponse class. + /// + /// List of quota limits with the quota request + /// status. + /// The URI used to fetch the next page of quota + /// limits. When there are no more pages, this is null. + public QuotaLimitsResponse(IList value = default(IList), string nextLink = default(string)) + { + Value = value; + NextLink = nextLink; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets list of quota limits with the quota request status. + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + /// + /// Gets or sets the URI used to fetch the next page of quota limits. + /// When there are no more pages, this is null. + /// + [JsonProperty(PropertyName = "nextLink")] + public string NextLink { get; set; } + + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaListHeaders.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaListHeaders.cs new file mode 100644 index 000000000000..8ddd751b666c --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaListHeaders.cs @@ -0,0 +1,53 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Quota.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for List operation. + /// + public partial class QuotaListHeaders + { + /// + /// Initializes a new instance of the QuotaListHeaders class. + /// + public QuotaListHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the QuotaListHeaders class. + /// + /// Current entity state version. Should be treated + /// as opaque and used to make conditional HTTP requests. + public QuotaListHeaders(string eTag = default(string)) + { + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current entity state version. Should be treated as + /// opaque and used to make conditional HTTP requests. + /// + [JsonProperty(PropertyName = "ETag")] + public string ETag { get; set; } + + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaProperties.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaProperties.cs new file mode 100644 index 000000000000..7fc723d6b14c --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaProperties.cs @@ -0,0 +1,120 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Quota.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Quota properties for the specified resource. + /// + public partial class QuotaProperties + { + /// + /// Initializes a new instance of the QuotaProperties class. + /// + public QuotaProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the QuotaProperties class. + /// + /// Resource quota limit properties. + /// The quota units, such as Count and Bytes. When + /// requesting quota, use the **unit** value returned in the GET + /// response in the request body of your PUT operation. + /// Resource name provided by the resource provider. + /// Use this property name when requesting quota. + /// Resource type name. + /// The time period over which the quota + /// usage values are summarized. For example: + /// *P1D (per one day) + /// *PT1M (per one minute) + /// *PT1S (per one second). + /// This parameter is optional because, for some resources like + /// compute, the period is irrelevant. + /// States if quota can be requested + /// for this resource. + /// Additional properties for the specific + /// resource provider. + public QuotaProperties(LimitJsonObject limit = default(LimitJsonObject), string unit = default(string), ResourceName name = default(ResourceName), string resourceType = default(string), string quotaPeriod = default(string), bool? isQuotaApplicable = default(bool?), object properties = default(object)) + { + Limit = limit; + Unit = unit; + Name = name; + ResourceType = resourceType; + QuotaPeriod = quotaPeriod; + IsQuotaApplicable = isQuotaApplicable; + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets resource quota limit properties. + /// + [JsonProperty(PropertyName = "limit")] + public LimitJsonObject Limit { get; set; } + + /// + /// Gets The quota units, such as Count and Bytes. When requesting + /// quota, use the **unit** value returned in the GET response in the + /// request body of your PUT operation. + /// + [JsonProperty(PropertyName = "unit")] + public string Unit { get; private set; } + + /// + /// Gets or sets resource name provided by the resource provider. Use + /// this property name when requesting quota. + /// + [JsonProperty(PropertyName = "name")] + public ResourceName Name { get; set; } + + /// + /// Gets or sets resource type name. + /// + [JsonProperty(PropertyName = "resourceType")] + public string ResourceType { get; set; } + + /// + /// Gets the time period over which the quota usage values are + /// summarized. For example: + /// *P1D (per one day) + /// *PT1M (per one minute) + /// *PT1S (per one second). + /// This parameter is optional because, for some resources like + /// compute, the period is irrelevant. + /// + [JsonProperty(PropertyName = "quotaPeriod")] + public string QuotaPeriod { get; private set; } + + /// + /// Gets states if quota can be requested for this resource. + /// + [JsonProperty(PropertyName = "isQuotaApplicable")] + public bool? IsQuotaApplicable { get; private set; } + + /// + /// Gets or sets additional properties for the specific resource + /// provider. + /// + [JsonProperty(PropertyName = "properties")] + public object Properties { get; set; } + + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaRequestDetails.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaRequestDetails.cs new file mode 100644 index 000000000000..14edcf57d27e --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaRequestDetails.cs @@ -0,0 +1,119 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Quota.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// List of quota requests with details. + /// + [Rest.Serialization.JsonTransformation] + public partial class QuotaRequestDetails + { + /// + /// Initializes a new instance of the QuotaRequestDetails class. + /// + public QuotaRequestDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the QuotaRequestDetails class. + /// + /// Quota request ID. + /// Quota request name. + /// Resource type. "Microsoft.Quota/quotas". + /// The quota request status. Possible + /// values include: 'Accepted', 'Invalid', 'Succeeded', 'Failed', + /// 'InProgress' + /// User-friendly status message. + /// Error details of the quota request. + /// The quota request submission time. + /// The date conforms to the following format specified by the ISO 8601 + /// standard: yyyy-MM-ddTHH:mm:ssZ + /// Quota request details. + public QuotaRequestDetails(string id = default(string), string name = default(string), string type = default(string), string provisioningState = default(string), string message = default(string), ServiceErrorDetail error = default(ServiceErrorDetail), System.DateTime? requestSubmitTime = default(System.DateTime?), IList value = default(IList)) + { + Id = id; + Name = name; + Type = type; + ProvisioningState = provisioningState; + Message = message; + Error = error; + RequestSubmitTime = requestSubmitTime; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets quota request ID. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets quota request name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets resource type. "Microsoft.Quota/quotas". + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + /// + /// Gets or sets the quota request status. Possible values include: + /// 'Accepted', 'Invalid', 'Succeeded', 'Failed', 'InProgress' + /// + [JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState { get; set; } + + /// + /// Gets user-friendly status message. + /// + [JsonProperty(PropertyName = "properties.message")] + public string Message { get; private set; } + + /// + /// Gets or sets error details of the quota request. + /// + [JsonProperty(PropertyName = "properties.error")] + public ServiceErrorDetail Error { get; set; } + + /// + /// Gets the quota request submission time. The date conforms to the + /// following format specified by the ISO 8601 standard: + /// yyyy-MM-ddTHH:mm:ssZ + /// + [JsonProperty(PropertyName = "properties.requestSubmitTime")] + public System.DateTime? RequestSubmitTime { get; private set; } + + /// + /// Gets or sets quota request details. + /// + [JsonProperty(PropertyName = "properties.value")] + public IList Value { get; set; } + + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaRequestOneResourceSubmitResponse.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaRequestOneResourceSubmitResponse.cs new file mode 100644 index 000000000000..daacdafcfd5d --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaRequestOneResourceSubmitResponse.cs @@ -0,0 +1,211 @@ +// +// 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.Quota.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Quota request response. + /// + [Rest.Serialization.JsonTransformation] + public partial class QuotaRequestOneResourceSubmitResponse : IResource + { + /// + /// Initializes a new instance of the + /// QuotaRequestOneResourceSubmitResponse class. + /// + public QuotaRequestOneResourceSubmitResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// QuotaRequestOneResourceSubmitResponse class. + /// + /// Quota request ID. + /// The name of the quota request. + /// Resource type. + /// "Microsoft.Quota/ServiceLimitRequests" + /// Quota request status. Possible + /// values include: 'Accepted', 'Invalid', 'Succeeded', 'Failed', + /// 'InProgress' + /// User-friendly status message. + /// Quota request submission time. The + /// date conforms to the following ISO 8601 standard format: + /// yyyy-MM-ddTHH:mm:ssZ. + /// Resource quota limit properties. + /// Usage information for the current + /// resource. + /// The quota limit units, such as Count and Bytes. + /// When requesting quota, use the **unit** value returned in the GET + /// response in the request body of your PUT operation. + /// Resource name provided by the resource + /// provider. Use this property name when requesting quota. + /// Resource type name. + /// The time period over which the quota + /// usage values are summarized. For example: + /// *P1D (per one day) + /// *PT1M (per one minute) + /// *PT1S (per one second). + /// This parameter is optional because, for some resources like + /// compute, the period is irrelevant. + /// States if quota can be requested + /// for this resource. + /// Error details of the quota request. + /// Additional properties for the specific + /// resource provider. + public QuotaRequestOneResourceSubmitResponse(string id = default(string), string name = default(string), string type = default(string), string provisioningState = default(string), string message = default(string), System.DateTime? requestSubmitTime = default(System.DateTime?), LimitObject limit = default(LimitObject), int? currentValue = default(int?), string unit = default(string), ResourceName name1 = default(ResourceName), string resourceType = default(string), string quotaPeriod = default(string), bool? isQuotaApplicable = default(bool?), ServiceErrorDetail error = default(ServiceErrorDetail), object properties = default(object)) + { + Id = id; + Name = name; + Type = type; + ProvisioningState = provisioningState; + Message = message; + RequestSubmitTime = requestSubmitTime; + Limit = limit; + CurrentValue = currentValue; + Unit = unit; + Name1 = name1; + ResourceType = resourceType; + QuotaPeriod = quotaPeriod; + IsQuotaApplicable = isQuotaApplicable; + Error = error; + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets quota request ID. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets the name of the quota request. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets resource type. "Microsoft.Quota/ServiceLimitRequests" + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + /// + /// Gets quota request status. Possible values include: 'Accepted', + /// 'Invalid', 'Succeeded', 'Failed', 'InProgress' + /// + [JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState { get; private set; } + + /// + /// Gets user-friendly status message. + /// + [JsonProperty(PropertyName = "properties.message")] + public string Message { get; private set; } + + /// + /// Gets quota request submission time. The date conforms to the + /// following ISO 8601 standard format: yyyy-MM-ddTHH:mm:ssZ. + /// + [JsonProperty(PropertyName = "properties.requestSubmitTime")] + public System.DateTime? RequestSubmitTime { get; private set; } + + /// + /// Gets or sets resource quota limit properties. + /// + [JsonProperty(PropertyName = "properties.limit")] + public LimitObject Limit { get; set; } + + /// + /// Gets usage information for the current resource. + /// + [JsonProperty(PropertyName = "properties.currentValue")] + public int? CurrentValue { get; private set; } + + /// + /// Gets or sets The quota limit units, such as Count and Bytes. When + /// requesting quota, use the **unit** value returned in the GET + /// response in the request body of your PUT operation. + /// + [JsonProperty(PropertyName = "properties.unit")] + public string Unit { get; set; } + + /// + /// Gets or sets resource name provided by the resource provider. Use + /// this property name when requesting quota. + /// + [JsonProperty(PropertyName = "properties.name")] + public ResourceName Name1 { get; set; } + + /// + /// Gets or sets resource type name. + /// + [JsonProperty(PropertyName = "properties.resourceType")] + public string ResourceType { get; set; } + + /// + /// Gets the time period over which the quota usage values are + /// summarized. For example: + /// *P1D (per one day) + /// *PT1M (per one minute) + /// *PT1S (per one second). + /// This parameter is optional because, for some resources like + /// compute, the period is irrelevant. + /// + [JsonProperty(PropertyName = "properties.quotaPeriod")] + public string QuotaPeriod { get; private set; } + + /// + /// Gets states if quota can be requested for this resource. + /// + [JsonProperty(PropertyName = "properties.isQuotaApplicable")] + public bool? IsQuotaApplicable { get; private set; } + + /// + /// Gets or sets error details of the quota request. + /// + [JsonProperty(PropertyName = "properties.error")] + public ServiceErrorDetail Error { get; set; } + + /// + /// Gets or sets additional properties for the specific resource + /// provider. + /// + [JsonProperty(PropertyName = "properties.properties")] + public object Properties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Limit != null) + { + Limit.Validate(); + } + } + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaRequestProperties.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaRequestProperties.cs new file mode 100644 index 000000000000..b3fc2dae3457 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaRequestProperties.cs @@ -0,0 +1,92 @@ +// +// 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.Quota.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Quota request properties. + /// + public partial class QuotaRequestProperties + { + /// + /// Initializes a new instance of the QuotaRequestProperties class. + /// + public QuotaRequestProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the QuotaRequestProperties class. + /// + /// The quota request status. Possible + /// values include: 'Accepted', 'Invalid', 'Succeeded', 'Failed', + /// 'InProgress' + /// User-friendly status message. + /// Error details of the quota request. + /// The quota request submission time. + /// The date conforms to the following format specified by the ISO 8601 + /// standard: yyyy-MM-ddTHH:mm:ssZ + /// Quota request details. + public QuotaRequestProperties(string provisioningState = default(string), string message = default(string), ServiceErrorDetail error = default(ServiceErrorDetail), System.DateTime? requestSubmitTime = default(System.DateTime?), IList value = default(IList)) + { + ProvisioningState = provisioningState; + Message = message; + Error = error; + RequestSubmitTime = requestSubmitTime; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the quota request status. Possible values include: + /// 'Accepted', 'Invalid', 'Succeeded', 'Failed', 'InProgress' + /// + [JsonProperty(PropertyName = "provisioningState")] + public string ProvisioningState { get; set; } + + /// + /// Gets user-friendly status message. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; private set; } + + /// + /// Gets or sets error details of the quota request. + /// + [JsonProperty(PropertyName = "error")] + public ServiceErrorDetail Error { get; set; } + + /// + /// Gets the quota request submission time. The date conforms to the + /// following format specified by the ISO 8601 standard: + /// yyyy-MM-ddTHH:mm:ssZ + /// + [JsonProperty(PropertyName = "requestSubmitTime")] + public System.DateTime? RequestSubmitTime { get; private set; } + + /// + /// Gets or sets quota request details. + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaRequestState.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaRequestState.cs new file mode 100644 index 000000000000..b0905304a563 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaRequestState.cs @@ -0,0 +1,25 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Quota.Models +{ + + /// + /// Defines values for QuotaRequestState. + /// + public static class QuotaRequestState + { + public const string Accepted = "Accepted"; + public const string Invalid = "Invalid"; + public const string Succeeded = "Succeeded"; + public const string Failed = "Failed"; + public const string InProgress = "InProgress"; + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaRequestSubmitResponse.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaRequestSubmitResponse.cs new file mode 100644 index 000000000000..e88c700f7dd8 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaRequestSubmitResponse.cs @@ -0,0 +1,77 @@ +// +// 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.Quota.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Quota request response. + /// + public partial class QuotaRequestSubmitResponse : IResource + { + /// + /// Initializes a new instance of the QuotaRequestSubmitResponse class. + /// + public QuotaRequestSubmitResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the QuotaRequestSubmitResponse class. + /// + /// Quota request ID. + /// Quota request name. + /// Quota request details. + /// Resource type. "Microsoft.Quota/quotas". + public QuotaRequestSubmitResponse(string id = default(string), string name = default(string), QuotaRequestProperties properties = default(QuotaRequestProperties), string type = default(string)) + { + Id = id; + Name = name; + Properties = properties; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets quota request ID. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets quota request name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets or sets quota request details. + /// + [JsonProperty(PropertyName = "properties")] + public QuotaRequestProperties Properties { get; set; } + + /// + /// Gets resource type. "Microsoft.Quota/quotas". + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaRequestSubmitResponse202.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaRequestSubmitResponse202.cs new file mode 100644 index 000000000000..7680065f9dae --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/QuotaRequestSubmitResponse202.cs @@ -0,0 +1,178 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Quota.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The quota request response with the quota request ID. + /// + [Rest.Serialization.JsonTransformation] + public partial class QuotaRequestSubmitResponse202 + { + /// + /// Initializes a new instance of the QuotaRequestSubmitResponse202 + /// class. + /// + public QuotaRequestSubmitResponse202() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the QuotaRequestSubmitResponse202 + /// class. + /// + /// The quota request ID. To check the request status, + /// use the **id** value in a [Quota Request + /// Status](https://docs.microsoft.com/en-us/rest/api/reserved-vm-instances/quotarequeststatus/get) + /// GET operation. + /// Operation ID. + /// Resource type. + /// Quota request status. Possible + /// values include: 'Accepted', 'Invalid', 'Succeeded', 'Failed', + /// 'InProgress' + /// User-friendly message. + /// Resource quota limit properties. + /// The quota limit units, such as Count and Bytes. + /// When requesting quota, use the **unit** value returned in the GET + /// response in the request body of your PUT operation. + /// Resource name provided by the resource + /// provider. Use this property name when requesting quota. + /// Resource type name. + /// The time period over which the quota + /// usage values are summarized. For example: + /// *P1D (per one day) + /// *PT1M (per one minute) + /// *PT1S (per one second). + /// This parameter is optional because, for some resources like + /// compute, the period is irrelevant. + /// Additional properties for the specific + /// resource provider. + public QuotaRequestSubmitResponse202(string id = default(string), string name = default(string), string type = default(string), string provisioningState = default(string), string message = default(string), LimitObject limit = default(LimitObject), string unit = default(string), ResourceName name1 = default(ResourceName), string resourceType = default(string), string quotaPeriod = default(string), object properties = default(object)) + { + Id = id; + Name = name; + Type = type; + ProvisioningState = provisioningState; + Message = message; + Limit = limit; + Unit = unit; + Name1 = name1; + ResourceType = resourceType; + QuotaPeriod = quotaPeriod; + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the quota request ID. To check the request status, use the + /// **id** value in a [Quota Request + /// Status](https://docs.microsoft.com/en-us/rest/api/reserved-vm-instances/quotarequeststatus/get) + /// GET operation. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets operation ID. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets resource type. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + /// + /// Gets quota request status. Possible values include: 'Accepted', + /// 'Invalid', 'Succeeded', 'Failed', 'InProgress' + /// + [JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState { get; private set; } + + /// + /// Gets user-friendly message. + /// + [JsonProperty(PropertyName = "properties.message")] + public string Message { get; private set; } + + /// + /// Gets or sets resource quota limit properties. + /// + [JsonProperty(PropertyName = "properties.limit")] + public LimitObject Limit { get; set; } + + /// + /// Gets or sets The quota limit units, such as Count and Bytes. When + /// requesting quota, use the **unit** value returned in the GET + /// response in the request body of your PUT operation. + /// + [JsonProperty(PropertyName = "properties.unit")] + public string Unit { get; set; } + + /// + /// Gets or sets resource name provided by the resource provider. Use + /// this property name when requesting quota. + /// + [JsonProperty(PropertyName = "properties.name")] + public ResourceName Name1 { get; set; } + + /// + /// Gets or sets resource type name. + /// + [JsonProperty(PropertyName = "properties.resourceType")] + public string ResourceType { get; set; } + + /// + /// Gets the time period over which the quota usage values are + /// summarized. For example: + /// *P1D (per one day) + /// *PT1M (per one minute) + /// *PT1S (per one second). + /// This parameter is optional because, for some resources like + /// compute, the period is irrelevant. + /// + [JsonProperty(PropertyName = "properties.quotaPeriod")] + public string QuotaPeriod { get; private set; } + + /// + /// Gets or sets additional properties for the specific resource + /// provider. + /// + [JsonProperty(PropertyName = "properties.properties")] + public object Properties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Limit != null) + { + Limit.Validate(); + } + } + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/ResourceName.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/ResourceName.cs new file mode 100644 index 000000000000..b02e2950cdc9 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/ResourceName.cs @@ -0,0 +1,60 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Quota.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Name of the resource provided by the resource Provider. When requesting + /// quota, use this property name. + /// + public partial class ResourceName + { + /// + /// Initializes a new instance of the ResourceName class. + /// + public ResourceName() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ResourceName class. + /// + /// Resource name. + /// Resource display name. + public ResourceName(string value = default(string), string localizedValue = default(string)) + { + Value = value; + LocalizedValue = localizedValue; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets resource name. + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; set; } + + /// + /// Gets resource display name. + /// + [JsonProperty(PropertyName = "localizedValue")] + public string LocalizedValue { get; private set; } + + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/ServiceError.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/ServiceError.cs new file mode 100644 index 000000000000..33f4c6a2a8c5 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/ServiceError.cs @@ -0,0 +1,69 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Quota.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// API error details. + /// + public partial class ServiceError + { + /// + /// Initializes a new instance of the ServiceError class. + /// + public ServiceError() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ServiceError class. + /// + /// Error code. + /// Error message. + /// List of error details. + public ServiceError(string code = default(string), string message = default(string), IList details = default(IList)) + { + Code = code; + Message = message; + Details = details; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets error code. + /// + [JsonProperty(PropertyName = "code")] + public string Code { get; set; } + + /// + /// Gets or sets error message. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + /// + /// Gets list of error details. + /// + [JsonProperty(PropertyName = "details")] + public IList Details { get; private set; } + + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/ServiceErrorDetail.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/ServiceErrorDetail.cs new file mode 100644 index 000000000000..b1ca8ace555a --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/ServiceErrorDetail.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.Quota.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Error details. + /// + public partial class ServiceErrorDetail + { + /// + /// Initializes a new instance of the ServiceErrorDetail class. + /// + public ServiceErrorDetail() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ServiceErrorDetail class. + /// + /// Error code. + /// Error message. + public ServiceErrorDetail(string code = default(string), string message = default(string)) + { + Code = code; + Message = message; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets error code. + /// + [JsonProperty(PropertyName = "code")] + public string Code { get; private set; } + + /// + /// Gets error message. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; private set; } + + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/SubRequest.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/SubRequest.cs new file mode 100644 index 000000000000..d69d35ebd7dd --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/SubRequest.cs @@ -0,0 +1,107 @@ +// +// 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.Quota.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Request property. + /// + public partial class SubRequest + { + /// + /// Initializes a new instance of the SubRequest class. + /// + public SubRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SubRequest class. + /// + /// Resource name. + /// Resource type for which the quota + /// properties were requested. + /// Quota limit units, such as Count and Bytes. + /// When requesting quota, use the **unit** value returned in the GET + /// response in the request body of your PUT operation. + /// The quota request status. Possible + /// values include: 'Accepted', 'Invalid', 'Succeeded', 'Failed', + /// 'InProgress' + /// User-friendly status message. + /// Quota request ID. + /// Resource quota limit properties. + public SubRequest(ResourceName name = default(ResourceName), string resourceType = default(string), string unit = default(string), string provisioningState = default(string), string message = default(string), string subRequestId = default(string), LimitJsonObject limit = default(LimitJsonObject)) + { + Name = name; + ResourceType = resourceType; + Unit = unit; + ProvisioningState = provisioningState; + Message = message; + SubRequestId = subRequestId; + Limit = limit; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets resource name. + /// + [JsonProperty(PropertyName = "name")] + public ResourceName Name { get; set; } + + /// + /// Gets resource type for which the quota properties were requested. + /// + [JsonProperty(PropertyName = "resourceType")] + public string ResourceType { get; private set; } + + /// + /// Gets or sets Quota limit units, such as Count and Bytes. When + /// requesting quota, use the **unit** value returned in the GET + /// response in the request body of your PUT operation. + /// + [JsonProperty(PropertyName = "unit")] + public string Unit { get; set; } + + /// + /// Gets or sets the quota request status. Possible values include: + /// 'Accepted', 'Invalid', 'Succeeded', 'Failed', 'InProgress' + /// + [JsonProperty(PropertyName = "provisioningState")] + public string ProvisioningState { get; set; } + + /// + /// Gets user-friendly status message. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; private set; } + + /// + /// Gets quota request ID. + /// + [JsonProperty(PropertyName = "subRequestId")] + public string SubRequestId { get; private set; } + + /// + /// Gets or sets resource quota limit properties. + /// + [JsonProperty(PropertyName = "limit")] + public LimitJsonObject Limit { get; set; } + + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/UsagesGetHeaders.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/UsagesGetHeaders.cs new file mode 100644 index 000000000000..c138acaba370 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/UsagesGetHeaders.cs @@ -0,0 +1,53 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Quota.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for Get operation. + /// + public partial class UsagesGetHeaders + { + /// + /// Initializes a new instance of the UsagesGetHeaders class. + /// + public UsagesGetHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UsagesGetHeaders class. + /// + /// Current entity state version. Should be treated + /// as opaque and used to make conditional HTTP requests. + public UsagesGetHeaders(string eTag = default(string)) + { + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current entity state version. Should be treated as + /// opaque and used to make conditional HTTP requests. + /// + [JsonProperty(PropertyName = "ETag")] + public string ETag { get; set; } + + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/UsagesListHeaders.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/UsagesListHeaders.cs new file mode 100644 index 000000000000..945fcfcf7f2a --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/UsagesListHeaders.cs @@ -0,0 +1,54 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Quota.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for List operation. + /// + public partial class UsagesListHeaders + { + /// + /// Initializes a new instance of the UsagesListHeaders class. + /// + public UsagesListHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UsagesListHeaders class. + /// + /// Current entity state version. It should be + /// treated as opaque and used to make conditional HTTP + /// requests. + public UsagesListHeaders(string eTag = default(string)) + { + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current entity state version. It should be treated as + /// opaque and used to make conditional HTTP requests. + /// + [JsonProperty(PropertyName = "ETag")] + public string ETag { get; set; } + + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/UsagesObject.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/UsagesObject.cs new file mode 100644 index 000000000000..8b3b9c8180c4 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/UsagesObject.cs @@ -0,0 +1,69 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Quota.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The resource usages value. + /// + public partial class UsagesObject + { + /// + /// Initializes a new instance of the UsagesObject class. + /// + public UsagesObject() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UsagesObject class. + /// + /// The usages value. + /// Possible values include: 'Individual', + /// 'Combined' + public UsagesObject(int value, string usagesType = default(string)) + { + Value = value; + UsagesType = usagesType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the usages value. + /// + [JsonProperty(PropertyName = "value")] + public int Value { get; set; } + + /// + /// Gets or sets possible values include: 'Individual', 'Combined' + /// + [JsonProperty(PropertyName = "usagesType")] + public string UsagesType { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + } + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/UsagesProperties.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/UsagesProperties.cs new file mode 100644 index 000000000000..88b3608df301 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/UsagesProperties.cs @@ -0,0 +1,135 @@ +// +// 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.Quota.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Usage properties for the specified resource. + /// + public partial class UsagesProperties + { + /// + /// Initializes a new instance of the UsagesProperties class. + /// + public UsagesProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UsagesProperties class. + /// + /// The quota limit properties for this + /// resource. + /// The units for the quota usage, such as Count + /// and Bytes. When requesting quota, use the **unit** value returned + /// in the GET response in the request body of your PUT + /// operation. + /// Resource name provided by the resource provider. + /// Use this property name when requesting quota. + /// The name of the resource type. + /// The time period for the summary of the + /// quota usage values. For example: + /// *P1D (per one day) + /// *PT1M (per one minute) + /// *PT1S (per one second). + /// This parameter is optional because it is not relevant for all + /// resources such as compute. + /// States if quota can be requested + /// for this resource. + /// Additional properties for the specific + /// resource provider. + public UsagesProperties(UsagesObject usages = default(UsagesObject), string unit = default(string), ResourceName name = default(ResourceName), string resourceType = default(string), string quotaPeriod = default(string), bool? isQuotaApplicable = default(bool?), object properties = default(object)) + { + Usages = usages; + Unit = unit; + Name = name; + ResourceType = resourceType; + QuotaPeriod = quotaPeriod; + IsQuotaApplicable = isQuotaApplicable; + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the quota limit properties for this resource. + /// + [JsonProperty(PropertyName = "usages")] + public UsagesObject Usages { get; set; } + + /// + /// Gets The units for the quota usage, such as Count and Bytes. When + /// requesting quota, use the **unit** value returned in the GET + /// response in the request body of your PUT operation. + /// + [JsonProperty(PropertyName = "unit")] + public string Unit { get; private set; } + + /// + /// Gets or sets resource name provided by the resource provider. Use + /// this property name when requesting quota. + /// + [JsonProperty(PropertyName = "name")] + public ResourceName Name { get; set; } + + /// + /// Gets or sets the name of the resource type. + /// + [JsonProperty(PropertyName = "resourceType")] + public string ResourceType { get; set; } + + /// + /// Gets the time period for the summary of the quota usage values. For + /// example: + /// *P1D (per one day) + /// *PT1M (per one minute) + /// *PT1S (per one second). + /// This parameter is optional because it is not relevant for all + /// resources such as compute. + /// + [JsonProperty(PropertyName = "quotaPeriod")] + public string QuotaPeriod { get; private set; } + + /// + /// Gets states if quota can be requested for this resource. + /// + [JsonProperty(PropertyName = "isQuotaApplicable")] + public bool? IsQuotaApplicable { get; private set; } + + /// + /// Gets or sets additional properties for the specific resource + /// provider. + /// + [JsonProperty(PropertyName = "properties")] + public object Properties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Usages != null) + { + Usages.Validate(); + } + } + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/UsagesTypes.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/UsagesTypes.cs new file mode 100644 index 000000000000..5ebe8dfa41c9 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/Models/UsagesTypes.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Quota.Models +{ + + /// + /// Defines values for UsagesTypes. + /// + public static class UsagesTypes + { + public const string Individual = "Individual"; + public const string Combined = "Combined"; + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/QuotaOperationOperations.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/QuotaOperationOperations.cs new file mode 100644 index 000000000000..ee3f73354475 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/QuotaOperationOperations.cs @@ -0,0 +1,403 @@ +// +// 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.Quota +{ + 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; + + /// + /// QuotaOperationOperations operations. + /// + internal partial class QuotaOperationOperations : IServiceOperations, IQuotaOperationOperations + { + /// + /// Initializes a new instance of the QuotaOperationOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal QuotaOperationOperations(AzureQuotaExtensionAPIClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the AzureQuotaExtensionAPIClient + /// + public AzureQuotaExtensionAPIClient Client { get; private set; } + + /// + /// GET quota operations. + /// + /// + /// List all the operations supported by the Microsoft.Quota resource provider. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.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("/") ? "" : "/")), "providers/Microsoft.Quota/operations").ToString(); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new 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 ExceptionResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ExceptionResponse _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 quota operations. + /// + /// + /// List all the operations supported by the Microsoft.Quota resource provider. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ExceptionResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ExceptionResponse _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/quota/Microsoft.Azure.Management.Quota/src/Generated/QuotaOperationOperationsExtensions.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/QuotaOperationOperationsExtensions.cs new file mode 100644 index 000000000000..a78f1e3a082a --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/QuotaOperationOperationsExtensions.cs @@ -0,0 +1,99 @@ +// +// 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.Quota +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for QuotaOperationOperations. + /// + public static partial class QuotaOperationOperationsExtensions + { + /// + /// GET quota operations. + /// + /// + /// List all the operations supported by the Microsoft.Quota resource provider. + /// + /// + /// The operations group for this extension method. + /// + public static IPage List(this IQuotaOperationOperations operations) + { + return operations.ListAsync().GetAwaiter().GetResult(); + } + + /// + /// GET quota operations. + /// + /// + /// List all the operations supported by the Microsoft.Quota resource provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IQuotaOperationOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// GET quota operations. + /// + /// + /// List all the operations supported by the Microsoft.Quota resource provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IQuotaOperationOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// GET quota operations. + /// + /// + /// List all the operations supported by the Microsoft.Quota resource provider. + /// + /// + /// 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 IQuotaOperationOperations 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/quota/Microsoft.Azure.Management.Quota/src/Generated/QuotaOperations.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/QuotaOperations.cs new file mode 100644 index 000000000000..823084ba3a48 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/QuotaOperations.cs @@ -0,0 +1,1179 @@ +// +// 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.Quota +{ + 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; + + /// + /// QuotaOperations operations. + /// + internal partial class QuotaOperations : IServiceOperations, IQuotaOperations + { + /// + /// Initializes a new instance of the QuotaOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal QuotaOperations(AzureQuotaExtensionAPIClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the AzureQuotaExtensionAPIClient + /// + public AzureQuotaExtensionAPIClient Client { get; private set; } + + /// + /// Get the quota limit of a resource. The response can be used to determine + /// the remaining quota to calculate a new quota limit that can be submitted + /// with a PUT request. + /// + /// + /// Resource name for a given resource provider. For example: + /// - SKU name for Microsoft.Compute + /// - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices + /// For Microsoft.Network PublicIPAddresses. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. If a + /// `{resourceName}` is added after `/quotas`, then it's the target Azure + /// resource URI in the GET operation for the specific resource. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceName, string scope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + } + 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 (scope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "scope"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("scope", scope); + 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("/") ? "" : "/")), "{scope}/providers/Microsoft.Quota/quotas/{resourceName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); + _url = _url.Replace("{scope}", scope); + 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 ExceptionResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ExceptionResponse _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); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Create or update the quota limit for the specified resource with the + /// requested value. To update the quota, follow these steps: + /// 1. Use the GET operation for quotas and usages to determine how much quota + /// remains for the specific resource and to calculate the new quota limit. + /// These steps are detailed in [this + /// example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670). + /// 2. Use this PUT operation to update the quota limit. Please check the URI + /// in location header for the detailed status of the request. + /// + /// + /// Resource name for a given resource provider. For example: + /// - SKU name for Microsoft.Compute + /// - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices + /// For Microsoft.Network PublicIPAddresses. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. If a + /// `{resourceName}` is added after `/quotas`, then it's the target Azure + /// resource URI in the GET operation for the specific resource. + /// + /// + /// Quota properties for the specified resource, based on the API called, + /// Quotas or Usages. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceName, string scope, QuotaProperties properties = default(QuotaProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceName, scope, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Update the quota limit for a specific resource to the specified value: + /// 1. Use the Usages-GET and Quota-GET operations to determine the remaining + /// quota for the specific resource and to calculate the new quota limit. These + /// steps are detailed in [this + /// example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670). + /// 2. Use this PUT operation to update the quota limit. Please check the URI + /// in location header for the detailed status of the request. + /// + /// + /// Resource name for a given resource provider. For example: + /// - SKU name for Microsoft.Compute + /// - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices + /// For Microsoft.Network PublicIPAddresses. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. If a + /// `{resourceName}` is added after `/quotas`, then it's the target Azure + /// resource URI in the GET operation for the specific resource. + /// + /// + /// Quota properties for the specified resource, based on the API called, + /// Quotas or Usages. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> UpdateWithHttpMessagesAsync(string resourceName, string scope, QuotaProperties properties = default(QuotaProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceName, scope, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a list of current quota limits of all resources for the specified + /// scope. The response from this GET operation can be leveraged to submit + /// requests to update a quota. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. If a + /// `{resourceName}` is added after `/quotas`, then it's the target Azure + /// resource URI in the GET operation for the specific resource. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task,QuotaListHeaders>> ListWithHttpMessagesAsync(string scope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + 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 (scope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "scope"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("scope", scope); + 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("/") ? "" : "/")), "{scope}/providers/Microsoft.Quota/quotas").ToString(); + _url = _url.Replace("{scope}", scope); + 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 ExceptionResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ExceptionResponse _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,QuotaListHeaders>(); + _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); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Create or update the quota limit for the specified resource with the + /// requested value. To update the quota, follow these steps: + /// 1. Use the GET operation for quotas and usages to determine how much quota + /// remains for the specific resource and to calculate the new quota limit. + /// These steps are detailed in [this + /// example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670). + /// 2. Use this PUT operation to update the quota limit. Please check the URI + /// in location header for the detailed status of the request. + /// + /// + /// Resource name for a given resource provider. For example: + /// - SKU name for Microsoft.Compute + /// - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices + /// For Microsoft.Network PublicIPAddresses. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. If a + /// `{resourceName}` is added after `/quotas`, then it's the target Azure + /// resource URI in the GET operation for the specific resource. + /// + /// + /// Quota properties for the specified resource, based on the API called, + /// Quotas or Usages. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceName, string scope, QuotaProperties properties = default(QuotaProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + } + 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 (scope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "scope"); + } + CurrentQuotaLimitBase createQuotaRequest = new CurrentQuotaLimitBase(); + if (properties != null) + { + createQuotaRequest.Properties = properties; + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("scope", scope); + tracingParameters.Add("createQuotaRequest", createQuotaRequest); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{scope}/providers/Microsoft.Quota/quotas/{resourceName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); + _url = _url.Replace("{scope}", scope); + 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(createQuotaRequest != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(createQuotaRequest, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new ExceptionResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ExceptionResponse _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; + } + + /// + /// Update the quota limit for a specific resource to the specified value: + /// 1. Use the Usages-GET and Quota-GET operations to determine the remaining + /// quota for the specific resource and to calculate the new quota limit. These + /// steps are detailed in [this + /// example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670). + /// 2. Use this PUT operation to update the quota limit. Please check the URI + /// in location header for the detailed status of the request. + /// + /// + /// Resource name for a given resource provider. For example: + /// - SKU name for Microsoft.Compute + /// - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices + /// For Microsoft.Network PublicIPAddresses. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. If a + /// `{resourceName}` is added after `/quotas`, then it's the target Azure + /// resource URI in the GET operation for the specific resource. + /// + /// + /// Quota properties for the specified resource, based on the API called, + /// Quotas or Usages. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> BeginUpdateWithHttpMessagesAsync(string resourceName, string scope, QuotaProperties properties = default(QuotaProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + } + 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 (scope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "scope"); + } + CurrentQuotaLimitBase createQuotaRequest = new CurrentQuotaLimitBase(); + if (properties != null) + { + createQuotaRequest.Properties = properties; + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("scope", scope); + tracingParameters.Add("createQuotaRequest", createQuotaRequest); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{scope}/providers/Microsoft.Quota/quotas/{resourceName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); + _url = _url.Replace("{scope}", scope); + 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(createQuotaRequest != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(createQuotaRequest, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new ExceptionResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ExceptionResponse _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 a list of current quota limits of all resources for the specified + /// scope. The response from this GET operation can be leveraged to submit + /// requests to update a quota. + /// + /// + /// 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,QuotaListHeaders>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ExceptionResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ExceptionResponse _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,QuotaListHeaders>(); + _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); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/QuotaOperationsExtensions.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/QuotaOperationsExtensions.cs new file mode 100644 index 000000000000..56921d740912 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/QuotaOperationsExtensions.cs @@ -0,0 +1,467 @@ +// +// 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.Quota +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for QuotaOperations. + /// + public static partial class QuotaOperationsExtensions + { + /// + /// Get the quota limit of a resource. The response can be used to determine + /// the remaining quota to calculate a new quota limit that can be submitted + /// with a PUT request. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource name for a given resource provider. For example: + /// - SKU name for Microsoft.Compute + /// - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices + /// For Microsoft.Network PublicIPAddresses. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. If a + /// `{resourceName}` is added after `/quotas`, then it's the target Azure + /// resource URI in the GET operation for the specific resource. + /// + public static CurrentQuotaLimitBase Get(this IQuotaOperations operations, string resourceName, string scope) + { + return operations.GetAsync(resourceName, scope).GetAwaiter().GetResult(); + } + + /// + /// Get the quota limit of a resource. The response can be used to determine + /// the remaining quota to calculate a new quota limit that can be submitted + /// with a PUT request. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource name for a given resource provider. For example: + /// - SKU name for Microsoft.Compute + /// - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices + /// For Microsoft.Network PublicIPAddresses. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. If a + /// `{resourceName}` is added after `/quotas`, then it's the target Azure + /// resource URI in the GET operation for the specific resource. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IQuotaOperations operations, string resourceName, string scope, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceName, scope, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Create or update the quota limit for the specified resource with the + /// requested value. To update the quota, follow these steps: + /// 1. Use the GET operation for quotas and usages to determine how much quota + /// remains for the specific resource and to calculate the new quota limit. + /// These steps are detailed in [this + /// example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670). + /// 2. Use this PUT operation to update the quota limit. Please check the URI + /// in location header for the detailed status of the request. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource name for a given resource provider. For example: + /// - SKU name for Microsoft.Compute + /// - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices + /// For Microsoft.Network PublicIPAddresses. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. If a + /// `{resourceName}` is added after `/quotas`, then it's the target Azure + /// resource URI in the GET operation for the specific resource. + /// + /// + /// Quota properties for the specified resource, based on the API called, + /// Quotas or Usages. + /// + public static CurrentQuotaLimitBase CreateOrUpdate(this IQuotaOperations operations, string resourceName, string scope, QuotaProperties properties = default(QuotaProperties)) + { + return operations.CreateOrUpdateAsync(resourceName, scope, properties).GetAwaiter().GetResult(); + } + + /// + /// Create or update the quota limit for the specified resource with the + /// requested value. To update the quota, follow these steps: + /// 1. Use the GET operation for quotas and usages to determine how much quota + /// remains for the specific resource and to calculate the new quota limit. + /// These steps are detailed in [this + /// example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670). + /// 2. Use this PUT operation to update the quota limit. Please check the URI + /// in location header for the detailed status of the request. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource name for a given resource provider. For example: + /// - SKU name for Microsoft.Compute + /// - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices + /// For Microsoft.Network PublicIPAddresses. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. If a + /// `{resourceName}` is added after `/quotas`, then it's the target Azure + /// resource URI in the GET operation for the specific resource. + /// + /// + /// Quota properties for the specified resource, based on the API called, + /// Quotas or Usages. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IQuotaOperations operations, string resourceName, string scope, QuotaProperties properties = default(QuotaProperties), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceName, scope, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Update the quota limit for a specific resource to the specified value: + /// 1. Use the Usages-GET and Quota-GET operations to determine the remaining + /// quota for the specific resource and to calculate the new quota limit. These + /// steps are detailed in [this + /// example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670). + /// 2. Use this PUT operation to update the quota limit. Please check the URI + /// in location header for the detailed status of the request. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource name for a given resource provider. For example: + /// - SKU name for Microsoft.Compute + /// - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices + /// For Microsoft.Network PublicIPAddresses. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. If a + /// `{resourceName}` is added after `/quotas`, then it's the target Azure + /// resource URI in the GET operation for the specific resource. + /// + /// + /// Quota properties for the specified resource, based on the API called, + /// Quotas or Usages. + /// + public static CurrentQuotaLimitBase Update(this IQuotaOperations operations, string resourceName, string scope, QuotaProperties properties = default(QuotaProperties)) + { + return operations.UpdateAsync(resourceName, scope, properties).GetAwaiter().GetResult(); + } + + /// + /// Update the quota limit for a specific resource to the specified value: + /// 1. Use the Usages-GET and Quota-GET operations to determine the remaining + /// quota for the specific resource and to calculate the new quota limit. These + /// steps are detailed in [this + /// example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670). + /// 2. Use this PUT operation to update the quota limit. Please check the URI + /// in location header for the detailed status of the request. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource name for a given resource provider. For example: + /// - SKU name for Microsoft.Compute + /// - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices + /// For Microsoft.Network PublicIPAddresses. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. If a + /// `{resourceName}` is added after `/quotas`, then it's the target Azure + /// resource URI in the GET operation for the specific resource. + /// + /// + /// Quota properties for the specified resource, based on the API called, + /// Quotas or Usages. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IQuotaOperations operations, string resourceName, string scope, QuotaProperties properties = default(QuotaProperties), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceName, scope, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get a list of current quota limits of all resources for the specified + /// scope. The response from this GET operation can be leveraged to submit + /// requests to update a quota. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. If a + /// `{resourceName}` is added after `/quotas`, then it's the target Azure + /// resource URI in the GET operation for the specific resource. + /// + public static IPage List(this IQuotaOperations operations, string scope) + { + return operations.ListAsync(scope).GetAwaiter().GetResult(); + } + + /// + /// Get a list of current quota limits of all resources for the specified + /// scope. The response from this GET operation can be leveraged to submit + /// requests to update a quota. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. If a + /// `{resourceName}` is added after `/quotas`, then it's the target Azure + /// resource URI in the GET operation for the specific resource. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IQuotaOperations operations, string scope, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(scope, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Create or update the quota limit for the specified resource with the + /// requested value. To update the quota, follow these steps: + /// 1. Use the GET operation for quotas and usages to determine how much quota + /// remains for the specific resource and to calculate the new quota limit. + /// These steps are detailed in [this + /// example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670). + /// 2. Use this PUT operation to update the quota limit. Please check the URI + /// in location header for the detailed status of the request. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource name for a given resource provider. For example: + /// - SKU name for Microsoft.Compute + /// - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices + /// For Microsoft.Network PublicIPAddresses. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. If a + /// `{resourceName}` is added after `/quotas`, then it's the target Azure + /// resource URI in the GET operation for the specific resource. + /// + /// + /// Quota properties for the specified resource, based on the API called, + /// Quotas or Usages. + /// + public static CurrentQuotaLimitBase BeginCreateOrUpdate(this IQuotaOperations operations, string resourceName, string scope, QuotaProperties properties = default(QuotaProperties)) + { + return operations.BeginCreateOrUpdateAsync(resourceName, scope, properties).GetAwaiter().GetResult(); + } + + /// + /// Create or update the quota limit for the specified resource with the + /// requested value. To update the quota, follow these steps: + /// 1. Use the GET operation for quotas and usages to determine how much quota + /// remains for the specific resource and to calculate the new quota limit. + /// These steps are detailed in [this + /// example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670). + /// 2. Use this PUT operation to update the quota limit. Please check the URI + /// in location header for the detailed status of the request. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource name for a given resource provider. For example: + /// - SKU name for Microsoft.Compute + /// - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices + /// For Microsoft.Network PublicIPAddresses. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. If a + /// `{resourceName}` is added after `/quotas`, then it's the target Azure + /// resource URI in the GET operation for the specific resource. + /// + /// + /// Quota properties for the specified resource, based on the API called, + /// Quotas or Usages. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateOrUpdateAsync(this IQuotaOperations operations, string resourceName, string scope, QuotaProperties properties = default(QuotaProperties), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceName, scope, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Update the quota limit for a specific resource to the specified value: + /// 1. Use the Usages-GET and Quota-GET operations to determine the remaining + /// quota for the specific resource and to calculate the new quota limit. These + /// steps are detailed in [this + /// example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670). + /// 2. Use this PUT operation to update the quota limit. Please check the URI + /// in location header for the detailed status of the request. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource name for a given resource provider. For example: + /// - SKU name for Microsoft.Compute + /// - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices + /// For Microsoft.Network PublicIPAddresses. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. If a + /// `{resourceName}` is added after `/quotas`, then it's the target Azure + /// resource URI in the GET operation for the specific resource. + /// + /// + /// Quota properties for the specified resource, based on the API called, + /// Quotas or Usages. + /// + public static CurrentQuotaLimitBase BeginUpdate(this IQuotaOperations operations, string resourceName, string scope, QuotaProperties properties = default(QuotaProperties)) + { + return operations.BeginUpdateAsync(resourceName, scope, properties).GetAwaiter().GetResult(); + } + + /// + /// Update the quota limit for a specific resource to the specified value: + /// 1. Use the Usages-GET and Quota-GET operations to determine the remaining + /// quota for the specific resource and to calculate the new quota limit. These + /// steps are detailed in [this + /// example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670). + /// 2. Use this PUT operation to update the quota limit. Please check the URI + /// in location header for the detailed status of the request. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource name for a given resource provider. For example: + /// - SKU name for Microsoft.Compute + /// - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices + /// For Microsoft.Network PublicIPAddresses. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. If a + /// `{resourceName}` is added after `/quotas`, then it's the target Azure + /// resource URI in the GET operation for the specific resource. + /// + /// + /// Quota properties for the specified resource, based on the API called, + /// Quotas or Usages. + /// + /// + /// The cancellation token. + /// + public static async Task BeginUpdateAsync(this IQuotaOperations operations, string resourceName, string scope, QuotaProperties properties = default(QuotaProperties), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceName, scope, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get a list of current quota limits of all resources for the specified + /// scope. The response from this GET operation can be leveraged to submit + /// requests to update a quota. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IQuotaOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get a list of current quota limits of all resources for the specified + /// scope. The response from this GET operation can be leveraged to submit + /// requests to update a quota. + /// + /// + /// 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 IQuotaOperations 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/quota/Microsoft.Azure.Management.Quota/src/Generated/QuotaRequestStatusOperations.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/QuotaRequestStatusOperations.cs new file mode 100644 index 000000000000..cc740fd9eca6 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/QuotaRequestStatusOperations.cs @@ -0,0 +1,649 @@ +// +// 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.Quota +{ + 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; + + /// + /// QuotaRequestStatusOperations operations. + /// + internal partial class QuotaRequestStatusOperations : IServiceOperations, IQuotaRequestStatusOperations + { + /// + /// Initializes a new instance of the QuotaRequestStatusOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal QuotaRequestStatusOperations(AzureQuotaExtensionAPIClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the AzureQuotaExtensionAPIClient + /// + public AzureQuotaExtensionAPIClient Client { get; private set; } + + /// + /// Get the quota request details and status by quota request ID for the + /// resources of the resource provider at a specific location. The quota + /// request ID **id** is returned in the response of the PUT operation. + /// + /// + /// Quota request ID. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. If a + /// `{resourceName}` is added after `/quotas`, then it's the target Azure + /// resource URI in the GET operation for the specific resource. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string id, string scope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (id == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "id"); + } + 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 (scope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "scope"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("id", id); + tracingParameters.Add("scope", scope); + 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("/") ? "" : "/")), "{scope}/providers/Microsoft.Quota/quotaRequests/{id}").ToString(); + _url = _url.Replace("{id}", System.Uri.EscapeDataString(id)); + _url = _url.Replace("{scope}", scope); + 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 ExceptionResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ExceptionResponse _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; + } + + /// + /// For the specified scope, get the current quota requests for a one year + /// period ending at the time is made. Use the **oData** filter to select quota + /// requests. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. If a + /// `{resourceName}` is added after `/quotas`, then it's the target Azure + /// resource URI in the GET operation for the specific resource. + /// + /// + /// | Field | Supported operators + /// |---------------------|------------------------ + /// + /// |requestSubmitTime | ge, le, eq, gt, lt + /// |provisioningState eq {QuotaRequestState} + /// |resourceName eq {resourceName} + /// + /// + /// Number of records to return. + /// + /// + /// The **Skiptoken** parameter is used only if a previous operation returned a + /// partial result. If a previous response contains a **nextLink** element, its + /// value includes a **skiptoken** parameter that specifies a starting point to + /// use for subsequent calls. + /// + /// + /// 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 scope, string filter = default(string), int? top = default(int?), string skiptoken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + 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 (scope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "scope"); + } + if (top < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "top", 1); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("scope", scope); + tracingParameters.Add("filter", filter); + tracingParameters.Add("top", top); + tracingParameters.Add("skiptoken", skiptoken); + 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("/") ? "" : "/")), "{scope}/providers/Microsoft.Quota/quotaRequests").ToString(); + _url = _url.Replace("{scope}", scope); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter))); + } + if (top != null) + { + _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(top, Client.SerializationSettings).Trim('"')))); + } + if (skiptoken != null) + { + _queryParameters.Add(string.Format("$skiptoken={0}", System.Uri.EscapeDataString(skiptoken))); + } + 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 ExceptionResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ExceptionResponse _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; + } + + /// + /// For the specified scope, get the current quota requests for a one year + /// period ending at the time is made. Use the **oData** filter to select quota + /// requests. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ExceptionResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ExceptionResponse _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/quota/Microsoft.Azure.Management.Quota/src/Generated/QuotaRequestStatusOperationsExtensions.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/QuotaRequestStatusOperationsExtensions.cs new file mode 100644 index 000000000000..bdd8bc6e743e --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/QuotaRequestStatusOperationsExtensions.cs @@ -0,0 +1,195 @@ +// +// 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.Quota +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for QuotaRequestStatusOperations. + /// + public static partial class QuotaRequestStatusOperationsExtensions + { + /// + /// Get the quota request details and status by quota request ID for the + /// resources of the resource provider at a specific location. The quota + /// request ID **id** is returned in the response of the PUT operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Quota request ID. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. If a + /// `{resourceName}` is added after `/quotas`, then it's the target Azure + /// resource URI in the GET operation for the specific resource. + /// + public static QuotaRequestDetails Get(this IQuotaRequestStatusOperations operations, string id, string scope) + { + return operations.GetAsync(id, scope).GetAwaiter().GetResult(); + } + + /// + /// Get the quota request details and status by quota request ID for the + /// resources of the resource provider at a specific location. The quota + /// request ID **id** is returned in the response of the PUT operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Quota request ID. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. If a + /// `{resourceName}` is added after `/quotas`, then it's the target Azure + /// resource URI in the GET operation for the specific resource. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IQuotaRequestStatusOperations operations, string id, string scope, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(id, scope, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// For the specified scope, get the current quota requests for a one year + /// period ending at the time is made. Use the **oData** filter to select quota + /// requests. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. If a + /// `{resourceName}` is added after `/quotas`, then it's the target Azure + /// resource URI in the GET operation for the specific resource. + /// + /// + /// | Field | Supported operators + /// |---------------------|------------------------ + /// + /// |requestSubmitTime | ge, le, eq, gt, lt + /// |provisioningState eq {QuotaRequestState} + /// |resourceName eq {resourceName} + /// + /// + /// Number of records to return. + /// + /// + /// The **Skiptoken** parameter is used only if a previous operation returned a + /// partial result. If a previous response contains a **nextLink** element, its + /// value includes a **skiptoken** parameter that specifies a starting point to + /// use for subsequent calls. + /// + public static IPage List(this IQuotaRequestStatusOperations operations, string scope, string filter = default(string), int? top = default(int?), string skiptoken = default(string)) + { + return operations.ListAsync(scope, filter, top, skiptoken).GetAwaiter().GetResult(); + } + + /// + /// For the specified scope, get the current quota requests for a one year + /// period ending at the time is made. Use the **oData** filter to select quota + /// requests. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. If a + /// `{resourceName}` is added after `/quotas`, then it's the target Azure + /// resource URI in the GET operation for the specific resource. + /// + /// + /// | Field | Supported operators + /// |---------------------|------------------------ + /// + /// |requestSubmitTime | ge, le, eq, gt, lt + /// |provisioningState eq {QuotaRequestState} + /// |resourceName eq {resourceName} + /// + /// + /// Number of records to return. + /// + /// + /// The **Skiptoken** parameter is used only if a previous operation returned a + /// partial result. If a previous response contains a **nextLink** element, its + /// value includes a **skiptoken** parameter that specifies a starting point to + /// use for subsequent calls. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IQuotaRequestStatusOperations operations, string scope, string filter = default(string), int? top = default(int?), string skiptoken = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(scope, filter, top, skiptoken, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// For the specified scope, get the current quota requests for a one year + /// period ending at the time is made. Use the **oData** filter to select quota + /// requests. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IQuotaRequestStatusOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// For the specified scope, get the current quota requests for a one year + /// period ending at the time is made. Use the **oData** filter to select quota + /// requests. + /// + /// + /// 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 IQuotaRequestStatusOperations 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/quota/Microsoft.Azure.Management.Quota/src/Generated/SdkInfo_AzureQuotaExtensionAPI.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/SdkInfo_AzureQuotaExtensionAPI.cs new file mode 100644 index 000000000000..fcc83dc3cfc4 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/SdkInfo_AzureQuotaExtensionAPI.cs @@ -0,0 +1,41 @@ + +// +// 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.Quota +{ + using System; + using System.Collections.Generic; + using System.Linq; + + internal static partial class SdkInfo + { + public static IEnumerable> ApiInfo_AzureQuotaExtensionAPI + { + get + { + return new Tuple[] + { + new Tuple("Quota", "Quota", "2021-03-15-preview"), + new Tuple("Quota", "QuotaOperation", "2021-03-15-preview"), + new Tuple("Quota", "QuotaRequestStatus", "2021-03-15-preview"), + new Tuple("Quota", "Usages", "2021-03-15-preview"), + }.AsEnumerable(); + } + } + // BEGIN: Code Generation Metadata Section + public static readonly String AutoRestVersion = "v2"; + public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413"; + public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/quota/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=C:\\One\\sbudhi-msft\\azure-sdk-for-net\\sdk"; + public static readonly String GithubForkName = "Azure"; + public static readonly String GithubBranchName = "master"; + public static readonly String GithubCommidId = "a861859a287afbbf58930535e75894b0f488e3b3"; + public static readonly String CodeGenerationErrors = ""; + public static readonly String GithubRepoName = "azure-rest-api-specs"; + // END: Code Generation Metadata Section + } +} + diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/UsagesOperations.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/UsagesOperations.cs new file mode 100644 index 000000000000..527350205e7c --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/UsagesOperations.cs @@ -0,0 +1,649 @@ +// +// 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.Quota +{ + 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; + + /// + /// UsagesOperations operations. + /// + internal partial class UsagesOperations : IServiceOperations, IUsagesOperations + { + /// + /// Initializes a new instance of the UsagesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal UsagesOperations(AzureQuotaExtensionAPIClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the AzureQuotaExtensionAPIClient + /// + public AzureQuotaExtensionAPIClient Client { get; private set; } + + /// + /// Get the current usage of a resource. + /// + /// + /// Resource name for a given resource provider. For example: + /// - SKU name for Microsoft.Compute + /// - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices + /// For Microsoft.Network PublicIPAddresses. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. If a + /// `{resourceName}` is added after `/quotas`, then it's the target Azure + /// resource URI in the GET operation for the specific resource. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceName, string scope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + } + 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 (scope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "scope"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("scope", scope); + 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("/") ? "" : "/")), "{scope}/providers/Microsoft.Quota/usages/{resourceName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); + _url = _url.Replace("{scope}", scope); + 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 ExceptionResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ExceptionResponse _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); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get a list of current usage for all resources for the scope specified. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. If a + /// `{resourceName}` is added after `/quotas`, then it's the target Azure + /// resource URI in the GET operation for the specific resource. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task,UsagesListHeaders>> ListWithHttpMessagesAsync(string scope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + 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 (scope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "scope"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("scope", scope); + 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("/") ? "" : "/")), "{scope}/providers/Microsoft.Quota/usages").ToString(); + _url = _url.Replace("{scope}", scope); + 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 ExceptionResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ExceptionResponse _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,UsagesListHeaders>(); + _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); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get a list of current usage for all resources for the scope specified. + /// + /// + /// 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,UsagesListHeaders>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ExceptionResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ExceptionResponse _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,UsagesListHeaders>(); + _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); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/UsagesOperationsExtensions.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/UsagesOperationsExtensions.cs new file mode 100644 index 000000000000..8a520dc2d52b --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Generated/UsagesOperationsExtensions.cs @@ -0,0 +1,155 @@ +// +// 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.Quota +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for UsagesOperations. + /// + public static partial class UsagesOperationsExtensions + { + /// + /// Get the current usage of a resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource name for a given resource provider. For example: + /// - SKU name for Microsoft.Compute + /// - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices + /// For Microsoft.Network PublicIPAddresses. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. If a + /// `{resourceName}` is added after `/quotas`, then it's the target Azure + /// resource URI in the GET operation for the specific resource. + /// + public static CurrentUsagesBase Get(this IUsagesOperations operations, string resourceName, string scope) + { + return operations.GetAsync(resourceName, scope).GetAwaiter().GetResult(); + } + + /// + /// Get the current usage of a resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource name for a given resource provider. For example: + /// - SKU name for Microsoft.Compute + /// - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices + /// For Microsoft.Network PublicIPAddresses. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. If a + /// `{resourceName}` is added after `/quotas`, then it's the target Azure + /// resource URI in the GET operation for the specific resource. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IUsagesOperations operations, string resourceName, string scope, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceName, scope, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get a list of current usage for all resources for the scope specified. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. If a + /// `{resourceName}` is added after `/quotas`, then it's the target Azure + /// resource URI in the GET operation for the specific resource. + /// + public static IPage List(this IUsagesOperations operations, string scope) + { + return operations.ListAsync(scope).GetAwaiter().GetResult(); + } + + /// + /// Get a list of current usage for all resources for the scope specified. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The target Azure resource URI. For example, + /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. + /// This is the target Azure resource URI for the List GET operation. If a + /// `{resourceName}` is added after `/quotas`, then it's the target Azure + /// resource URI in the GET operation for the specific resource. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IUsagesOperations operations, string scope, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(scope, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get a list of current usage for all resources for the scope specified. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IUsagesOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get a list of current usage for all resources for the scope specified. + /// + /// + /// 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 IUsagesOperations 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/quota/Microsoft.Azure.Management.Quota/src/Microsoft.Azure.Management.Quota.csproj b/sdk/quota/Microsoft.Azure.Management.Quota/src/Microsoft.Azure.Management.Quota.csproj new file mode 100644 index 000000000000..c421ad264b2e --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Microsoft.Azure.Management.Quota.csproj @@ -0,0 +1,23 @@ + + + + + + + Microsoft.Azure.Management.Quota + Microsoft.Azure.Management.Quota Library + Microsoft.Azure.Management.Quota + 1.0.0-preview + Quota_2021-03-15-preview + + Initial release with rest api version 2021-03-15-preview. + + + + $(SdkTargetFx) + + + + + + \ No newline at end of file diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/Properties/AssemblyInfo.cs b/sdk/quota/Microsoft.Azure.Management.Quota/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..138b7fd0af55 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/Properties/AssemblyInfo.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System.Reflection; +using System.Resources; + +[assembly: AssemblyTitle("Microsoft Azure Quota Management Library")] +[assembly: AssemblyDescription("Provides management functionality for Microsoft Azure Quota Resources.")] + +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Microsoft Azure .NET SDK")] +[assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: NeutralResourcesLanguage("en")] \ No newline at end of file diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/src/generate.ps1 b/sdk/quota/Microsoft.Azure.Management.Quota/src/generate.ps1 new file mode 100644 index 000000000000..d28931323e1e --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/src/generate.ps1 @@ -0,0 +1 @@ +Start-AutoRestCodeGeneration -ResourceProvider "quota/resource-manager" -AutoRestVersion "v2" \ No newline at end of file diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/tests/Helpers/QuotaTestUtilities.cs b/sdk/quota/Microsoft.Azure.Management.Quota/tests/Helpers/QuotaTestUtilities.cs new file mode 100644 index 000000000000..ca324484e241 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/tests/Helpers/QuotaTestUtilities.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. + +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using System.Net; + +namespace Microsoft.Azure.Management.Quota.Tests.Helpers +{ + public static class QuotaTestUtilities + { + public static AzureQuotaExtensionAPIClient GetAzureQuotaExtensionAPIClient( + MockContext context, RecordedDelegatingHandler handler = null) + { + if (handler != null) + { + handler.IsPassThrough = true; + } + + var client = context.GetServiceClient(handlers: + handler ?? new RecordedDelegatingHandler { StatusCodeToReturn = HttpStatusCode.OK }); + return client; + } + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/tests/Helpers/RecordedDelegatingHandler.cs b/sdk/quota/Microsoft.Azure.Management.Quota/tests/Helpers/RecordedDelegatingHandler.cs new file mode 100644 index 000000000000..a7622eeff671 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/tests/Helpers/RecordedDelegatingHandler.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; +using System.Net; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Threading.Tasks; + +namespace Microsoft.Azure.Management.Quota.Tests.Helpers +{ + public class RecordedDelegatingHandler : DelegatingHandler + { + private HttpResponseMessage _response; + + public RecordedDelegatingHandler() + { + StatusCodeToReturn = HttpStatusCode.Created; + SubsequentStatusCodeToReturn = StatusCodeToReturn; + } + + public RecordedDelegatingHandler(HttpResponseMessage response) + { + StatusCodeToReturn = HttpStatusCode.Created; + SubsequentStatusCodeToReturn = StatusCodeToReturn; + _response = response; + } + + public HttpStatusCode StatusCodeToReturn { get; set; } + + public HttpStatusCode SubsequentStatusCodeToReturn { get; set; } + + public string Request { get; private set; } + + public HttpRequestHeaders RequestHeaders { get; private set; } + + public HttpContentHeaders ContentHeaders { get; private set; } + + public HttpMethod Method { get; private set; } + + public Uri Uri { get; private set; } + + public bool IsPassThrough { get; set; } + + private int counter; + + protected override async Task SendAsync(HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) + { + counter++; + // Save request + if (request.Content == null) + { + Request = string.Empty; + } + else + { + Request = await request.Content.ReadAsStringAsync(); + } + RequestHeaders = request.Headers; + if (request.Content != null) + { + ContentHeaders = request.Content.Headers; + } + Method = request.Method; + Uri = request.RequestUri; + + // Prepare response + if (IsPassThrough) + { + return await base.SendAsync(request, cancellationToken); + } + else + { + if (_response != null && counter == 1) + { + return _response; + } + else + { + var statusCode = StatusCodeToReturn; + if (counter > 1) + { + statusCode = SubsequentStatusCodeToReturn; + } + HttpResponseMessage response = new HttpResponseMessage(statusCode); + response.Content = new StringContent(""); + return response; + } + } + } + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/tests/Microsoft.Azure.Management.Quota.Tests.csproj b/sdk/quota/Microsoft.Azure.Management.Quota/tests/Microsoft.Azure.Management.Quota.Tests.csproj new file mode 100644 index 000000000000..82c9d2567d49 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/tests/Microsoft.Azure.Management.Quota.Tests.csproj @@ -0,0 +1,24 @@ + + + + Quota.Tests + Quota.Tests Class Library + Microsoft Corporation + Quota.Tests + 1.0.0 + true + + + + + + + + + PreserveNewest + + + + + + \ No newline at end of file diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/tests/ScenarioTests/QuotaTests.cs b/sdk/quota/Microsoft.Azure.Management.Quota/tests/ScenarioTests/QuotaTests.cs new file mode 100644 index 000000000000..f01bb8afb48c --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/tests/ScenarioTests/QuotaTests.cs @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using Microsoft.Azure.Management.Quota.Models; +using Microsoft.Azure.Management.Quota.Tests.Helpers; +using Microsoft.Azure.Test.HttpRecorder; +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using System; +using System.IO; +using System.Linq; +using System.Net; +using System.Reflection; +using Xunit; + +namespace Microsoft.Azure.Management.Quota.Tests.ScenarioTests +{ + public class QuotaTests : TestBase + { + const string scope = + "subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus"; + const string resourceName = "PublicIPAddresses"; + + [Fact] + public void Test_ListQuotaRequest() + { + HttpMockServer.RecordsDirectory = GetSessionsDirectoryPath(); + using (MockContext context = MockContext.Start(this.GetType())) + { + var quotaExtensionClient = QuotaTestUtilities.GetAzureQuotaExtensionAPIClient( + context, new RecordedDelegatingHandler { StatusCodeToReturn = HttpStatusCode.OK }); + + var quotaRequests = quotaExtensionClient.QuotaRequestStatus.List(scope); + + Assert.True(quotaRequests.All(x => + string.Equals(x.Type, "Microsoft.Quota/QuotaRequests", StringComparison.OrdinalIgnoreCase) + )); + } + } + + [Fact] + public void Test_ListQuotaRequestWithFilter() + { + HttpMockServer.RecordsDirectory = GetSessionsDirectoryPath(); + int top = 5; + string filter = "provisioningState eq 'Failed'"; + using (MockContext context = MockContext.Start(this.GetType())) + { + var quotaExtensionClient = QuotaTestUtilities.GetAzureQuotaExtensionAPIClient( + context, new RecordedDelegatingHandler { StatusCodeToReturn = HttpStatusCode.OK }); + + var quotaRequests = quotaExtensionClient.QuotaRequestStatus.List(scope, filter: filter, top: top); + + Assert.True(quotaRequests.Count() == top); + + Assert.True(quotaRequests.All(x => + string.Equals(x.ProvisioningState, "Failed", StringComparison.OrdinalIgnoreCase) + )); + } + } + + [Fact] + public void Test_GetQuotaRequest() + { + HttpMockServer.RecordsDirectory = GetSessionsDirectoryPath(); + string requestId = "2c3d0274-10b6-44ae-82ed-a0647057d696"; + using (MockContext context = MockContext.Start(this.GetType())) + { + var quotaExtensionClient = QuotaTestUtilities.GetAzureQuotaExtensionAPIClient( + context, new RecordedDelegatingHandler { StatusCodeToReturn = HttpStatusCode.OK }); + + var quotaRequests = quotaExtensionClient.QuotaRequestStatus.Get(requestId, scope); + + Assert.Equal(quotaRequests.Name, requestId, ignoreCase: true); + } + } + + [Fact] + public void Test_GetQuota() + { + HttpMockServer.RecordsDirectory = GetSessionsDirectoryPath(); + using (MockContext context = MockContext.Start(this.GetType())) + { + var quotaExtensionClient = QuotaTestUtilities.GetAzureQuotaExtensionAPIClient( + context, new RecordedDelegatingHandler { StatusCodeToReturn = HttpStatusCode.OK }); + + var quota = quotaExtensionClient.Quota.Get(resourceName, scope); + + Assert.Equal(quota.Name, resourceName, ignoreCase: true); + } + } + + [Fact] + public void Test_ListQuota() + { + HttpMockServer.RecordsDirectory = GetSessionsDirectoryPath(); + using (MockContext context = MockContext.Start(this.GetType())) + { + var quotaExtensionClient = QuotaTestUtilities.GetAzureQuotaExtensionAPIClient( + context, new RecordedDelegatingHandler { StatusCodeToReturn = HttpStatusCode.OK }); + + var quotas = quotaExtensionClient.Quota.List(scope); + + Assert.True(quotas.All(x => + string.Equals(x.Type, "Microsoft.Quota/Quotas", StringComparison.OrdinalIgnoreCase) + )); + } + } + + [Fact] + public void Test_GetUsage() + { + HttpMockServer.RecordsDirectory = GetSessionsDirectoryPath(); + using (MockContext context = MockContext.Start(this.GetType())) + { + var quotaExtensionClient = QuotaTestUtilities.GetAzureQuotaExtensionAPIClient( + context, new RecordedDelegatingHandler { StatusCodeToReturn = HttpStatusCode.OK }); + + var usage = quotaExtensionClient.Usages.Get(resourceName, scope); + + Assert.Equal(usage.Name, resourceName, ignoreCase: true); + } + } + + [Fact] + public void Test_ListUsage() + { + HttpMockServer.RecordsDirectory = GetSessionsDirectoryPath(); + using (MockContext context = MockContext.Start(this.GetType())) + { + var quotaExtensionClient = QuotaTestUtilities.GetAzureQuotaExtensionAPIClient( + context, new RecordedDelegatingHandler { StatusCodeToReturn = HttpStatusCode.OK }); + + var usages = quotaExtensionClient.Usages.List(scope); + + Assert.True(usages.All(x => + string.Equals(x.Type, "Microsoft.Quota/Usages", StringComparison.OrdinalIgnoreCase) + )); + } + } + + [Fact] + public void Test_SetQuota() + { + HttpMockServer.RecordsDirectory = GetSessionsDirectoryPath(); + using (MockContext context = MockContext.Start(this.GetType())) + { + var quotaExtensionClient = QuotaTestUtilities.GetAzureQuotaExtensionAPIClient( + context, new RecordedDelegatingHandler { StatusCodeToReturn = HttpStatusCode.OK }); + + var newQuotaLimit = new QuotaProperties() + { + Limit = new LimitObject() + { + Value = 1005 + }, + Name = new ResourceName() + { + Value = resourceName + } + }; + + var quotaRequest = quotaExtensionClient.Quota.BeginCreateOrUpdate(resourceName, scope, newQuotaLimit); + + // 202 response has no response body + Assert.True(quotaRequest == null); + } + } + + [Fact] + public void Test_SetQuotaInvalidResourceName() + { + HttpMockServer.RecordsDirectory = GetSessionsDirectoryPath(); + try + { + using (MockContext context = MockContext.Start(this.GetType())) + { + var quotaExtensionClient = QuotaTestUtilities.GetAzureQuotaExtensionAPIClient( + context, new RecordedDelegatingHandler { StatusCodeToReturn = HttpStatusCode.OK }); + + var newQuotaLimit = new QuotaProperties() + { + Limit = new LimitObject() + { + Value = 1005 + }, + Name = new ResourceName() + { + Value = "PublicIPAddress" + } + }; + + var quotaRequest = quotaExtensionClient.Quota.BeginCreateOrUpdate( + "PublicIPAddress", scope, newQuotaLimit); + + Assert.True(quotaRequest == null); + } + } + catch (ExceptionResponseException ex) + { + Assert.True(ex.Response.StatusCode == HttpStatusCode.BadRequest); + Assert.Contains("InvalidResourceName", ex.ToString()); + } + } + + static bool IsRecordMode() + { + return Environment.GetEnvironmentVariable("AZURE_TEST_MODE") == "Record"; + } + + static string GetSessionsDirectoryPath() + { + if (!IsRecordMode()) + { + Type something = typeof(QuotaTests); + string executingAssemblyPath = something.GetTypeInfo().Assembly.Location; + return Path.Combine(Path.GetDirectoryName(executingAssemblyPath), "SessionRecords"); + } + return Environment.GetEnvironmentVariable("OutputDirectory"); + } + } +} diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_GetQuota.json b/sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_GetQuota.json new file mode 100644 index 000000000000..35e7aef7ac72 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_GetQuota.json @@ -0,0 +1,71 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas/PublicIPAddresses?api-version=2021-03-15-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWY2Y2NlNTEtNmJhZi00ZGU1LWEzYzQtNmY1OGI4NTMxNWI5L3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yay9sb2NhdGlvbnMvd2VzdHVzL3Byb3ZpZGVycy9NaWNyb3NvZnQuUXVvdGEvcXVvdGFzL1B1YmxpY0lQQWRkcmVzc2VzP2FwaS12ZXJzaW9uPTIwMjEtMDMtMTUtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "38aff5e8-6a67-4a20-adf4-879645808314" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.8.4420.0", + "OSName/Windows", + "OSVersion/10.0.22000.0", + "Microsoft.Azure.Management.Quota.AzureQuotaExtensionAPIClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "MS-RequestId": [ + "KwYK9Xj2qUSiCQZ0LmCEfQ.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "d57001bc-8d3f-4048-9ace-48d491a40328" + ], + "x-ms-correlation-request-id": [ + "d57001bc-8d3f-4048-9ace-48d491a40328" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20211101T194549Z:d57001bc-8d3f-4048-9ace-48d491a40328" + ], + "Cache-Control": [ + "no-store, must-revalidate, no-cache" + ], + "Date": [ + "Mon, 01 Nov 2021 19:45:49 GMT" + ], + "Server": [ + "Kestrel" + ], + "Content-Length": [ + "450" + ], + "Content-Type": [ + "application/json" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"name\": {\r\n \"value\": \"PublicIPAddresses\",\r\n \"localizedValue\": \"Public IP Addresses - Basic\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": true\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas/PublicIPAddresses\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"PublicIPAddresses\"\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "9f6cce51-6baf-4de5-a3c4-6f58b85315b9" + } +} \ No newline at end of file diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_GetQuotaRequest.json b/sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_GetQuotaRequest.json new file mode 100644 index 000000000000..02783ebdafa5 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_GetQuotaRequest.json @@ -0,0 +1,74 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/2c3d0274-10b6-44ae-82ed-a0647057d696?api-version=2021-03-15-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWY2Y2NlNTEtNmJhZi00ZGU1LWEzYzQtNmY1OGI4NTMxNWI5L3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yay9sb2NhdGlvbnMvd2VzdHVzL3Byb3ZpZGVycy9NaWNyb3NvZnQuUXVvdGEvcXVvdGFSZXF1ZXN0cy8yYzNkMDI3NC0xMGI2LTQ0YWUtODJlZC1hMDY0NzA1N2Q2OTY/YXBpLXZlcnNpb249MjAyMS0wMy0xNS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "feb9cac5-883e-4d65-88a5-bfb0dd468883" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.8.4420.0", + "OSName/Windows", + "OSVersion/10.0.22000.0", + "Microsoft.Azure.Management.Quota.AzureQuotaExtensionAPIClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "MS-RequestId": [ + "iVz3mJxkaEuJyf-_o2hvHg.0" + ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ + "99" + ], + "x-ms-request-id": [ + "83c94499-bda2-416e-9c20-4c46a77df07a" + ], + "x-ms-correlation-request-id": [ + "83c94499-bda2-416e-9c20-4c46a77df07a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20211101T204215Z:83c94499-bda2-416e-9c20-4c46a77df07a" + ], + "Cache-Control": [ + "no-store, must-revalidate, no-cache" + ], + "Date": [ + "Mon, 01 Nov 2021 20:42:15 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/2c3d0274-10b6-44ae-82ed-a0647057d696?api-version=2021-03-15-preview" + ], + "Server": [ + "Kestrel" + ], + "Content-Length": [ + "684" + ], + "Content-Type": [ + "application/json" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-09-02T15:49:23Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"2c3d0274-10b6-44ae-82ed-a0647057d696\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/2c3d0274-10b6-44ae-82ed-a0647057d696\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"2c3d0274-10b6-44ae-82ed-a0647057d696\"\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "9f6cce51-6baf-4de5-a3c4-6f58b85315b9" + } +} \ No newline at end of file diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_GetUsage.json b/sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_GetUsage.json new file mode 100644 index 000000000000..2e30533ecac1 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_GetUsage.json @@ -0,0 +1,71 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages/PublicIPAddresses?api-version=2021-03-15-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWY2Y2NlNTEtNmJhZi00ZGU1LWEzYzQtNmY1OGI4NTMxNWI5L3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yay9sb2NhdGlvbnMvd2VzdHVzL3Byb3ZpZGVycy9NaWNyb3NvZnQuUXVvdGEvdXNhZ2VzL1B1YmxpY0lQQWRkcmVzc2VzP2FwaS12ZXJzaW9uPTIwMjEtMDMtMTUtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d083b125-6e94-45b8-b1db-18c08a6fd599" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.8.4420.0", + "OSName/Windows", + "OSVersion/10.0.22000.0", + "Microsoft.Azure.Management.Quota.AzureQuotaExtensionAPIClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "MS-RequestId": [ + "w1GGjjhF6UiWXHGAzJTtnw.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "5b563d5f-d905-4fd7-b776-45fab343d990" + ], + "x-ms-correlation-request-id": [ + "5b563d5f-d905-4fd7-b776-45fab343d990" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20211101T194759Z:5b563d5f-d905-4fd7-b776-45fab343d990" + ], + "Cache-Control": [ + "no-store, must-revalidate, no-cache" + ], + "Date": [ + "Mon, 01 Nov 2021 19:47:59 GMT" + ], + "Server": [ + "Kestrel" + ], + "Content-Length": [ + "421" + ], + "Content-Type": [ + "application/json" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 1000\r\n },\r\n \"name\": {\r\n \"value\": \"PublicIPAddresses\",\r\n \"localizedValue\": \"Public IP Addresses - Basic\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": true\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages/PublicIPAddresses\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"PublicIPAddresses\"\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "9f6cce51-6baf-4de5-a3c4-6f58b85315b9" + } +} \ No newline at end of file diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_ListQuota.json b/sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_ListQuota.json new file mode 100644 index 000000000000..b1eaf61b704a --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_ListQuota.json @@ -0,0 +1,71 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas?api-version=2021-03-15-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWY2Y2NlNTEtNmJhZi00ZGU1LWEzYzQtNmY1OGI4NTMxNWI5L3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yay9sb2NhdGlvbnMvd2VzdHVzL3Byb3ZpZGVycy9NaWNyb3NvZnQuUXVvdGEvcXVvdGFzP2FwaS12ZXJzaW9uPTIwMjEtMDMtMTUtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "cfca7dac-2920-450e-a49a-7bd7deeae117" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.8.4420.0", + "OSName/Windows", + "OSVersion/10.0.22000.0", + "Microsoft.Azure.Management.Quota.AzureQuotaExtensionAPIClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "MS-RequestId": [ + "N4lMPQ1vXkKbxzM2YZ3i9w.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "2cc2e718-e637-4b79-ba7c-2faa7facd6af" + ], + "x-ms-correlation-request-id": [ + "2cc2e718-e637-4b79-ba7c-2faa7facd6af" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20211101T194656Z:2cc2e718-e637-4b79-ba7c-2faa7facd6af" + ], + "Cache-Control": [ + "no-store, must-revalidate, no-cache" + ], + "Date": [ + "Mon, 01 Nov 2021 19:46:55 GMT" + ], + "Server": [ + "Kestrel" + ], + "Content-Length": [ + "19333" + ], + "Content-Type": [ + "application/json" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"name\": {\r\n \"value\": \"VirtualNetworks\",\r\n \"localizedValue\": \"Virtual Networks\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"VirtualNetworks\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"name\": {\r\n \"value\": \"StaticPublicIPAddresses\",\r\n \"localizedValue\": \"Static Public IP Addresses\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"StaticPublicIPAddresses\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 5000\r\n },\r\n \"name\": {\r\n \"value\": \"NetworkSecurityGroups\",\r\n \"localizedValue\": \"Network Security Groups\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"NetworkSecurityGroups\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"name\": {\r\n \"value\": \"PublicIPAddresses\",\r\n \"localizedValue\": \"Public IP Addresses - Basic\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": true\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"PublicIPAddresses\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 5\r\n },\r\n \"name\": {\r\n \"value\": \"CustomIpPrefixes\",\r\n \"localizedValue\": \"Custom Ip Prefixes\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"CustomIpPrefixes\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 2147483647\r\n },\r\n \"name\": {\r\n \"value\": \"PublicIpPrefixes\",\r\n \"localizedValue\": \"Public Ip Prefixes\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"PublicIpPrefixes\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 2147483647\r\n },\r\n \"name\": {\r\n \"value\": \"NatGateways\",\r\n \"localizedValue\": \"Nat Gateways\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"NatGateways\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 65536\r\n },\r\n \"name\": {\r\n \"value\": \"NetworkInterfaces\",\r\n \"localizedValue\": \"Network Interfaces\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"NetworkInterfaces\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 65536\r\n },\r\n \"name\": {\r\n \"value\": \"PrivateEndpoints\",\r\n \"localizedValue\": \"Private Endpoints\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"PrivateEndpoints\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 2147483647\r\n },\r\n \"name\": {\r\n \"value\": \"PrivateEndpointRedirectMaps\",\r\n \"localizedValue\": \"Private Endpoint Redirect Maps\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"PrivateEndpointRedirectMaps\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"name\": {\r\n \"value\": \"LoadBalancers\",\r\n \"localizedValue\": \"Load Balancers\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"LoadBalancers\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 800\r\n },\r\n \"name\": {\r\n \"value\": \"PrivateLinkServices\",\r\n \"localizedValue\": \"Private Link Services\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"PrivateLinkServices\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"name\": {\r\n \"value\": \"ApplicationGateways\",\r\n \"localizedValue\": \"Application Gateways\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"ApplicationGateways\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 200\r\n },\r\n \"name\": {\r\n \"value\": \"RouteTables\",\r\n \"localizedValue\": \"Route Tables\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"RouteTables\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"name\": {\r\n \"value\": \"RouteFilters\",\r\n \"localizedValue\": \"Route Filters\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"RouteFilters\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1\r\n },\r\n \"name\": {\r\n \"value\": \"NetworkWatchers\",\r\n \"localizedValue\": \"Network Watchers\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"NetworkWatchers\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 10000\r\n },\r\n \"name\": {\r\n \"value\": \"PacketCaptures\",\r\n \"localizedValue\": \"Packet Captures\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"PacketCaptures\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 3000\r\n },\r\n \"name\": {\r\n \"value\": \"ApplicationSecurityGroups\",\r\n \"localizedValue\": \"Application Security Groups.\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"ApplicationSecurityGroups\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1\r\n },\r\n \"name\": {\r\n \"value\": \"DdosProtectionPlans\",\r\n \"localizedValue\": \"DDoS Protection Plans.\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"DdosProtectionPlans\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 200\r\n },\r\n \"name\": {\r\n \"value\": \"DdosCustomPolicies\",\r\n \"localizedValue\": \"DDoS customized policies\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"DdosCustomPolicies\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 500\r\n },\r\n \"name\": {\r\n \"value\": \"ServiceEndpointPolicies\",\r\n \"localizedValue\": \"Service Endpoint Policies\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"ServiceEndpointPolicies\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 200\r\n },\r\n \"name\": {\r\n \"value\": \"NetworkIntentPolicies\",\r\n \"localizedValue\": \"Network Intent Policies\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"NetworkIntentPolicies\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"name\": {\r\n \"value\": \"StandardSkuLoadBalancers\",\r\n \"localizedValue\": \"Standard Sku Load Balancers\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"StandardSkuLoadBalancers\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"name\": {\r\n \"value\": \"StandardSkuPublicIpAddresses\",\r\n \"localizedValue\": \"Public IP Addresses - Standard\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"StandardSkuPublicIpAddresses\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 20\r\n },\r\n \"name\": {\r\n \"value\": \"DnsServersPerVirtualNetwork\",\r\n \"localizedValue\": \"DNS servers per Virtual Network\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"DnsServersPerVirtualNetwork\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 5\r\n },\r\n \"name\": {\r\n \"value\": \"CustomDnsServersPerP2SVpnGateway\",\r\n \"localizedValue\": \"Custom DNS servers per P2SVpnGateway\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"CustomDnsServersPerP2SVpnGateway\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 3000\r\n },\r\n \"name\": {\r\n \"value\": \"SubnetsPerVirtualNetwork\",\r\n \"localizedValue\": \"Subnets per Virtual Network\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"SubnetsPerVirtualNetwork\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 65536\r\n },\r\n \"name\": {\r\n \"value\": \"IPConfigurationsPerVirtualNetwork\",\r\n \"localizedValue\": \"IP Configurations per Virtual Network\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"IPConfigurationsPerVirtualNetwork\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 500\r\n },\r\n \"name\": {\r\n \"value\": \"PeeringsPerVirtualNetwork\",\r\n \"localizedValue\": \"Peerings per Virtual Network\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"PeeringsPerVirtualNetwork\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"name\": {\r\n \"value\": \"SecurityRulesPerNetworkSecurityGroup\",\r\n \"localizedValue\": \"Security rules per Network Security Group\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"SecurityRulesPerNetworkSecurityGroup\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 100\r\n },\r\n \"name\": {\r\n \"value\": \"SecurityRulesPerNetworkIntentPolicy\",\r\n \"localizedValue\": \"Security rules per Network Intent Policy\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"SecurityRulesPerNetworkIntentPolicy\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 200\r\n },\r\n \"name\": {\r\n \"value\": \"RoutesPerNetworkIntentPolicy\",\r\n \"localizedValue\": \"Routes per Network Intent Policy\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"RoutesPerNetworkIntentPolicy\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 4000\r\n },\r\n \"name\": {\r\n \"value\": \"SecurityRuleAddressesOrPortsPerNetworkSecurityGroup\",\r\n \"localizedValue\": \"Security rules addresses or ports per Network Security Group\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"SecurityRuleAddressesOrPortsPerNetworkSecurityGroup\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 250\r\n },\r\n \"name\": {\r\n \"value\": \"InboundRulesPerLoadBalancer\",\r\n \"localizedValue\": \"Inbound Rules per Load Balancer\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"InboundRulesPerLoadBalancer\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 200\r\n },\r\n \"name\": {\r\n \"value\": \"FrontendIPConfigurationPerLoadBalancer\",\r\n \"localizedValue\": \"Frontend IP Configurations per Load Balancer\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"FrontendIPConfigurationPerLoadBalancer\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 5\r\n },\r\n \"name\": {\r\n \"value\": \"OutboundRulesPerLoadBalancer\",\r\n \"localizedValue\": \"Outbound Rules per Load Balancer\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"OutboundRulesPerLoadBalancer\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 400\r\n },\r\n \"name\": {\r\n \"value\": \"RoutesPerRouteTable\",\r\n \"localizedValue\": \"Routes per Route Table\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"RoutesPerRouteTable\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 25\r\n },\r\n \"name\": {\r\n \"value\": \"RoutesWithServiceTagPerRouteTable\",\r\n \"localizedValue\": \"Routes with service tag per Route Table\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"RoutesWithServiceTagPerRouteTable\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 256\r\n },\r\n \"name\": {\r\n \"value\": \"SecondaryIPConfigurationsPerNetworkInterface\",\r\n \"localizedValue\": \"Secondary IP Configurations per Network Interface\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"SecondaryIPConfigurationsPerNetworkInterface\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 300\r\n },\r\n \"name\": {\r\n \"value\": \"InboundNatOrLbRulesPerNetworkInterface\",\r\n \"localizedValue\": \"Inbound rules per Network Interface\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"InboundNatOrLbRulesPerNetworkInterface\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1\r\n },\r\n \"name\": {\r\n \"value\": \"RouteFilterRulesPerRouteFilter\",\r\n \"localizedValue\": \"Route filter rules per Route Filter\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"RouteFilterRulesPerRouteFilter\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1\r\n },\r\n \"name\": {\r\n \"value\": \"RouteFiltersPerExpressRouteBgpPeering\",\r\n \"localizedValue\": \"Route filters per Express route BGP Peering\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"RouteFiltersPerExpressRouteBgpPeering\"\r\n },\r\n {\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 28\r\n },\r\n \"name\": {\r\n \"value\": \"MinPublicIpInterNetworkPrefixLength\",\r\n \"localizedValue\": \"Public IPv4 Prefix Length\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"MinPublicIpInterNetworkPrefixLength\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "9f6cce51-6baf-4de5-a3c4-6f58b85315b9" + } +} \ No newline at end of file diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_ListQuotaRequest.json b/sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_ListQuotaRequest.json new file mode 100644 index 000000000000..42400d8db4e1 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_ListQuotaRequest.json @@ -0,0 +1,71 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests?api-version=2021-03-15-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWY2Y2NlNTEtNmJhZi00ZGU1LWEzYzQtNmY1OGI4NTMxNWI5L3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yay9sb2NhdGlvbnMvd2VzdHVzL3Byb3ZpZGVycy9NaWNyb3NvZnQuUXVvdGEvcXVvdGFSZXF1ZXN0cz9hcGktdmVyc2lvbj0yMDIxLTAzLTE1LXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "27296dd1-23f4-4024-b2a0-1bca37575913" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.8.4420.0", + "OSName/Windows", + "OSVersion/10.0.22000.0", + "Microsoft.Azure.Management.Quota.AzureQuotaExtensionAPIClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "MS-RequestId": [ + "IyGG1G2HIEGaRWjLW0lbTQ.0" + ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ + "99" + ], + "x-ms-request-id": [ + "d0e66322-1f07-40b8-839d-aa1be3f2bdbc" + ], + "x-ms-correlation-request-id": [ + "d0e66322-1f07-40b8-839d-aa1be3f2bdbc" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20211101T194344Z:d0e66322-1f07-40b8-839d-aa1be3f2bdbc" + ], + "Cache-Control": [ + "no-store, must-revalidate, no-cache" + ], + "Date": [ + "Mon, 01 Nov 2021 19:43:44 GMT" + ], + "Server": [ + "Kestrel" + ], + "Content-Length": [ + "40432" + ], + "Content-Type": [ + "application/json" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-10-20T18:24:45Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1005\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"71838bc4-e15d-4107-adb3-933b20ac5e9d\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/71838bc4-e15d-4107-adb3-933b20ac5e9d\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"71838bc4-e15d-4107-adb3-933b20ac5e9d\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-10-15T16:17:41Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"2ff97b4e-d0da-477a-865a-7158bf4b3914\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/2ff97b4e-d0da-477a-865a-7158bf4b3914\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"2ff97b4e-d0da-477a-865a-7158bf4b3914\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-10-15T16:08:39Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"94ea57f4-4e3b-4a68-8b07-209c170cd625\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/94ea57f4-4e3b-4a68-8b07-209c170cd625\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"94ea57f4-4e3b-4a68-8b07-209c170cd625\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-10-15T16:04:37Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 0\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"506195bf-0162-4951-8048-4ce695334d95\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/506195bf-0162-4951-8048-4ce695334d95\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"506195bf-0162-4951-8048-4ce695334d95\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-10-15T16:03:04Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 0\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"e4a16f15-4fc8-48c0-8e3f-cd7182f72535\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/e4a16f15-4fc8-48c0-8e3f-cd7182f72535\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"e4a16f15-4fc8-48c0-8e3f-cd7182f72535\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-10-15T16:01:14Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 0\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"0cca54f8-c993-4930-bfc2-baa6eb06cf93\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/0cca54f8-c993-4930-bfc2-baa6eb06cf93\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"0cca54f8-c993-4930-bfc2-baa6eb06cf93\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-10-15T15:59:24Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 0\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"f6b0eaf4-74f3-4ee2-87c9-5247306a51ea\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/f6b0eaf4-74f3-4ee2-87c9-5247306a51ea\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"f6b0eaf4-74f3-4ee2-87c9-5247306a51ea\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-10-15T15:29:29Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"ae29dc88-2f7a-4da1-b869-bcbc305677f9\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/ae29dc88-2f7a-4da1-b869-bcbc305677f9\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"ae29dc88-2f7a-4da1-b869-bcbc305677f9\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-10-15T13:26:05Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"0d6eed5d-3149-4970-af92-e267b83948be\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/0d6eed5d-3149-4970-af92-e267b83948be\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"0d6eed5d-3149-4970-af92-e267b83948be\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-10-14T18:07:03Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"cf8234be-4bb2-4851-a448-aa8fcd504ffd\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/cf8234be-4bb2-4851-a448-aa8fcd504ffd\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"cf8234be-4bb2-4851-a448-aa8fcd504ffd\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-10-13T16:45:46Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1005\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"dc0bb85c-8c2a-43f5-b93f-d8e5cd79b788\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/dc0bb85c-8c2a-43f5-b93f-d8e5cd79b788\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"dc0bb85c-8c2a-43f5-b93f-d8e5cd79b788\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-10-13T16:23:59Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1005\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"b274275d-0fc7-45be-b2c9-f2cf0af3cf57\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/b274275d-0fc7-45be-b2c9-f2cf0af3cf57\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"b274275d-0fc7-45be-b2c9-f2cf0af3cf57\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-10-13T15:55:15Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1005\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"5e4a0833-e8de-4424-8bf7-777b83b951cf\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/5e4a0833-e8de-4424-8bf7-777b83b951cf\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"5e4a0833-e8de-4424-8bf7-777b83b951cf\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-10-13T15:48:44Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1005\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"008a5b7d-c846-4827-b82e-ab75f8fa63af\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/008a5b7d-c846-4827-b82e-ab75f8fa63af\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"008a5b7d-c846-4827-b82e-ab75f8fa63af\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-10-13T15:46:31Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1005\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"6bf2b86e-cbd8-497d-a411-37eac5b6fa6f\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/6bf2b86e-cbd8-497d-a411-37eac5b6fa6f\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"6bf2b86e-cbd8-497d-a411-37eac5b6fa6f\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-10-12T21:54:35Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"89b64ed4-cf0d-408a-80f6-ad827af67b9a\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/89b64ed4-cf0d-408a-80f6-ad827af67b9a\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"89b64ed4-cf0d-408a-80f6-ad827af67b9a\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-10-11T23:53:39Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"7aec01e7-8bc1-4977-9d75-ebea87f5e92a\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/7aec01e7-8bc1-4977-9d75-ebea87f5e92a\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"7aec01e7-8bc1-4977-9d75-ebea87f5e92a\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-09-30T03:38:01Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 121\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"4916169c-0806-4666-bf19-a368ed606d6b\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/4916169c-0806-4666-bf19-a368ed606d6b\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"4916169c-0806-4666-bf19-a368ed606d6b\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-09-30T03:18:09Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"1ce83352-bb7c-4d6e-b36f-41ba2e65af8d\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/1ce83352-bb7c-4d6e-b36f-41ba2e65af8d\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"1ce83352-bb7c-4d6e-b36f-41ba2e65af8d\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-09-30T03:15:26Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"c6127d50-b266-496a-a1ac-4c1055e772cd\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/c6127d50-b266-496a-a1ac-4c1055e772cd\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"c6127d50-b266-496a-a1ac-4c1055e772cd\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-09-30T03:08:15Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 121\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"2bee30a1-469e-4cc0-8824-dbf7c41fbe66\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/2bee30a1-469e-4cc0-8824-dbf7c41fbe66\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"2bee30a1-469e-4cc0-8824-dbf7c41fbe66\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-09-29T21:50:31Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1001\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"18cf0bb8-d421-49c4-9820-ee005959e50f\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/18cf0bb8-d421-49c4-9820-ee005959e50f\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"18cf0bb8-d421-49c4-9820-ee005959e50f\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-09-29T21:36:59Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"92135b4b-c406-4d71-8e67-83efa5a911f9\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/92135b4b-c406-4d71-8e67-83efa5a911f9\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"92135b4b-c406-4d71-8e67-83efa5a911f9\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-09-29T21:17:33Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"2ae1af52-fab7-4fb2-82ea-69b6f3274552\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/2ae1af52-fab7-4fb2-82ea-69b6f3274552\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"2ae1af52-fab7-4fb2-82ea-69b6f3274552\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-09-29T21:14:49Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"a929d610-fbd5-4da7-86f0-ea346d7134c6\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/a929d610-fbd5-4da7-86f0-ea346d7134c6\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"a929d610-fbd5-4da7-86f0-ea346d7134c6\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-09-29T21:11:41Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"c7fd6a8e-d955-44f2-921b-0bf75ad63e82\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/c7fd6a8e-d955-44f2-921b-0bf75ad63e82\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"c7fd6a8e-d955-44f2-921b-0bf75ad63e82\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-09-29T21:07:27Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"96409b7f-4ab2-4300-8b91-4b42148936c8\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/96409b7f-4ab2-4300-8b91-4b42148936c8\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"96409b7f-4ab2-4300-8b91-4b42148936c8\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-09-29T19:35:19Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"5659a5e7-3e6c-4fa3-b92e-718c2c3f71b1\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/5659a5e7-3e6c-4fa3-b92e-718c2c3f71b1\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"5659a5e7-3e6c-4fa3-b92e-718c2c3f71b1\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-09-29T19:32:51Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"518610ed-41dd-460d-ae77-3faf82d0d0ae\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/518610ed-41dd-460d-ae77-3faf82d0d0ae\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"518610ed-41dd-460d-ae77-3faf82d0d0ae\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-09-29T19:29:46Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"a80de0c4-651e-4f7e-98b7-5ae2b2427732\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/a80de0c4-651e-4f7e-98b7-5ae2b2427732\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"a80de0c4-651e-4f7e-98b7-5ae2b2427732\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-09-29T19:27:49Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"8ba213fa-e272-4658-849b-9dcb355be3c6\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/8ba213fa-e272-4658-849b-9dcb355be3c6\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"8ba213fa-e272-4658-849b-9dcb355be3c6\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-09-29T19:23:09Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"9d16de8b-54ff-4b17-9b07-c883d52c3030\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/9d16de8b-54ff-4b17-9b07-c883d52c3030\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"9d16de8b-54ff-4b17-9b07-c883d52c3030\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-09-29T19:19:48Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"25fcbad1-3bdc-48e0-a896-4b1ba2067169\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/25fcbad1-3bdc-48e0-a896-4b1ba2067169\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"25fcbad1-3bdc-48e0-a896-4b1ba2067169\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-09-29T19:12:36Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"8df4b5cb-68a7-4f45-803d-176fcd0639d5\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/8df4b5cb-68a7-4f45-803d-176fcd0639d5\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"8df4b5cb-68a7-4f45-803d-176fcd0639d5\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-09-16T04:54:22Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 121\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"febb458d-6529-4107-8720-689acb58eee3\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/febb458d-6529-4107-8720-689acb58eee3\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"febb458d-6529-4107-8720-689acb58eee3\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-09-15T18:41:36Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 121\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"711ff136-be22-4a9d-a1af-b5613a6d1bde\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/711ff136-be22-4a9d-a1af-b5613a6d1bde\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"711ff136-be22-4a9d-a1af-b5613a6d1bde\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-09-10T17:25:43Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"01844705-6daf-49bf-a7aa-aa7e9a2d29dc\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/01844705-6daf-49bf-a7aa-aa7e9a2d29dc\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"01844705-6daf-49bf-a7aa-aa7e9a2d29dc\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-08-27T22:11:52Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"409a164a-cbe8-4d5c-b7da-313e4cd617f5\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/409a164a-cbe8-4d5c-b7da-313e4cd617f5\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"409a164a-cbe8-4d5c-b7da-313e4cd617f5\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-07-16T21:45:24Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"39e3bee1-28c7-46f2-bd5b-c062056fdcc9\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/39e3bee1-28c7-46f2-bd5b-c062056fdcc9\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"39e3bee1-28c7-46f2-bd5b-c062056fdcc9\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-07-16T20:18:53Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"fc72cb67-6816-482d-935a-5a25bd359fcc\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/fc72cb67-6816-482d-935a-5a25bd359fcc\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"fc72cb67-6816-482d-935a-5a25bd359fcc\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-07-15T23:16:27Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"3084fe28-7cfd-4608-a7cd-10b2e87418f2\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/3084fe28-7cfd-4608-a7cd-10b2e87418f2\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"3084fe28-7cfd-4608-a7cd-10b2e87418f2\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-06-24T18:42:56Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1001\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"cf4b39fc-4639-4fba-814d-32f39f0356d9\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/cf4b39fc-4639-4fba-814d-32f39f0356d9\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"cf4b39fc-4639-4fba-814d-32f39f0356d9\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-06-24T18:42:48Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1001\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"c28e5d3a-36ed-4166-996c-b6961fb1ac35\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/c28e5d3a-36ed-4166-996c-b6961fb1ac35\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"c28e5d3a-36ed-4166-996c-b6961fb1ac35\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-06-24T16:36:14Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1001\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"7b3a2f6d-cc52-49d6-8d21-68557c29e0a6\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/7b3a2f6d-cc52-49d6-8d21-68557c29e0a6\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"7b3a2f6d-cc52-49d6-8d21-68557c29e0a6\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-06-24T15:17:33Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1001\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"3ec6550c-bf8b-449b-ba96-394308ffbc3c\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/3ec6550c-bf8b-449b-ba96-394308ffbc3c\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"3ec6550c-bf8b-449b-ba96-394308ffbc3c\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-06-23T21:22:35Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1001\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"878ebf01-46cf-458d-9b2f-4f0b7ce4bee8\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/878ebf01-46cf-458d-9b2f-4f0b7ce4bee8\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"878ebf01-46cf-458d-9b2f-4f0b7ce4bee8\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-06-18T15:20:01Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1001\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"a96d1500-605b-4de9-bd1b-0090764f4460\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/a96d1500-605b-4de9-bd1b-0090764f4460\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"a96d1500-605b-4de9-bd1b-0090764f4460\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-06-18T14:46:20Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1001\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"1348122e-0e1a-4cd3-b3b1-994ef86c0424\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/1348122e-0e1a-4cd3-b3b1-994ef86c0424\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"1348122e-0e1a-4cd3-b3b1-994ef86c0424\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-06-18T14:40:35Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1001\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"6fc2b641-7948-4f40-8772-9e38099fbb45\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/6fc2b641-7948-4f40-8772-9e38099fbb45\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"6fc2b641-7948-4f40-8772-9e38099fbb45\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-06-18T06:30:41Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"68613162-e89b-4bd0-a43f-6288e685fe85\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/68613162-e89b-4bd0-a43f-6288e685fe85\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"68613162-e89b-4bd0-a43f-6288e685fe85\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-06-18T05:17:36Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1001\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"STANDARDSKUPUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"6b3ebfc8-b53a-4ff6-aa9b-ad9010816815\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/6b3ebfc8-b53a-4ff6-aa9b-ad9010816815\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"6b3ebfc8-b53a-4ff6-aa9b-ad9010816815\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-06-18T01:24:09Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1001\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"STANDARDSKUPUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"be904e35-ce91-42fc-a9e3-2e38b6aecb66\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/be904e35-ce91-42fc-a9e3-2e38b6aecb66\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"be904e35-ce91-42fc-a9e3-2e38b6aecb66\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-06-18T01:11:40Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1001\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"33130ec0-df6f-407e-84d0-2f7736b6fa85\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/33130ec0-df6f-407e-84d0-2f7736b6fa85\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"33130ec0-df6f-407e-84d0-2f7736b6fa85\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-06-18T00:48:46Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1001\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"349b4828-4316-4c67-9a33-6091a542510d\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/349b4828-4316-4c67-9a33-6091a542510d\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"349b4828-4316-4c67-9a33-6091a542510d\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-06-17T20:49:27Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1001\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"95e0112d-6d97-44de-8e6d-fd024b6e3174\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/95e0112d-6d97-44de-8e6d-fd024b6e3174\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"95e0112d-6d97-44de-8e6d-fd024b6e3174\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-06-17T18:59:17Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1001\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"c545f7b4-7d1c-42e1-893b-023043d8b38d\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/c545f7b4-7d1c-42e1-893b-023043d8b38d\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"c545f7b4-7d1c-42e1-893b-023043d8b38d\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-06-17T16:17:56Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1001\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"156c875c-5220-4b77-8b2d-a736d2a21694\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/156c875c-5220-4b77-8b2d-a736d2a21694\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"156c875c-5220-4b77-8b2d-a736d2a21694\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-06-17T15:50:28Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1001\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"172c4dab-1ff0-48ca-9fc9-bc1db6a793e1\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/172c4dab-1ff0-48ca-9fc9-bc1db6a793e1\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"172c4dab-1ff0-48ca-9fc9-bc1db6a793e1\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-06-10T22:47:02Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1001\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"c2cf8eaf-17d9-473b-a884-36be1d441a88\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/c2cf8eaf-17d9-473b-a884-36be1d441a88\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"c2cf8eaf-17d9-473b-a884-36be1d441a88\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "9f6cce51-6baf-4de5-a3c4-6f58b85315b9" + } +} \ No newline at end of file diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_ListQuotaRequestWithFilter.json b/sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_ListQuotaRequestWithFilter.json new file mode 100644 index 000000000000..ab4ec0eb4ab9 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_ListQuotaRequestWithFilter.json @@ -0,0 +1,71 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests?api-version=2021-03-15-preview&$filter=provisioningState%20eq%20'Failed'&$top=5", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWY2Y2NlNTEtNmJhZi00ZGU1LWEzYzQtNmY1OGI4NTMxNWI5L3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yay9sb2NhdGlvbnMvd2VzdHVzL3Byb3ZpZGVycy9NaWNyb3NvZnQuUXVvdGEvcXVvdGFSZXF1ZXN0cz9hcGktdmVyc2lvbj0yMDIxLTAzLTE1LXByZXZpZXcmJGZpbHRlcj1wcm92aXNpb25pbmdTdGF0ZSUyMGVxJTIwJTI3RmFpbGVkJTI3JiR0b3A9NQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "537f6aa7-ba49-4a1c-b043-88865da9f214" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.8.4420.0", + "OSName/Windows", + "OSVersion/10.0.22000.0", + "Microsoft.Azure.Management.Quota.AzureQuotaExtensionAPIClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "MS-RequestId": [ + "i4onj08VOU-S5yEPfc3Zjw.0" + ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ + "99" + ], + "x-ms-request-id": [ + "0b09e8d5-6fd8-43c3-9557-c0c298ac7bea" + ], + "x-ms-correlation-request-id": [ + "0b09e8d5-6fd8-43c3-9557-c0c298ac7bea" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20211101T202922Z:0b09e8d5-6fd8-43c3-9557-c0c298ac7bea" + ], + "Cache-Control": [ + "no-store, must-revalidate, no-cache" + ], + "Date": [ + "Mon, 01 Nov 2021 20:29:21 GMT" + ], + "Server": [ + "Kestrel" + ], + "Content-Length": [ + "3433" + ], + "Content-Type": [ + "application/json" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-11-01T19:49:44Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1005\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"e4d1543f-0eaf-4fbf-8edc-de0fc32624c2\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/e4d1543f-0eaf-4fbf-8edc-de0fc32624c2\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"e4d1543f-0eaf-4fbf-8edc-de0fc32624c2\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-10-20T18:24:45Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1005\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"71838bc4-e15d-4107-adb3-933b20ac5e9d\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/71838bc4-e15d-4107-adb3-933b20ac5e9d\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"71838bc4-e15d-4107-adb3-933b20ac5e9d\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-10-15T16:17:41Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"2ff97b4e-d0da-477a-865a-7158bf4b3914\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/2ff97b4e-d0da-477a-865a-7158bf4b3914\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"2ff97b4e-d0da-477a-865a-7158bf4b3914\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-10-15T16:08:39Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1000\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"94ea57f4-4e3b-4a68-8b07-209c170cd625\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/94ea57f4-4e3b-4a68-8b07-209c170cd625\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"94ea57f4-4e3b-4a68-8b07-209c170cd625\"\r\n },\r\n {\r\n \"properties\": {\r\n \"error\": {\r\n \"code\": \"ContactSupport\",\r\n \"message\": \"Request failed.\"\r\n },\r\n \"message\": \"Request failed.\",\r\n \"provisioningState\": \"Failed\",\r\n \"requestSubmitTime\": \"2021-10-15T16:04:37Z\",\r\n \"value\": [\r\n {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 0\r\n },\r\n \"message\": \"Request failed.\",\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"subRequestId\": \"506195bf-0162-4951-8048-4ce695334d95\"\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/506195bf-0162-4951-8048-4ce695334d95\",\r\n \"type\": \"Microsoft.Quota/QuotaRequests\",\r\n \"name\": \"506195bf-0162-4951-8048-4ce695334d95\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "9f6cce51-6baf-4de5-a3c4-6f58b85315b9" + } +} \ No newline at end of file diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_ListUsage.json b/sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_ListUsage.json new file mode 100644 index 000000000000..76c6f5df627b --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_ListUsage.json @@ -0,0 +1,71 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages?api-version=2021-03-15-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWY2Y2NlNTEtNmJhZi00ZGU1LWEzYzQtNmY1OGI4NTMxNWI5L3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yay9sb2NhdGlvbnMvd2VzdHVzL3Byb3ZpZGVycy9NaWNyb3NvZnQuUXVvdGEvdXNhZ2VzP2FwaS12ZXJzaW9uPTIwMjEtMDMtMTUtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1ecf3797-b9da-45de-b854-484165d0d949" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.8.4420.0", + "OSName/Windows", + "OSVersion/10.0.22000.0", + "Microsoft.Azure.Management.Quota.AzureQuotaExtensionAPIClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "MS-RequestId": [ + "Fq2gnZxMoUKdeDVJ9WXHqg.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "71a00b29-2965-479f-9eee-a4dd610df3e5" + ], + "x-ms-correlation-request-id": [ + "71a00b29-2965-479f-9eee-a4dd610df3e5" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20211101T194850Z:71a00b29-2965-479f-9eee-a4dd610df3e5" + ], + "Cache-Control": [ + "no-store, must-revalidate, no-cache" + ], + "Date": [ + "Mon, 01 Nov 2021 19:48:49 GMT" + ], + "Server": [ + "Kestrel" + ], + "Content-Length": [ + "18086" + ], + "Content-Type": [ + "application/json" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 1000\r\n },\r\n \"name\": {\r\n \"value\": \"VirtualNetworks\",\r\n \"localizedValue\": \"Virtual Networks\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"VirtualNetworks\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 1000\r\n },\r\n \"name\": {\r\n \"value\": \"StaticPublicIPAddresses\",\r\n \"localizedValue\": \"Static Public IP Addresses\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"StaticPublicIPAddresses\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 5000\r\n },\r\n \"name\": {\r\n \"value\": \"NetworkSecurityGroups\",\r\n \"localizedValue\": \"Network Security Groups\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"NetworkSecurityGroups\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 1000\r\n },\r\n \"name\": {\r\n \"value\": \"PublicIPAddresses\",\r\n \"localizedValue\": \"Public IP Addresses - Basic\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": true\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"PublicIPAddresses\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 5\r\n },\r\n \"name\": {\r\n \"value\": \"CustomIpPrefixes\",\r\n \"localizedValue\": \"Custom Ip Prefixes\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"CustomIpPrefixes\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 2147483647\r\n },\r\n \"name\": {\r\n \"value\": \"PublicIpPrefixes\",\r\n \"localizedValue\": \"Public Ip Prefixes\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"PublicIpPrefixes\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 2147483647\r\n },\r\n \"name\": {\r\n \"value\": \"NatGateways\",\r\n \"localizedValue\": \"Nat Gateways\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"NatGateways\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 65536\r\n },\r\n \"name\": {\r\n \"value\": \"NetworkInterfaces\",\r\n \"localizedValue\": \"Network Interfaces\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"NetworkInterfaces\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 65536\r\n },\r\n \"name\": {\r\n \"value\": \"PrivateEndpoints\",\r\n \"localizedValue\": \"Private Endpoints\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"PrivateEndpoints\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 2147483647\r\n },\r\n \"name\": {\r\n \"value\": \"PrivateEndpointRedirectMaps\",\r\n \"localizedValue\": \"Private Endpoint Redirect Maps\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"PrivateEndpointRedirectMaps\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 1000\r\n },\r\n \"name\": {\r\n \"value\": \"LoadBalancers\",\r\n \"localizedValue\": \"Load Balancers\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"LoadBalancers\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 800\r\n },\r\n \"name\": {\r\n \"value\": \"PrivateLinkServices\",\r\n \"localizedValue\": \"Private Link Services\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"PrivateLinkServices\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 1000\r\n },\r\n \"name\": {\r\n \"value\": \"ApplicationGateways\",\r\n \"localizedValue\": \"Application Gateways\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"ApplicationGateways\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 200\r\n },\r\n \"name\": {\r\n \"value\": \"RouteTables\",\r\n \"localizedValue\": \"Route Tables\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"RouteTables\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 1000\r\n },\r\n \"name\": {\r\n \"value\": \"RouteFilters\",\r\n \"localizedValue\": \"Route Filters\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"RouteFilters\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 1\r\n },\r\n \"name\": {\r\n \"value\": \"NetworkWatchers\",\r\n \"localizedValue\": \"Network Watchers\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"NetworkWatchers\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 10000\r\n },\r\n \"name\": {\r\n \"value\": \"PacketCaptures\",\r\n \"localizedValue\": \"Packet Captures\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"PacketCaptures\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 3000\r\n },\r\n \"name\": {\r\n \"value\": \"ApplicationSecurityGroups\",\r\n \"localizedValue\": \"Application Security Groups.\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"ApplicationSecurityGroups\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 1\r\n },\r\n \"name\": {\r\n \"value\": \"DdosProtectionPlans\",\r\n \"localizedValue\": \"DDoS Protection Plans.\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"DdosProtectionPlans\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 200\r\n },\r\n \"name\": {\r\n \"value\": \"DdosCustomPolicies\",\r\n \"localizedValue\": \"DDoS customized policies\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"DdosCustomPolicies\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 500\r\n },\r\n \"name\": {\r\n \"value\": \"ServiceEndpointPolicies\",\r\n \"localizedValue\": \"Service Endpoint Policies\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"ServiceEndpointPolicies\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 200\r\n },\r\n \"name\": {\r\n \"value\": \"NetworkIntentPolicies\",\r\n \"localizedValue\": \"Network Intent Policies\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"NetworkIntentPolicies\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 1000\r\n },\r\n \"name\": {\r\n \"value\": \"StandardSkuLoadBalancers\",\r\n \"localizedValue\": \"Standard Sku Load Balancers\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"StandardSkuLoadBalancers\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 1000\r\n },\r\n \"name\": {\r\n \"value\": \"StandardSkuPublicIpAddresses\",\r\n \"localizedValue\": \"Public IP Addresses - Standard\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"StandardSkuPublicIpAddresses\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 20\r\n },\r\n \"name\": {\r\n \"value\": \"DnsServersPerVirtualNetwork\",\r\n \"localizedValue\": \"DNS servers per Virtual Network\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"DnsServersPerVirtualNetwork\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 5\r\n },\r\n \"name\": {\r\n \"value\": \"CustomDnsServersPerP2SVpnGateway\",\r\n \"localizedValue\": \"Custom DNS servers per P2SVpnGateway\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"CustomDnsServersPerP2SVpnGateway\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 3000\r\n },\r\n \"name\": {\r\n \"value\": \"SubnetsPerVirtualNetwork\",\r\n \"localizedValue\": \"Subnets per Virtual Network\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"SubnetsPerVirtualNetwork\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 65536\r\n },\r\n \"name\": {\r\n \"value\": \"IPConfigurationsPerVirtualNetwork\",\r\n \"localizedValue\": \"IP Configurations per Virtual Network\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"IPConfigurationsPerVirtualNetwork\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 500\r\n },\r\n \"name\": {\r\n \"value\": \"PeeringsPerVirtualNetwork\",\r\n \"localizedValue\": \"Peerings per Virtual Network\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"PeeringsPerVirtualNetwork\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 1000\r\n },\r\n \"name\": {\r\n \"value\": \"SecurityRulesPerNetworkSecurityGroup\",\r\n \"localizedValue\": \"Security rules per Network Security Group\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"SecurityRulesPerNetworkSecurityGroup\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 100\r\n },\r\n \"name\": {\r\n \"value\": \"SecurityRulesPerNetworkIntentPolicy\",\r\n \"localizedValue\": \"Security rules per Network Intent Policy\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"SecurityRulesPerNetworkIntentPolicy\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 200\r\n },\r\n \"name\": {\r\n \"value\": \"RoutesPerNetworkIntentPolicy\",\r\n \"localizedValue\": \"Routes per Network Intent Policy\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"RoutesPerNetworkIntentPolicy\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 4000\r\n },\r\n \"name\": {\r\n \"value\": \"SecurityRuleAddressesOrPortsPerNetworkSecurityGroup\",\r\n \"localizedValue\": \"Security rules addresses or ports per Network Security Group\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"SecurityRuleAddressesOrPortsPerNetworkSecurityGroup\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 250\r\n },\r\n \"name\": {\r\n \"value\": \"InboundRulesPerLoadBalancer\",\r\n \"localizedValue\": \"Inbound Rules per Load Balancer\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"InboundRulesPerLoadBalancer\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 200\r\n },\r\n \"name\": {\r\n \"value\": \"FrontendIPConfigurationPerLoadBalancer\",\r\n \"localizedValue\": \"Frontend IP Configurations per Load Balancer\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"FrontendIPConfigurationPerLoadBalancer\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 5\r\n },\r\n \"name\": {\r\n \"value\": \"OutboundRulesPerLoadBalancer\",\r\n \"localizedValue\": \"Outbound Rules per Load Balancer\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"OutboundRulesPerLoadBalancer\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 400\r\n },\r\n \"name\": {\r\n \"value\": \"RoutesPerRouteTable\",\r\n \"localizedValue\": \"Routes per Route Table\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"RoutesPerRouteTable\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 25\r\n },\r\n \"name\": {\r\n \"value\": \"RoutesWithServiceTagPerRouteTable\",\r\n \"localizedValue\": \"Routes with service tag per Route Table\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"RoutesWithServiceTagPerRouteTable\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 256\r\n },\r\n \"name\": {\r\n \"value\": \"SecondaryIPConfigurationsPerNetworkInterface\",\r\n \"localizedValue\": \"Secondary IP Configurations per Network Interface\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"SecondaryIPConfigurationsPerNetworkInterface\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 300\r\n },\r\n \"name\": {\r\n \"value\": \"InboundNatOrLbRulesPerNetworkInterface\",\r\n \"localizedValue\": \"Inbound rules per Network Interface\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"InboundNatOrLbRulesPerNetworkInterface\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 1\r\n },\r\n \"name\": {\r\n \"value\": \"RouteFilterRulesPerRouteFilter\",\r\n \"localizedValue\": \"Route filter rules per Route Filter\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"RouteFilterRulesPerRouteFilter\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 1\r\n },\r\n \"name\": {\r\n \"value\": \"RouteFiltersPerExpressRouteBgpPeering\",\r\n \"localizedValue\": \"Route filters per Express route BGP Peering\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"RouteFiltersPerExpressRouteBgpPeering\"\r\n },\r\n {\r\n \"properties\": {\r\n \"usages\": {\r\n \"UsagesType\": \"Independent\",\r\n \"Value\": 28\r\n },\r\n \"name\": {\r\n \"value\": \"MinPublicIpInterNetworkPrefixLength\",\r\n \"localizedValue\": \"Public IPv4 Prefix Length\"\r\n },\r\n \"properties\": {},\r\n \"unit\": \"Count\",\r\n \"isQuotaApplicable\": false\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/usages\",\r\n \"type\": \"Microsoft.Quota/Usages\",\r\n \"name\": \"MinPublicIpInterNetworkPrefixLength\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "9f6cce51-6baf-4de5-a3c4-6f58b85315b9" + } +} \ No newline at end of file diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_SetQuota.json b/sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_SetQuota.json new file mode 100644 index 000000000000..dba63e827f02 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_SetQuota.json @@ -0,0 +1,86 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas/PublicIPAddresses?api-version=2021-03-15-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWY2Y2NlNTEtNmJhZi00ZGU1LWEzYzQtNmY1OGI4NTMxNWI5L3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yay9sb2NhdGlvbnMvd2VzdHVzL3Byb3ZpZGVycy9NaWNyb3NvZnQuUXVvdGEvcXVvdGFzL1B1YmxpY0lQQWRkcmVzc2VzP2FwaS12ZXJzaW9uPTIwMjEtMDMtMTUtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"value\": 1005\r\n },\r\n \"name\": {\r\n \"value\": \"PublicIPAddresses\"\r\n }\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "946ef6f7-390a-48e1-ae22-44a1c94479e0" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.8.4420.0", + "OSName/Windows", + "OSVersion/10.0.22000.0", + "Microsoft.Azure.Management.Quota.AzureQuotaExtensionAPIClient/1.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "171" + ] + }, + "ResponseHeaders": { + "Retry-After": [ + "30" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "MS-RequestId": [ + "BvUikGf-30Csj8CGpp8fvg.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/operationsStatus/e4d1543f-0eaf-4fbf-8edc-de0fc32624c2?api-version=2021-03-15-preview" + ], + "Operation-Location": [ + "https://management.azure.com/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/operationsStatus/e4d1543f-0eaf-4fbf-8edc-de0fc32624c2?api-version=2021-03-15-preview" + ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ + "24" + ], + "x-ms-request-id": [ + "a7d100b7-0284-4c2f-a821-7508143f8b32" + ], + "x-ms-correlation-request-id": [ + "a7d100b7-0284-4c2f-a821-7508143f8b32" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20211101T194947Z:a7d100b7-0284-4c2f-a821-7508143f8b32" + ], + "Cache-Control": [ + "no-store, must-revalidate, no-cache" + ], + "Date": [ + "Mon, 01 Nov 2021 19:49:46 GMT" + ], + "Server": [ + "Kestrel" + ], + "Content-Length": [ + "466" + ], + "Content-Type": [ + "application/json" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"limitType\": \"Independent\",\r\n \"value\": 1005\r\n },\r\n \"name\": {\r\n \"value\": \"PUBLICIPADDRESSES\"\r\n },\r\n \"properties\": {},\r\n \"provisioningState\": \"InProgress\",\r\n \"isQuotaApplicable\": true\r\n },\r\n \"id\": \"/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotaRequests/e4d1543f-0eaf-4fbf-8edc-de0fc32624c2\",\r\n \"type\": \"Microsoft.Quota/Quotas\",\r\n \"name\": \"e4d1543f-0eaf-4fbf-8edc-de0fc32624c2\"\r\n}", + "StatusCode": 202 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "9f6cce51-6baf-4de5-a3c4-6f58b85315b9" + } +} \ No newline at end of file diff --git a/sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_SetQuotaInvalidResourceName.json b/sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_SetQuotaInvalidResourceName.json new file mode 100644 index 000000000000..8a1715c95c19 --- /dev/null +++ b/sdk/quota/Microsoft.Azure.Management.Quota/tests/SessionRecords/QuotaTests/Test_SetQuotaInvalidResourceName.json @@ -0,0 +1,80 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/9f6cce51-6baf-4de5-a3c4-6f58b85315b9/providers/Microsoft.Network/locations/westus/providers/Microsoft.Quota/quotas/PublicIPAddress?api-version=2021-03-15-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWY2Y2NlNTEtNmJhZi00ZGU1LWEzYzQtNmY1OGI4NTMxNWI5L3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yay9sb2NhdGlvbnMvd2VzdHVzL3Byb3ZpZGVycy9NaWNyb3NvZnQuUXVvdGEvcXVvdGFzL1B1YmxpY0lQQWRkcmVzcz9hcGktdmVyc2lvbj0yMDIxLTAzLTE1LXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"limit\": {\r\n \"limitObjectType\": \"LimitValue\",\r\n \"value\": 1005\r\n },\r\n \"name\": {\r\n \"value\": \"PublicIPAddress\"\r\n }\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9167f614-eec2-490e-bf64-70acdb1df0c3" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.8.4420.0", + "OSName/Windows", + "OSVersion/10.0.22000.0", + "Microsoft.Azure.Management.Quota.AzureQuotaExtensionAPIClient/1.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "169" + ] + }, + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ + "24" + ], + "x-ms-request-id": [ + "a1c9a2cb-2e9a-4c1b-9ee4-595b5d2c8e6a" + ], + "x-ms-correlation-request-id": [ + "a1c9a2cb-2e9a-4c1b-9ee4-595b5d2c8e6a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20211101T203529Z:a1c9a2cb-2e9a-4c1b-9ee4-595b5d2c8e6a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 01 Nov 2021 20:35:29 GMT" + ], + "Server": [ + "Kestrel" + ], + "Content-Length": [ + "101" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"InvalidResourceName\",\r\n \"message\": \"Name PublicIPAddress is not valid resource name.\"\r\n }\r\n}", + "StatusCode": 400 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "9f6cce51-6baf-4de5-a3c4-6f58b85315b9" + } +} \ No newline at end of file