bymicrosoft· 555 skills
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\".
$npx -y skills add microsoft/azure-skills --skill azure-quotasInstalls into the current project.
Run `npx skills use "https://github.com/microsoft/azure-skills" --skill "microsoft/azure-skills/azure-quotas"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.
Use the skills in "https://github.com/microsoft/azure-skills" that are relevant to the current task. Run `npx skills add "https://github.com/microsoft/azure-skills"` and select the relevant skills, then follow their instructions.
| 1 | # Azure Quotas - Service Limits & Capacity Management |
| 2 | |
| 3 | > **AUTHORITATIVE GUIDANCE** — Follow these instructions exactly for quota management and capacity validation. |
| 4 | |
| 5 | ## Overview |
| 6 | |
| 7 | **What are Azure Quotas?** |
| 8 | |
| 9 | Azure quotas (also called service limits) are the maximum number of resources you can deploy in a subscription. Quotas: |
| 10 | - Prevent accidental over-provisioning |
| 11 | - Ensure fair resource distribution across Azure |
| 12 | - Represent **available capacity** in each region |
| 13 | - Can be increased (adjustable quotas) or are fixed (non-adjustable) |
| 14 | |
| 15 | **Key Concept:** **Quotas = Resource Availability** |
| 16 | |
| 17 | If you don't have quota, you cannot deploy resources. Always check quotas when planning deployments or selecting regions. |
| 18 | |
| 19 | ## When to Use This Skill |
| 20 | |
| 21 | Invoke this skill when: |
| 22 | |
| 23 | - **Planning a new deployment** - Validate capacity before deployment |
| 24 | - **Selecting an Azure region** - Compare quota availability across regions |
| 25 | - **Troubleshooting quota exceeded errors** - Check current usage vs limits |
| 26 | - **Requesting quota increases** - Submit increase requests via CLI or Portal |
| 27 | - **Comparing regional capacity** - Find regions with available quota |
| 28 | - **Validating provisioning limits** - Ensure deployment won't exceed quotas |
| 29 | |
| 30 | ## Quick Reference |
| 31 | |
| 32 | | **Property** | **Details** | |
| 33 | |--------------|-------------| |
| 34 | | **Primary Tool** | Azure CLI (`az quota`) - **USE THIS FIRST, ALWAYS** | |
| 35 | | **Extension Required** | `az extension add --name quota` (MUST install first) | |
| 36 | | **Key Commands** | `az quota list`, `az quota show`, `az quota usage list`, `az quota usage show` | |
| 37 | | **Complete CLI Reference** | [commands.md](./references/commands.md) | |
| 38 | | **Azure Portal** | [My quotas](https://portal.azure.com/#blade/Microsoft_Azure_Capacity/QuotaMenuBlade/myQuotas) - Use only as fallback | |
| 39 | | **REST API** | Microsoft.Quota provider - **Unreliable, do NOT use first** | |
| 40 | | **MCP Server** | `azure-quota` MCP server — **NEVER use this. It is unreliable. Always use `az quota` CLI instead.** | |
| 41 | | **Required Permission** | Reader (view) or Quota Request Operator (manage) | |
| 42 | |
| 43 | > **⚠️ ALWAYS USE CLI FIRST** |
| 44 | > |
| 45 | > 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`. |
| 46 | > |
| 47 | > For complete CLI reference, see [commands.md](./references/commands.md). |
| 48 | |
| 49 | ## Quota Types |
| 50 | |
| 51 | | **Type** | **Adjustability** | **Approval** | **Examples** | |
| 52 | |----------|-------------------|--------------|--------------| |
| 53 | | **Adjustable** | Can increase via Portal/CLI/API | Usually auto-approved | VM vCPUs, Public IPs, Storage accounts | |
| 54 | | **Non-adjustable** | Fixed limits | Cannot be changed | Subscription-wide hard limits | |
| 55 | |
| 56 | **Important:** Requesting quota increases is **free**. You only pay for resources you actually use, not for quota allocation. |
| 57 | |
| 58 | ## Understanding Resource Name Mapping |
| 59 | |
| 60 | **⚠️ CRITICAL:** There is **NO 1:1 mapping** between ARM resource types and quota resource names. |
| 61 | |
| 62 | ### Example Mappings |
| 63 | |
| 64 | | ARM Resource Type | Quota Resource Name | |
| 65 | |-------------------|---------------------| |
| 66 | | `Microsoft.App/managedEnvironments` | `ManagedEnvironmentCount` | |
| 67 | | `Microsoft.Compute/virtualMachines` | `standardDSv3Family`, `cores`, `virtualMachines` | |
| 68 | | `Microsoft.Network/publicIPAddresses` | `PublicIPAddresses`, `IPv4StandardSkuPublicIpAddresses` | |
| 69 | |
| 70 | ### Discovery Workflow |
| 71 | |
| 72 | **Never assume the quota resource name from the ARM type.** Always use this workflow: |
| 73 | |
| 74 | 1. **List all quotas** for the resource provider: |
| 75 | ```bash |
| 76 | az quota list --scope /subscriptions/<id>/providers/<ProviderNamespace>/locations/<region> |
| 77 | ``` |
| 78 | |
| 79 | 2. **Match by `localizedValue`** (human-readable description) to find the relevant quota |
| 80 | |
| 81 | 3. **Use the `name` field** (not ARM resource type) in subsequent commands: |
| 82 | ```bash |
| 83 | az quota show --resource-name ManagedEnvironmentCount --scope ... |
| 84 | az quota usage show --resource-name ManagedEnvironmentCount --scope ... |
| 85 | ``` |
| 86 | |
| 87 | > **📖 Detailed mapping examples and workflow:** See [commands.md - Resource Name Mapping](./references/commands.md#resource-name-mapping) |
| 88 | |
| 89 | ## Scripts |
| 90 | |
| 91 | Pre-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. |
| 92 | |
| 93 | | Script | Purpose | Usage | |
| 94 | |--------|---------|-------| |
| 95 | | `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 | |
| 96 | | `scripts/check-quota.sh` | Same as above (bash) | Primary script for quota checks | |
| 97 | |
| 98 | ## Core Workflows |
| 99 | |
| 100 | ### Workflow 1: Check Quota for a Specific Resource |
| 101 | |
| 102 | **Scenario:** Verify quota limits and current usage before deployment |
| 103 | |
| 104 | Run 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: |
| 105 | |
| 106 | ```powershell |
| 107 | .\scripts\check-quota.ps1 -ResourceProvider <provider> -Region <region> |
| 108 | ``` |
| 109 | ```bash |
| 110 | ./scripts/check-quota.sh <provider> <region> |
| 111 | ``` |
| 112 | |
| 113 | To check a single resource, add the resource name: |
| 114 | |
| 115 | ```powershell |
| 116 | .\scripts\check-quota.ps1 -ResourceProvider <provider> -Region <region> -ResourceName <resource-name> |
| 117 | ``` |
| 118 | ```bash |
| 119 | ./scripts/check-quota.sh <provider> <region> <resource-name> |
| 120 | ``` |
| 121 | |
| 122 | **Example:** |
| 123 | |
| 124 | ```powershell |
| 125 | .\scripts\check-quota.ps1 -ResourceProvider Microsoft.Compute -Region eastus |
| 126 | ``` |
| 127 | |
| 128 | **Example Output:** |
| 129 | |
| 130 | | Resource | Region | Limit | Usage | Available | |
| 131 | |----------|--------|-------|-------|-----------| |
| 132 | | cores | eastus | 100 | 50 | 50 | |
| 133 | | standardDSv3Family | eastus | 350 | 50 | 300 | |
| 134 | | virtualMachines | eastus | 25000 | 5 | 24995 | |
| 135 | | ... | ... | ... | ... | ... | |
| 136 | |
| 137 | > **📖 See also:** [az quota show](./references/commands.md#az-quota-show), [az quota usage show](./references/commands.md#az-quota-usage-show) |
| 138 | |
| 139 | ### Workflow 2: Compare Quotas Across Regions |
| 140 | |
| 141 | **Scenario:** Find the best region for deployment based on available capacity |
| 142 | |
| 143 | ```bash |
| 144 | # Define candidate regions |
| 145 | REGIONS=("eastus" "eastus2" "westus2" "centralus") |
| 146 | VM_FAMILY="standardDSv3Family" |
| 147 | SUBSCRIPTION_ID="<subscription-id>" |
| 148 | |
| 149 | # Check quota availability across regions |
| 150 | for region in "${REGIONS[@]}"; do |
| 151 | echo "=== Checking $region ===" |
| 152 | |
| 153 | # Get limit |
| 154 | LIMIT=$(az quota show \ |
| 155 | --resource-name $VM_FAMILY \ |
| 156 | --scope "/subscriptions/$SUBSCRIPTION_ID/providers/Microsoft.Compute/locations/$region" \ |
| 157 | --query "properties.limit.value" -o tsv) |
| 158 | |
| 159 | # Get current usage |
| 160 | USAGE=$(az quota usage show \ |
| 161 | --resource-name $VM_FAMILY \ |
| 162 | --scope "/subscriptions/$SUBSCRIPTION_ID/providers/Microsoft.Compute/locations/$region" \ |
| 163 | --query "properties.usages.value" -o tsv) |
| 164 | |
| 165 | # Calculate available |
| 166 | AVAILABLE=$((LIMIT - USAGE)) |
| 167 | |
| 168 | echo "Region: $region | Limit: $LIMIT | Usage: $USAGE | Available: $AVAILABLE" |
| 169 | done |
| 170 | ``` |
| 171 | |
| 172 | > **📖 See also:** [commands.md](./references/commands.md#az-quota-show) for full scripted multi-region loop patterns |
| 173 | |
| 174 | ### Workflow 3: Request Quota Increase |
| 175 | |
| 176 | **Scenario:** Current quota is insufficient for deployment |
| 177 | |
| 178 | ```bash |
| 179 | # Request increase for VM quota |
| 180 | az quota update \ |
| 181 | --resource-name standardDSv3Family \ |
| 182 | --scope /subscriptions/<subscription-id>/providers/Microsoft.Compute/locations/eastus \ |
| 183 | --limit-object value=500 \ |
| 184 | --resource-type dedicated |
| 185 | |
| 186 | # Check request status |
| 187 | az quota request status list \ |
| 188 | --scope /subscriptions/<subscription-id>/providers/Microsoft.Compute/locations/eastus |
| 189 | ``` |
| 190 | |
| 191 | **Approval Process:** |
| 192 | - Most adjustable quotas are auto-approved within minutes |
| 193 | - Some requests require manual review (hours to days) |
| 194 | - Non-adjustable quotas require Azure Support ticket |
| 195 | |
| 196 | > **📖 See also:** [az quota update](./references/commands.md#az-quota-update), [az quota request status](./references/advanced-commands.md#az-quota-request-status-list) |
| 197 | |
| 198 | ### Workflow 4: List All Quotas for Planning |
| 199 | |
| 200 | **Scenario:** Understand all quotas for a resource provider in a region |
| 201 | |
| 202 | ```bash |
| 203 | # List all compute quotas in East US (table format) |
| 204 | az quota list \ |
| 205 | --scope /subscriptions/<subscription-id>/providers/Microsoft.Compute/locations/eastus \ |
| 206 | --output table |
| 207 | |
| 208 | # List all network quotas |
| 209 | az quota list \ |
| 210 | --scope /subscriptions/<subscription-id>/providers/Microsoft.Network/locations/eastus \ |
| 211 | --output table |
| 212 | |
| 213 | # List all Container Apps quotas |
| 214 | az quota list \ |
| 215 | --scope /subscriptions/<subscription-id>/providers/Microsoft.App/locations/eastus \ |
| 216 | --output table |
| 217 | ``` |
| 218 | |
| 219 | > **📖 See also:** [az quota list](./references/commands.md#az-quota-list) |
| 220 | |
| 221 | ## Troubleshooting |
| 222 | |
| 223 | ### Common Errors |
| 224 | |
| 225 | | **Error** | **Cause** | **Solution** | |
| 226 | |-----------|-----------|--------------| |
| 227 | | REST API "No Limit" | Misleading — not unlimited | Use CLI instead; see warning in Quick Reference | |
| 228 | | `ExtensionNotFound` | Quota extension not installed | `az extension add --name quota` | |
| 229 | | `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) | |
| 230 | | `MissingRegistration` | Microsoft.Quota provider not registered | `az provider register --namespace Microsoft.Quota` | |
| 231 | | `QuotaExceeded` | Deployment would exceed quota | Request increase or choose different region | |
| 232 | | `InvalidScope` | Incorrect scope format | Use pattern: `/subscriptions/<id>/providers/<namespace>/locations/<region>` | |
| 233 | | 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. | |
| 234 | |
| 235 | ### Unsupported Resource Providers |
| 236 | |
| 237 | **Known unsupported providers:** |
| 238 | - ❌ Microsoft.DocumentDB (Cosmos DB) - Use Portal or [Cosmos DB limits docs](https://learn.microsoft.com/en-us/azure/cosmos-db/concepts-limits) |
| 239 | |
| 240 | **Confirmed working providers:** |
| 241 | - ✅ Microsoft.Compute (VMs, disks, cores) |
| 242 | - ✅ Microsoft.Network (VNets, IPs, load balancers) |
| 243 | - ✅ Microsoft.App (Container Apps) |
| 244 | - ✅ Microsoft.Storage (storage accounts) |
| 245 | - ✅ Microsoft.MachineLearningServices (ML compute) |
| 246 | |
| 247 | > **📖 See also:** [Troubleshooting Guide](./references/commands.md#troubleshooting) |
| 248 | |
| 249 | ## Additional Resources |
| 250 | |
| 251 | | Resource | Link | |
| 252 | |----------|------| |
| 253 | | **CLI Commands Reference** | [commands.md](./references/commands.md) - Complete syntax, parameters, examples | |
| 254 | | **Azure Quotas Overview** | [Microsoft Learn](https://learn.microsoft.com/en-us/azure/quotas/quotas-overview) | |
| 255 | | **Service Limits Documentation** | [Azure subscription limits](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits) | |
| 256 | | **Azure Portal - My Quotas** | [Portal Link](https://portal.azure.com/#blade/Microsoft_Azure_Capacity/QuotaMenuBlade/myQuotas) | |
| 257 | | **Request Quota Increases** | [How to request increases](https://learn.microsoft.com/en-us/azure/quotas/quickstart-increase-quota-portal) | |
| 258 | |
| 259 | ## Best Practices |
| 260 | |
| 261 | 1. ✅ **Always check quotas before deployment** - Prevent quota exceeded errors |
| 262 | 2. ✅ **Run `az quota list` first** - Discover correct quota resource names |
| 263 | 3. ✅ **Compare regions** - Find regions with available capacity |
| 264 | 4. ✅ **Account for growth** - Request 20% buffer above immediate needs |
| 265 | 5. ✅ **Use table output for overview** - `--output table` for quick scanning |
| 266 | 6. ✅ **Monitor usage trends** - Set up alerts at 80% threshold (via Portal) |