Azure Quota API

The Quota API is a REST API that you can use to view and manage quotas for Azure services.

Important

Quota API general availability

Azure Quota API is now generally available. It currently supports Azure virtual machines (cores/vCPU) and Azure Machine Learning services (dedicated/vCPUs).

Note: A new version of Quota REST API is in public preview, at Azure Quota Service Rest API. It uses Microsoft.Quota resource provider and supports Azure virtual machines (cores/vCPU), Azure Machine Learning, Azure networking, Azure HPC Cache and Azure Purview services.

Quotas are the maximum values for resources, action, and items in your Azure subscription. Each Azure service defines its quotas and determines its default values. Depending on your business needs, you might need to increase your quota values.

For more information on the most common Microsoft Azure limits, see Azure subscription and service limits, quotas, and constraints.

Using Quota API

With Quota API you can:

  • Get the current quotas and usages of a resource.
  • Get a list of current quotas and usages of all the resources.
  • Create or update quotas of a resource.
  • Get the status of quota requests for a resource.
  • Get the list of all quota requests of a resource for one year.

REST operations

Azure Quota API makes it easy to look up your quotas and request increases using these REST operations:

Prerequisites

Important

Before you can use Quota API, you must:

Registering the Microsoft Capacity resource provider

To register the Microsoft Capacity resource provider, use this PowerShell command:

Register-AzResourceProvider -ProviderNamespace Microsoft.Capacity

It returns results similar to this output:

ProviderNamespace : Microsoft.Capacity
RegistrationState : Registering
ResourceTypes     : {resources, reservationOrders, reservationOrders/reservations, listbenefits...}
Locations         : {West Europe, East US, South Central US...}

Once the Microsoft.Capacity resource provider is registered, the RegistrationState will be set to Registered. For more information on managing Azure resource providers, see Azure resource providers.

Quota Request Operator role

The Quota Request Operator role is an Azure built-in role customized for quota operations. It grants permissions to read and create quota requests, get quota request status, and create support tickets. Assign this role to users, groups, service principals, managed identities, and applications that do quota operations. For reference, the Quota Request Operator role ID is 0e5f05e5-9ab9-446b-b98d-1e2157c94125.

vCPU quotas

You can use Quota API to manage quotas for these two types of vCPU quotas:

  • Standard vCPU quota for Pay-as-you-go VMs and reserved VM instances.
  • Spot vCPU quota for Spot VMs.

To learn more about Azure limits and quotas, see Azure subscription and service limits, quotas, and constraints.

Azure Machine Learning quotas

You can use Quota API to manage quotas for Azure Machine Learning workspaces and compute. Read the Manage and increase quotas for resources with Azure Machine Learning article to learn about:

  • Default limits on Azure resources related to Azure Machine Learning.
  • Creating workspace-level quotas.
  • Viewing your quotas and limits.
  • Requesting quota increases.
  • Private endpoint and DNS quotas.

Regions

Most quotas are specific for a workload in any one region. Request separate quotas for each region where you want to deploy a service. To list all Azure regions in which the service exists, use the List By Service Regions operation.

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:

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: