azure-quotas

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese


Azure Quotas - Service Limits & Capacity Management

Azure配额 - 服务限制与容量管理

AUTHORITATIVE GUIDANCE — Follow these instructions exactly for quota management and capacity validation.
权威指南 — 请严格按照以下说明进行配额管理和容量验证。

Overview

概述

What are Azure Quotas?
Azure quotas (also called service limits) are the maximum number of resources you can deploy in a subscription. Quotas:
  • Prevent accidental over-provisioning
  • Ensure fair resource distribution across Azure
  • Represent available capacity in each region
  • Can be increased (adjustable quotas) or are fixed (non-adjustable)
Key Concept: Quotas = Resource Availability
If you don't have quota, you cannot deploy resources. Always check quotas when planning deployments or selecting regions.
什么是Azure配额?
Azure配额(也称为服务限制)是指你在订阅中可部署的资源最大数量。配额的作用包括:
  • 防止意外过度部署
  • 确保Azure资源的公平分配
  • 代表各区域的可用容量
  • 分为可调整(可提升)和固定(不可调整)两类
核心概念: 配额 = 资源可用性
如果没有可用配额,你将无法部署资源。在规划部署或选择区域时,请务必检查配额。

When to Use This Skill

何时使用此技能

Invoke this skill when:
  • Planning a new deployment - Validate capacity before deployment
  • Selecting an Azure region - Compare quota availability across regions
  • Troubleshooting quota exceeded errors - Check current usage vs limits
  • Requesting quota increases - Submit increase requests via CLI or Portal
  • Comparing regional capacity - Find regions with available quota
  • Validating provisioning limits - Ensure deployment won't exceed quotas
在以下场景下调用此技能:
  • 规划新部署时 - 部署前验证容量
  • 选择Azure区域时 - 对比不同区域的配额可用性
  • 排查配额超限错误时 - 检查当前使用量与限制值
  • 申请配额提升时 - 通过CLI或门户提交提升请求
  • 对比区域容量时 - 寻找有可用配额的区域
  • 验证部署限制时 - 确保部署不会超出配额

Quick Reference

快速参考

PropertyDetails
Primary ToolAzure CLI (
az quota
) - USE THIS FIRST, ALWAYS
Extension Required
az extension add --name quota
(MUST install first)
Key Commands
az quota list
,
az quota show
,
az quota usage list
,
az quota usage show
Complete CLI Referencecommands.md
Azure PortalMy quotas - Use only as fallback
REST APIMicrosoft.Quota provider - Unreliable, do NOT use first
Required PermissionReader (view) or Quota Request Operator (manage)
⚠️ CRITICAL: ALWAYS USE CLI FIRST
Azure CLI (
az quota
) is the ONLY reliable method
for checking quotas. Use CLI FIRST, always.
DO NOT use REST API or Portal as your first approach. They are unreliable and misleading.
Why you must use CLI first:
  • REST API is unreliable and shows misleading results
  • REST API "No Limit" or "Unlimited" values DO NOT mean unlimited capacity
  • "No Limit" typically means the resource doesn't support quota API (not unlimited!)
  • CLI provides clear
    BadRequest
    errors when providers aren't supported
  • CLI has consistent output format and better error messages
  • Portal may show incomplete or cached data
Mandatory workflow:
  1. FIRST: Try
    az quota list
    /
    az quota show
    /
    az quota usage show
  2. If CLI returns
    BadRequest
    :
    Then use Azure service limits docs
  3. Never start with REST API or Portal - only use as last resort
If you see "No Limit" in REST API/Portal: This is NOT unlimited capacity. It means:
  • The quota API doesn't support that resource type, OR
  • The quota isn't enforced via the API, OR
  • Service-specific limits still apply (check documentation)
For complete CLI command reference and examples, see commands.md.
属性详情
首选工具Azure CLI (
az quota
) - 请始终优先使用此工具
所需扩展
az extension add --name quota
(必须先安装)
核心命令
az quota list
,
az quota show
,
az quota usage list
,
az quota usage show
完整CLI参考commands.md
Azure门户我的配额 - 仅作为备用方案使用
REST APIMicrosoft.Quota提供商 - 不可靠,请不要优先使用
所需权限读者(查看)或配额请求操作员(管理)
⚠️ 重要提示:请始终优先使用CLI
Azure CLI (
az quota
)是唯一可靠的配额检查方法
。请始终优先使用CLI
不要将REST API或门户作为首选方法,它们不可靠且容易产生误导。
为何必须优先使用CLI:
  • REST API不可靠,会显示误导性结果
  • REST API中的“无限制”或“Unlimited”值并不代表容量无限制
  • “无限制”通常意味着该资源不支持配额API(而非真的无限制!)
  • 当提供商不支持时,CLI会返回明确的
    BadRequest
    错误
  • CLI输出格式一致,错误信息更清晰
  • 门户可能显示不完整或缓存的数据
强制工作流:
  1. 首先: 尝试使用
    az quota list
    /
    az quota show
    /
    az quota usage show
  2. 如果CLI返回
    BadRequest
    再使用Azure服务限制文档
  3. 永远不要从REST API或门户开始 - 仅作为最后手段使用
如果在REST API/门户中看到“无限制”: 这并不代表容量无限制,它意味着:
  • 配额API不支持该资源类型,或者
  • 配额未通过API强制执行,或者
  • 仍需遵循服务特定限制(请查看文档)
有关完整的CLI命令参考和示例,请参阅commands.md

Quota Types

配额类型

TypeAdjustabilityApprovalExamples
AdjustableCan increase via Portal/CLI/APIUsually auto-approvedVM vCPUs, Public IPs, Storage accounts
Non-adjustableFixed limitsCannot be changedSubscription-wide hard limits
Important: Requesting quota increases is free. You only pay for resources you actually use, not for quota allocation.
类型可调整性审批方式示例
可调整可通过门户/CLI/API提升通常自动审批VM vCPU、公网IP、存储账户
固定限制固定无法更改订阅级别的硬限制
重要提示: 申请配额提升是免费的。你只需为实际使用的资源付费,无需为配额分配付费。

Understanding Resource Name Mapping

理解资源名称映射

⚠️ CRITICAL: There is NO 1:1 mapping between ARM resource types and quota resource names.
⚠️ 重要提示: ARM资源类型与配额资源名称不存在一对一映射关系

Example Mappings

示例映射

ARM Resource TypeQuota Resource Name
Microsoft.App/managedEnvironments
ManagedEnvironmentCount
Microsoft.Compute/virtualMachines
standardDSv3Family
,
cores
,
virtualMachines
Microsoft.Network/publicIPAddresses
PublicIPAddresses
,
IPv4StandardSkuPublicIpAddresses
ARM资源类型配额资源名称
Microsoft.App/managedEnvironments
ManagedEnvironmentCount
Microsoft.Compute/virtualMachines
standardDSv3Family
,
cores
,
virtualMachines
Microsoft.Network/publicIPAddresses
PublicIPAddresses
,
IPv4StandardSkuPublicIpAddresses

Discovery Workflow

发现工作流

Never assume the quota resource name from the ARM type. Always use this workflow:
  1. List all quotas for the resource provider:
    bash
    az quota list --scope /subscriptions/<id>/providers/<ProviderNamespace>/locations/<region>
  2. Match by
    localizedValue
    (human-readable description) to find the relevant quota
  3. Use the
    name
    field
    (not ARM resource type) in subsequent commands:
    bash
    az quota show --resource-name ManagedEnvironmentCount --scope ...
    az quota usage show --resource-name ManagedEnvironmentCount --scope ...
📖 Detailed mapping examples and workflow: See commands.md - Understanding Resource Name Mapping
切勿根据ARM类型推断配额资源名称,请始终遵循以下工作流:
  1. 列出资源提供商的所有配额
    bash
    az quota list --scope /subscriptions/<id>/providers/<ProviderNamespace>/locations/<region>
  2. 通过
    localizedValue
    (人类可读描述)匹配
    找到相关配额
  3. 后续命令中使用
    name
    字段
    (而非ARM资源类型):
    bash
    az quota show --resource-name ManagedEnvironmentCount --scope ...
    az quota usage show --resource-name ManagedEnvironmentCount --scope ...
📖 详细映射示例和工作流: 请参阅commands.md - 理解资源名称映射

Core Workflows

核心工作流

Workflow 1: Check Quota for a Specific Resource

工作流1:检查特定资源的配额

Scenario: Verify quota limit and current usage before deployment
bash
undefined
场景: 部署前验证配额限制和当前使用量
bash
undefined

1. Install quota extension (if not already installed)

1. 安装配额扩展(如果尚未安装)

az extension add --name quota
az extension add --name quota

2. List all quotas for the provider to find the quota resource name

2. 列出提供商的所有配额以找到配额资源名称

az quota list
--scope /subscriptions/<subscription-id>/providers/Microsoft.Compute/locations/eastus
az quota list
--scope /subscriptions/<subscription-id>/providers/Microsoft.Compute/locations/eastus

3. Show quota limit for a specific resource

3. 查看特定资源的配额限制

az quota show
--resource-name standardDSv3Family
--scope /subscriptions/<subscription-id>/providers/Microsoft.Compute/locations/eastus
az quota show
--resource-name standardDSv3Family
--scope /subscriptions/<subscription-id>/providers/Microsoft.Compute/locations/eastus

4. Show current usage

4. 查看当前使用量

az quota usage show
--resource-name standardDSv3Family
--scope /subscriptions/<subscription-id>/providers/Microsoft.Compute/locations/eastus

**Example Output Analysis:**
- Quota limit: 350 vCPUs
- Current usage: 50 vCPUs
- Available capacity: 300 vCPUs (350 - 50)

> **📖 See also:** [az quota show](./references/commands.md#az-quota-show), [az quota usage show](./references/commands.md#az-quota-usage-show)
az quota usage show
--resource-name standardDSv3Family
--scope /subscriptions/<subscription-id>/providers/Microsoft.Compute/locations/eastus

**示例输出分析:**
- 配额限制:350个vCPU
- 当前使用量:50个vCPU
- 可用容量:300个vCPU(350-50)

> **📖 另请参阅:** [az quota show](./references/commands.md#az-quota-show), [az quota usage show](./references/commands.md#az-quota-usage-show)

Workflow 2: Compare Quotas Across Regions

工作流2:跨区域对比配额

Scenario: Find the best region for deployment based on available capacity
bash
undefined
场景: 根据可用容量选择最佳部署区域
bash
undefined

Define candidate regions

定义候选区域

REGIONS=("eastus" "eastus2" "westus2" "centralus") VM_FAMILY="standardDSv3Family" SUBSCRIPTION_ID="<subscription-id>"
REGIONS=("eastus" "eastus2" "westus2" "centralus") VM_FAMILY="standardDSv3Family" SUBSCRIPTION_ID="<subscription-id>"

Check quota availability across regions

跨区域检查配额可用性

for region in "${REGIONS[@]}"; do echo "=== Checking $region ==="

Get limit

LIMIT=$(az quota show
--resource-name $VM_FAMILY
--scope "/subscriptions/$SUBSCRIPTION_ID/providers/Microsoft.Compute/locations/$region"
--query "properties.limit.value" -o tsv)

Get current usage

USAGE=$(az quota usage show
--resource-name $VM_FAMILY
--scope "/subscriptions/$SUBSCRIPTION_ID/providers/Microsoft.Compute/locations/$region"
--query "properties.usages.value" -o tsv)

Calculate available

AVAILABLE=$((LIMIT - USAGE))
echo "Region: $region | Limit: $LIMIT | Usage: $USAGE | Available: $AVAILABLE" done

> **📖 See also:** [Multi-region comparison scripts](./references/commands.md#multi-region-comparison) (Bash & PowerShell)
for region in "${REGIONS[@]}"; do echo "=== 检查$region ==="

获取限制值

LIMIT=$(az quota show
--resource-name $VM_FAMILY
--scope "/subscriptions/$SUBSCRIPTION_ID/providers/Microsoft.Compute/locations/$region"
--query "properties.limit.value" -o tsv)

获取当前使用量

USAGE=$(az quota usage show
--resource-name $VM_FAMILY
--scope "/subscriptions/$SUBSCRIPTION_ID/providers/Microsoft.Compute/locations/$region"
--query "properties.usages.value" -o tsv)

计算可用容量

AVAILABLE=$((LIMIT - USAGE))
echo "区域: $region | 限制值: $LIMIT | 使用量: $USAGE | 可用容量: $AVAILABLE" done

> **📖 另请参阅:** [多区域对比脚本](./references/commands.md#multi-region-comparison)(Bash和PowerShell版本)

Workflow 3: Request Quota Increase

工作流3:申请配额提升

Scenario: Current quota is insufficient for deployment
bash
undefined
场景: 当前配额不足以支持部署
bash
undefined

Request increase for VM quota

申请VM配额提升

az quota update
--resource-name standardDSv3Family
--scope /subscriptions/<subscription-id>/providers/Microsoft.Compute/locations/eastus
--limit-object value=500
--resource-type dedicated
az quota update
--resource-name standardDSv3Family
--scope /subscriptions/<subscription-id>/providers/Microsoft.Compute/locations/eastus
--limit-object value=500
--resource-type dedicated

Check request status

检查请求状态

az quota request status list
--scope /subscriptions/<subscription-id>/providers/Microsoft.Compute/locations/eastus

**Approval Process:**
- Most adjustable quotas are auto-approved within minutes
- Some requests require manual review (hours to days)
- Non-adjustable quotas require Azure Support ticket

> **📖 See also:** [az quota update](./references/commands.md#az-quota-update), [az quota request status](./references/commands.md#az-quota-request-status-list)
az quota request status list
--scope /subscriptions/<subscription-id>/providers/Microsoft.Compute/locations/eastus

**审批流程:**
- 大多数可调整配额会在数分钟内自动审批
- 部分请求需要人工审核(数小时至数天)
- 固定配额需要提交Azure支持工单

> **📖 另请参阅:** [az quota update](./references/commands.md#az-quota-update), [az quota request status](./references/commands.md#az-quota-request-status-list)

Workflow 4: List All Quotas for Planning

工作流4:列出所有配额用于规划

Scenario: Understand all quotas for a resource provider in a region
bash
undefined
场景: 了解某区域内某资源提供商的所有配额
bash
undefined

List all compute quotas in East US (table format)

以表格形式列出美国东部的所有计算配额

az quota list
--scope /subscriptions/<subscription-id>/providers/Microsoft.Compute/locations/eastus
--output table
az quota list
--scope /subscriptions/<subscription-id>/providers/Microsoft.Compute/locations/eastus
--output table

List all network quotas

列出所有网络配额

az quota list
--scope /subscriptions/<subscription-id>/providers/Microsoft.Network/locations/eastus
--output table
az quota list
--scope /subscriptions/<subscription-id>/providers/Microsoft.Network/locations/eastus
--output table

List all Container Apps quotas

列出所有容器应用配额

az quota list
--scope /subscriptions/<subscription-id>/providers/Microsoft.App/locations/eastus
--output table

> **📖 See also:** [az quota list](./references/commands.md#az-quota-list)
az quota list
--scope /subscriptions/<subscription-id>/providers/Microsoft.App/locations/eastus
--output table

> **📖 另请参阅:** [az quota list](./references/commands.md#az-quota-list)

Troubleshooting

故障排除

Common Errors

常见错误

ErrorCauseSolution
REST API "No Limit"REST API showing misleading "unlimited" valuesCRITICAL: "No Limit" ≠ unlimited! Use CLI instead. See warning above. Check service limits docs
REST API failuresREST API unreliable and misleadingAlways use Azure CLI - See commands.md for complete CLI reference
ExtensionNotFound
Quota extension not installed
az extension add --name quota
BadRequest
Resource provider not supported by quota APIUse CLI (preferred) or service limits docs
MissingRegistration
Microsoft.Quota provider not registered
az provider register --namespace Microsoft.Quota
QuotaExceeded
Deployment would exceed quotaRequest increase or choose different region
InvalidScope
Incorrect scope formatUse pattern:
/subscriptions/<id>/providers/<namespace>/locations/<region>
错误原因解决方案
REST API显示“无限制”REST API显示误导性的“无限制”值重要提示:“无限制”≠真的无限制! 请改用CLI。请参阅上方警告。查看服务限制文档
REST API调用失败REST API不可靠且易误导始终使用Azure CLI - 请参阅commands.md获取完整CLI参考
ExtensionNotFound
未安装配额扩展执行
az extension add --name quota
BadRequest
配额API不支持该资源提供商使用CLI(首选)或服务限制文档
MissingRegistration
未注册Microsoft.Quota提供商执行
az provider register --namespace Microsoft.Quota
QuotaExceeded
部署将超出配额申请配额提升或选择其他区域
InvalidScope
范围格式不正确使用以下格式:
/subscriptions/<id>/providers/<namespace>/locations/<region>

Unsupported Resource Providers

不支持的资源提供商

Known unsupported providers:
Confirmed working providers:
  • ✅ Microsoft.Compute (VMs, disks, cores)
  • ✅ Microsoft.Network (VNets, IPs, load balancers)
  • ✅ Microsoft.App (Container Apps)
  • ✅ Microsoft.Storage (storage accounts)
  • ✅ Microsoft.MachineLearningServices (ML compute)
📖 See also: Troubleshooting Guide
已知不支持的提供商:
已确认支持的提供商:
  • ✅ Microsoft.Compute(VM、磁盘、核心)
  • ✅ Microsoft.Network(虚拟网络、IP、负载均衡器)
  • ✅ Microsoft.App(容器应用)
  • ✅ Microsoft.Storage(存储账户)
  • ✅ Microsoft.MachineLearningServices(机器学习计算)
📖 另请参阅: 故障排除指南

Additional Resources

附加资源

ResourceLink
CLI Commands Referencecommands.md - Complete syntax, parameters, examples
Azure Quotas OverviewMicrosoft Learn
Service Limits DocumentationAzure subscription limits
Azure Portal - My QuotasPortal Link
Request Quota IncreasesHow to request increases
资源链接
CLI命令参考commands.md - 完整语法、参数、示例
Azure配额概述Microsoft Learn
服务限制文档Azure订阅限制
Azure门户 - 我的配额门户链接
申请配额提升如何申请提升

Best Practices

最佳实践

  1. Always check quotas before deployment - Prevent quota exceeded errors
  2. Run
    az quota list
    first
    - Discover correct quota resource names
  3. Compare regions - Find regions with available capacity
  4. Account for growth - Request 20% buffer above immediate needs
  5. Use table output for overview -
    --output table
    for quick scanning
  6. Document quota sources - Track whether from quota API or official docs
  7. Monitor usage trends - Set up alerts at 80% threshold (via Portal)
  1. 部署前务必检查配额 - 避免配额超限错误
  2. 先运行
    az quota list
    - 发现正确的配额资源名称
  3. 对比多个区域 - 寻找有可用容量的区域
  4. 考虑增长需求 - 申请比即时需求多20%的缓冲量
  5. 使用表格输出查看概览 - 使用
    --output table
    快速扫描
  6. 记录配额来源 - 跟踪配额来自配额API还是官方文档
  7. 监控使用趋势 - 在门户中设置80%阈值的告警

Workflow Summary

工作流总结

┌─────────────────────────────────────────┐
│  1. Install quota extension             │
│     az extension add --name quota       │
└─────────────────┬───────────────────────┘
┌─────────────────────────────────────────┐
│  2. Discover quota resource names       │
│     az quota list --scope ...           │
│     (Match by localizedValue)           │
└─────────────────┬───────────────────────┘
┌─────────────────────────────────────────┐
│  3. Check current usage                 │
│     az quota usage show                 │
│     --resource-name <name>              │
└─────────────────┬───────────────────────┘
┌─────────────────────────────────────────┐
│  4. Check quota limit                   │
│     az quota show                       │
│     --resource-name <name>              │
└─────────────────┬───────────────────────┘
┌─────────────────────────────────────────┐
│  5. Validate capacity                   │
│     Available = Limit - (Usage + Need)  │
└─────────────────┬───────────────────────┘
         ┌────────┴────────┐
         │                 │
    ✅ Sufficient     ❌ Insufficient
         │                 │
         ▼                 ▼
    Proceed          Request increase
                     or change region
┌─────────────────────────────────────────┐
│  1. 安装配额扩展                       │
│     az extension add --name quota       │
└─────────────────┬───────────────────────┘
┌─────────────────────────────────────────┐
│  2. 发现配额资源名称                   │
│     az quota list --scope ...           │
│     (通过localizedValue匹配)           │
└─────────────────┬───────────────────────┘
┌─────────────────────────────────────────┐
│  3. 检查当前使用量                     │
│     az quota usage show                 │
│     --resource-name <name>              │
└─────────────────┬───────────────────────┘
┌─────────────────────────────────────────┐
│  4. 检查配额限制                       │
│     az quota show                       │
│     --resource-name <name>              │
└─────────────────┬───────────────────────┘
┌─────────────────────────────────────────┐
│  5. 验证容量                           │
│     可用容量 = 限制值 - (使用量 + 需求)  │
└─────────────────┬───────────────────────┘
         ┌────────┴────────┐
         │                 │
    ✅ 容量充足     ❌ 容量不足
         │                 │
         ▼                 ▼
    继续部署          申请配额提升
                     或更换区域