Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Check and manage Azure subscription quotas, usage limits, and request capacity increases
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
SKILL.md
1---2name: azure-quotas3description: "Check/manage Azure quotas and usage across providers. For deployment planning, capacity validation, region selection. WHEN: \"check quotas\", \"service limits\", \"current usage\", \"request quota increase\", \"quota exceeded\", \"validate capacity\", \"regional availability\", \"provisioning limits\", \"vCPU limit\", \"how many vCPUs available in my subscription\"."4license: MIT5metadata:6author: Microsoft7version: "1.1.2"8---91011# Azure Quotas - Service Limits & Capacity Management1213> **AUTHORITATIVE GUIDANCE** — Follow these instructions exactly for quota management and capacity validation.1415## Overview1617**What are Azure Quotas?**1819Azure quotas (also called service limits) are the maximum number of resources you can deploy in a subscription. Quotas:20- Prevent accidental over-provisioning21- Ensure fair resource distribution across Azure22- Represent **available capacity** in each region23- Can be increased (adjustable quotas) or are fixed (non-adjustable)2425**Key Concept:** **Quotas = Resource Availability**2627If you don't have quota, you cannot deploy resources. Always check quotas when planning deployments or selecting regions.2829## When to Use This Skill3031Invoke this skill when:3233- **Planning a new deployment** - Validate capacity before deployment34- **Selecting an Azure region** - Compare quota availability across regions35- **Troubleshooting quota exceeded errors** - Check current usage vs limits36- **Requesting quota increases** - Submit increase requests via CLI or Portal37- **Comparing regional capacity** - Find regions with available quota38- **Validating provisioning limits** - Ensure deployment won't exceed quotas3940## Quick Reference4142| **Property** | **Details** |43|--------------|-------------|44| **Primary Tool** | Azure CLI (`az quota`) - **USE THIS FIRST, ALWAYS** |45| **Extension Required** | `az extension add --name quota` (MUST install first) |46| **Key Commands** | `az quota list`, `az quota show`, `az quota usage list`, `az quota usage show` |47| **Complete CLI Reference** | [commands.md](./references/commands.md) |48| **Azure Portal** | [My quotas](https://portal.azure.com/#blade/Microsoft_Azure_Capacity/QuotaMenuBlade/myQuotas) - Use only as fallback |49| **REST API** | Microsoft.Quota provider - **Unreliable, do NOT use first** |50| **MCP Server** | `azure-quota` MCP server — **NEVER use this. It is unreliable. Always use `az quota` CLI instead.** |51| **Required Permission** | Reader (view) or Quota Request Operator (manage) |5253> **⚠️ ALWAYS USE CLI FIRST**54>55> REST API and Portal can show misleading "No Limit" values — this does **not** mean unlimited capacity. It means the quota API doesn't support that resource type. Always start with `az quota` commands; fall back to [Azure service limits docs](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits) if CLI returns `BadRequest`.56>57> For complete CLI reference, see [commands.md](./references/commands.md).5859## Quota Types6061| **Type** | **Adjustability** | **Approval** | **Examples** |62|----------|-------------------|--------------|--------------|63| **Adjustable** | Can increase via Portal/CLI/API | Usually auto-approved | VM vCPUs, Public IPs, Storage accounts |64| **Non-adjustable** | Fixed limits | Cannot be changed | Subscription-wide hard limits |6566**Important:** Requesting quota increases is **free**. You only pay for resources you actually use, not for quota allocation.6768## Understanding Resource Name Mapping6970**⚠️ CRITICAL:** There is **NO 1:1 mapping** between ARM resource types and quota resource names.7172### Example Mappings7374| ARM Resource Type | Quota Resource Name |75|-------------------|---------------------|76| `Microsoft.App/managedEnvironments` | `ManagedEnvironmentCount` |77| `Microsoft.Compute/virtualMachines` | `standardDSv3Family`, `cores`, `virtualMachines` |78| `Microsoft.Network/publicIPAddresses` | `PublicIPAddresses`, `IPv4StandardSkuPublicIpAddresses` |7980### Discovery Workflow8182**Never assume the quota resource name from the ARM type.** Always use this workflow:83841. **List all quotas** for the resource provider:85```bash86az quota list --scope /subscriptions/<id>/providers/<ProviderNamespace>/locations/<region>87```88892. **Match by `localizedValue`** (human-readable description) to find the relevant quota90913. **Use the `name` field** (not ARM resource type) in subsequent commands:92```bash93az quota show --resource-name ManagedEnvironmentCount --scope ...94az quota usage show --resource-name ManagedEnvironmentCount --scope ...95```9697> **📖 Detailed mapping examples and workflow:** See [commands.md - Resource Name Mapping](./references/commands.md#resource-name-mapping)9899## Scripts100101Pre-built scripts handle quota extension installation, usage queries, and capacity calculation. Use these instead of constructing commands manually. A single call returns limits, usage, and available capacity.102103| Script | Purpose | Usage |104|--------|---------|-------|105| `scripts/check-quota.ps1` | Returns limit, usage, and available capacity for all quotas (or a single quota when resource name is provided) | Primary script for quota checks |106| `scripts/check-quota.sh` | Same as above (bash) | Primary script for quota checks |107108## Core Workflows109110### Workflow 1: Check Quota for a Specific Resource111112**Scenario:** Verify quota limits and current usage before deployment113114Run the script with the resource provider and region. It returns a table of **all** quotas with their limit, current usage, and available capacity in a single call:115116```powershell117.\scripts\check-quota.ps1 -ResourceProvider <provider> -Region <region>118```119```bash120./scripts/check-quota.sh <provider> <region>121```122123To check a single resource, add the resource name:124125```powershell126.\scripts\check-quota.ps1 -ResourceProvider <provider> -Region <region> -ResourceName <resource-name>127```128```bash129./scripts/check-quota.sh <provider> <region> <resource-name>130```131132**Example:**133134```powershell135.\scripts\check-quota.ps1 -ResourceProvider Microsoft.Compute -Region eastus136```137138**Example Output:**139140| Resource | Region | Limit | Usage | Available |141|----------|--------|-------|-------|-----------|142| cores | eastus | 100 | 50 | 50 |143| standardDSv3Family | eastus | 350 | 50 | 300 |144| virtualMachines | eastus | 25000 | 5 | 24995 |145| ... | ... | ... | ... | ... |146147> **📖 See also:** [az quota show](./references/commands.md#az-quota-show), [az quota usage show](./references/commands.md#az-quota-usage-show)148149### Workflow 2: Compare Quotas Across Regions150151**Scenario:** Find the best region for deployment based on available capacity152153```bash154# Define candidate regions155REGIONS=("eastus" "eastus2" "westus2" "centralus")156VM_FAMILY="standardDSv3Family"157SUBSCRIPTION_ID="<subscription-id>"158159# Check quota availability across regions160for region in "${REGIONS[@]}"; do161echo "=== Checking $region ==="162163# Get limit164LIMIT=$(az quota show \165--resource-name $VM_FAMILY \166--scope "/subscriptions/$SUBSCRIPTION_ID/providers/Microsoft.Compute/locations/$region" \167--query "properties.limit.value" -o tsv)168169# Get current usage170USAGE=$(az quota usage show \171--resource-name $VM_FAMILY \172--scope "/subscriptions/$SUBSCRIPTION_ID/providers/Microsoft.Compute/locations/$region" \173--query "properties.usages.value" -o tsv)174175# Calculate available176AVAILABLE=$((LIMIT - USAGE))177178echo "Region: $region | Limit: $LIMIT | Usage: $USAGE | Available: $AVAILABLE"179done180```181182> **📖 See also:** [commands.md](./references/commands.md#az-quota-show) for full scripted multi-region loop patterns183184### Workflow 3: Request Quota Increase185186**Scenario:** Current quota is insufficient for deployment187188```bash189# Request increase for VM quota190az quota update \191--resource-name standardDSv3Family \192--scope /subscriptions/<subscription-id>/providers/Microsoft.Compute/locations/eastus \193--limit-object value=500 \194--resource-type dedicated195196# Check request status197az quota request status list \198--scope /subscriptions/<subscription-id>/providers/Microsoft.Compute/locations/eastus199```200201**Approval Process:**202- Most adjustable quotas are auto-approved within minutes203- Some requests require manual review (hours to days)204- Non-adjustable quotas require Azure Support ticket205206> **📖 See also:** [az quota update](./references/commands.md#az-quota-update), [az quota request status](./references/advanced-commands.md#az-quota-request-status-list)207208### Workflow 4: List All Quotas for Planning209210**Scenario:** Understand all quotas for a resource provider in a region211212```bash213# List all compute quotas in East US (table format)214az quota list \215--scope /subscriptions/<subscription-id>/providers/Microsoft.Compute/locations/eastus \216--output table217218# List all network quotas219az quota list \220--scope /subscriptions/<subscription-id>/providers/Microsoft.Network/locations/eastus \221--output table222223# List all Container Apps quotas224az quota list \225--scope /subscriptions/<subscription-id>/providers/Microsoft.App/locations/eastus \226--output table227```228229> **📖 See also:** [az quota list](./references/commands.md#az-quota-list)230231## Troubleshooting232233### Common Errors234235| **Error** | **Cause** | **Solution** |236|-----------|-----------|--------------|237| REST API "No Limit" | Misleading — not unlimited | Use CLI instead; see warning in Quick Reference |238| `ExtensionNotFound` | Quota extension not installed | `az extension add --name quota` |239| `BadRequest` | Resource provider not supported by quota API | Check [service limits docs](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits) |240| `MissingRegistration` | Microsoft.Quota provider not registered | `az provider register --namespace Microsoft.Quota` |241| `QuotaExceeded` | Deployment would exceed quota | Request increase or choose different region |242| `InvalidScope` | Incorrect scope format | Use pattern: `/subscriptions/<id>/providers/<namespace>/locations/<region>` |243| CLI commands fail entirely | Auth, extension, or environment issue | Verify Azure CLI login (`az account show`), reinstall quota extension, check network. Do NOT use the `azure-quota` MCP server — it is unreliable. |244245### Unsupported Resource Providers246247**Known unsupported providers:**248- ❌ Microsoft.DocumentDB (Cosmos DB) - Use Portal or [Cosmos DB limits docs](https://learn.microsoft.com/en-us/azure/cosmos-db/concepts-limits)249250**Confirmed working providers:**251- ✅ Microsoft.Compute (VMs, disks, cores)252- ✅ Microsoft.Network (VNets, IPs, load balancers)253- ✅ Microsoft.App (Container Apps)254- ✅ Microsoft.Storage (storage accounts)255- ✅ Microsoft.MachineLearningServices (ML compute)256257> **📖 See also:** [Troubleshooting Guide](./references/commands.md#troubleshooting)258259## Additional Resources260261| Resource | Link |262|----------|------|263| **CLI Commands Reference** | [commands.md](./references/commands.md) - Complete syntax, parameters, examples |264| **Azure Quotas Overview** | [Microsoft Learn](https://learn.microsoft.com/en-us/azure/quotas/quotas-overview) |265| **Service Limits Documentation** | [Azure subscription limits](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits) |266| **Azure Portal - My Quotas** | [Portal Link](https://portal.azure.com/#blade/Microsoft_Azure_Capacity/QuotaMenuBlade/myQuotas) |267| **Request Quota Increases** | [How to request increases](https://learn.microsoft.com/en-us/azure/quotas/quickstart-increase-quota-portal) |268269## Best Practices2702711. ✅ **Always check quotas before deployment** - Prevent quota exceeded errors2722. ✅ **Run `az quota list` first** - Discover correct quota resource names2733. ✅ **Compare regions** - Find regions with available capacity2744. ✅ **Account for growth** - Request 20% buffer above immediate needs2755. ✅ **Use table output for overview** - `--output table` for quick scanning2766. ✅ **Monitor usage trends** - Set up alerts at 80% threshold (via Portal)277