Subchapter 23.2
references/commands.mdMarkdown10 KBView on GitHub
Comprehensive reference for Azure CLI quota commands.
Install quota extension (required):
az extension add --name quota⚠️ CRITICAL: ALWAYS USE CLI FIRST
Azure CLI is the ONLY reliable method for quota checks. Use
az quotacommands FIRST, always.DO NOT use REST API or Azure Portal as your first approach. They are unreliable.
Required workflow:
- FIRST: Try
az quota list/az quota show/az quota usage show- If CLI returns
BadRequest: Resource provider doesn’t support quota API → use Azure service limits docs (opens in a new tab)- Never start with REST API or Portal - only use as fallback
Why REST API/Portal are unreliable:
- REST API returns “No Limit” or “Unlimited” values that are MISLEADING
- “No Limit” DOES NOT mean unlimited capacity - usually means resource doesn’t support quota API
- Service-specific limits still apply even when REST API shows “No Limit”
- Portal may show incomplete or cached quota data
- REST API lacks proper error handling for unsupported providers
If you see “No Limit” in REST API/Portal:
- ❌ This is NOT unlimited capacity
- ✅ It means quota API doesn’t support that resource type
- ✅ Check Azure service limits docs (opens in a new tab) for actual limits
- ✅ Regional capacity constraints may still exist
⚠️ CRITICAL: No 1:1 mapping exists between ARM resource types and quota names. Always discover via az quota list.
Discovery workflow:
az quota list --scope /subscriptions/{id}/providers/{Provider}/locations/{region}properties.name.localizedValue to your resource typename value in subsequent commandsExample mappings:
| ARM Type | Quota Name |
|---|---|
Microsoft.App/managedEnvironments | ManagedEnvironmentCount |
Microsoft.Compute/virtualMachines | standardDSv3Family, cores, virtualMachines |
Microsoft.Network/publicIPAddresses | PublicIPAddresses, IPv4StandardSkuPublicIpAddresses |
| Command | Description |
|---|---|
| az quota list | List all quota limits for a scope |
| az quota show | Show quota limit for specific resource |
| az quota usage list | List current usage for all resources |
| az quota usage show | Show current usage for specific resource |
| az quota update | Request quota increase |
| az quota create | Create quota limit (advanced) |
See advanced-commands.md for request status and operation commands.
List all quota limits for a scope. Use this first to discover quota resource names.
Syntax:
az quota list --scope SCOPE [--max-items N] [--next-token TOKEN]Required:
--scope - Azure resource URI: /subscriptions/{id}/providers/{Provider}/locations/{region}Examples:
# List compute quotas
az quota list --scope /subscriptions/{id}/providers/Microsoft.Compute/locations/eastus
# List network quotas
az quota list --scope /subscriptions/{id}/providers/Microsoft.Network/locations/eastus
# Table format
az quota list --scope /subscriptions/{id}/providers/Microsoft.Compute/locations/eastus --output tableKey output fields:
name - Quota resource name (use in other commands)properties.name.localizedValue - Human-readable descriptionproperties.limit.value - Quota limitShow quota limit for a specific resource.
Syntax:
az quota show --resource-name NAME --scope SCOPERequired:
--resource-name - Quota resource name (from az quota list)--scope - Azure resource URIExample:
# Get DSv3 family vCPU limit
az quota show \
--resource-name standardDSv3Family \
--scope /subscriptions/{id}/providers/Microsoft.Compute/locations/eastusKey output fields:
properties.limit.value - Quota limitproperties.name.localizedValue - Human-readable descriptionproperties.quotaPeriod - Reset period (e.g., P1M = 1 month)Request quota increase for a resource.
Syntax:
az quota update --resource-name NAME --scope SCOPE --limit-object value=N [--resource-type TYPE] [--no-wait]Required:
--resource-name - Quota resource name--scope - Azure resource URI--limit-object - New limit value (format: value=N)Optional:
--resource-type - Resource type (e.g., dedicated, lowPriority)--no-wait - Don’t wait for completion (true/false)Examples:
# Increase FSv2 family vCPUs to 100
az quota update \
--resource-name standardFSv2Family \
--scope /subscriptions/{id}/providers/Microsoft.Compute/locations/eastus \
--limit-object value=100 \
--resource-type dedicated
# Non-blocking request
az quota update \
--resource-name standardFSv2Family \
--scope /subscriptions/{id}/providers/Microsoft.Compute/locations/eastus \
--limit-object value=100 \
--no-wait trueList current usage for all resources in a scope.
Syntax:
az quota usage list --scope SCOPE [--max-items N] [--next-token TOKEN]Required:
--scope - Azure resource URIExamples:
# List compute usage
az quota usage list --scope /subscriptions/{id}/providers/Microsoft.Compute/locations/eastus
# Table format
az quota usage list --scope /subscriptions/{id}/providers/Microsoft.Compute/locations/eastus --output tableKey output:
properties.usages.value - Current usage countaz quota show to calculate available capacityShow current usage for a specific resource.
Syntax:
az quota usage show --resource-name NAME --scope SCOPERequired:
--resource-name - Quota resource name--scope - Azure resource URIExample:
az quota usage show \
--resource-name standardDSv3Family \
--scope /subscriptions/{id}/providers/Microsoft.Compute/locations/eastusCalculate available capacity:
az quota show --resource-name {name} --scope {scope} → limit valueaz quota usage show --resource-name {name} --scope {scope} → current usageExample calculation:
az quota show): 350 vCPUsaz quota usage show): 12 vCPUsCreate quota limit for a resource. Rarely used - typically use az quota update instead.
Syntax:
az quota create --resource-name NAME --scope SCOPE --limit-object value=N [--resource-type TYPE]Required:
--resource-name - Quota resource name--scope - Azure resource URI--limit-object - Quota limit valueExamples:
# Create network quota
az quota create \
--resource-name MinPublicIpInterNetworkPrefixLength \
--scope /subscriptions/{id}/providers/Microsoft.Network/locations/eastus \
--limit-object value=10 \
--resource-type MinPublicIpInterNetworkPrefixLength
# Create ML quota
az quota create \
--resource-name TotalLowPriorityCores \
--scope /subscriptions/{id}/providers/Microsoft.MachineLearningServices/locations/eastus \
--limit-object value=10 \
--resource-type lowPriorityNot all Azure resource providers support the quota API. If you receive a BadRequest error when running az quota list, the provider likely doesn’t support quota commands.
Example - Microsoft.DocumentDB (Cosmos DB):
az quota list --scope /subscriptions/{id}/providers/Microsoft.DocumentDB/locations/eastus
# Error: (BadRequest) Bad requestWorkarounds:
Testing provider support:
# Try listing quotas
az quota list --scope /subscriptions/{id}/providers/{Provider}/locations/{region}
# BadRequest error → not supported
# List of quotas → supported⚠️ CRITICAL WARNING: REST API “No Limit” is MISLEADING
If you see “No Limit”, “Unlimited”, or similar values in REST API or Azure Portal responses:
This DOES NOT mean unlimited capacity!
It most likely means:
- The resource provider doesn’t support the quota API
- Quota information isn’t available through this API
- The quota is managed at a different scope
DO NOT assume unlimited capacity. Always:
- Use
az quotaCLI commands first (preferred method)- If CLI returns
BadRequest, check Azure service limits documentation (opens in a new tab)- Consult service-specific documentation for actual limits
- Consider regional capacity constraints even without quota enforcement
| Error | Cause | Solution |
|---|---|---|
BadRequest | Provider not supported by quota API | Use CLI (preferred) or check Azure service limits docs (opens in a new tab) |
ExtensionNotFound | Quota extension not installed | Run az extension add --name quota |
MissingRegistration | Microsoft.Quota provider not registered | Run az provider register --namespace Microsoft.Quota |
InvalidScope | Incorrect scope format | Verify: /subscriptions/{id}/providers/{namespace}/locations/{region} |
QuotaNotAvailableForResource | Resource not available in region | Try different region |
RequestThrottled | Too many API calls | Implement exponential backoff |
Unsupported:
Supported: