Azure Quota Service API
The Azure Quota Service REST API is designed for viewing and managing quotas for Azure resource providers that are onboarded to the Azure Quota Service.
Important
Azure Quota Service API preview
A new Azure Quota API version is available in Public Preview. This API uses Microsoft.Quota Resource Provider supports Azure virtual machines (cores/vCPU), Azure Machine Learning (dedicated/vCPUs), Networking, Azure HPC Cache, and Azure Purview services.
A quota is the service limit or allowance set on a resource in your Azure subscription. Each Azure service defines its quotas and determines its default values. For more information on the most common Microsoft Azure quotas, see Azure subscription and service limits, quotas, and constraints.
REST operation groups
The Azure Service Quota API supports these groups of REST operations:
Operation group | Description |
---|---|
Quota Operations | Provide a list of all quota operations the Microsoft.Quota resource provider supports. |
Quotas | Create or update the quota for a specified resource. Get the current quota of a resource which can be used to determine its remaining quota. Get a list of current quotas of all resources for the specified scope. Increase a quota. |
Quota Request Status | Provide details and status for a specific quota request. List the current quota requests for a period of one year with filters. |
Usages | Provides a list of the current usage for each of the resources in the specified scope. Provides the current usage of a resource for the specified scope. |
Prerequisites
Important
Before you can use Quota API, you must:
Registering the Microsoft Quota resource provider
To register the Microsoft Capacity resource provider, use this PowerShell command:
Register-AzResourceProvider -ProviderNamespace Microsoft.Quota
It returns results similar to this output:
ProviderNamespace : Microsoft.Quota
RegistrationState : Registering
ResourceTypes : {usages, quotas, quotaRequests, operationsStatus...}
Locations : {West Europe, East US, South Central US...}
Once the Microsoft.Quota resource provider is registered, the RegistrationState
will be set to Registered
. For more information on managing Azure resource providers, see Azure resource providers.
Throttling
Every subscription-level and tenant-level API calls can be throttled if you send too many API requests. If your API call is throttled, you'll get an error message stating that the server rejected the API request. You can retry the API call after some time has elapsed.
For details on API throttling, how to troubleshoot throttling issues, and how to avoid being throttled, see Troubleshooting throttling errors in Azure.
Troubleshooting Quota API errors
Use the following tables to troubleshoot errors you might get while using Quota API.
Error code | How to solve it |
---|---|
ContactSupport | Open a new support request in the Azure portal. Under Select an issue type, choose Service and subscription limits (quotas). You can also open it programmatically using the Azure Support REST API. |
InternalServerError | Internal server error. Retry the API call later. |
MissingRegistration | Register the Microsoft.Capacity resource provider for each of your subscriptions. For troubleshooting guidance, see Resolve errors for resource provider registration. |
QuotaNotAvailableForResource | Quota is currently unavailable in the location for the requested resource. Open a new support request in the Azure portal. Under Select an issue type, choose Service and subscription limits (quotas). You can also open it programmatically using the Azure Support REST API. |
QuotaReductionNotSupported | The current quota limit is higher than the requested quota or the current usage is higher than the requested quota. Reducing quotas is not supported. The quota cannot be reduced. |
RequestThrottled | Every subscription-level and tenant-level API requests may be throttled to help with the overall performance of the service. The number of requests exceeded the maximum allowed API request rate. Try again later. |
ResourceNotAvailableForOffer | The resource is currently unavailable in the location for the offer type. For the list of current and retired offers, see the Microsoft Azure Offer Details page. To change your offer type, see the Change your Azure subscription to a different offer page. You can also open a new support request in the Azure portal. Under Select an issue type, choose Service and subscription limits (quotas). You can also open it programmatically using the Azure Support REST API. |
ResourceNotAvailableForSubscription | The resource is currently unavailable in the location for the requested subscription. Open a new support request in the Azure portal. Under Select an issue type, choose Service and subscription limits (quotas). You can also open it programmatically using the Azure Support REST API. |
UnableToIncreaseQuota | Unable to increase quotas for the requested subscriptions. Open a new support request in the Azure portal. Under Select an issue type, choose Service and subscription limits (quotas). |
Support in other languages and interfaces
The Quota REST API is available in the following language-specific Microsoft Azure SDKs:
- Microsoft Azure SDK for .NET: NuGet package
- Microsoft Azure SDK for Java: Java package
- Microsoft Azure SDK for Python: Py package
- Microsoft Azure SDK for JavaScript (NodeJS & Browser): JavaScript package
- Microsoft Azure SDK for Go: Go package
- Microsoft Azure CLI extensions: Cli package
Using Azure portal and Support API to manage quotas
Azure enables you to create and manage support requests, also known as support tickets. You can: