azure-quotas
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAzure 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
快速参考
| Property | Details |
|---|---|
| Primary Tool | Azure CLI ( |
| Extension Required | |
| Key Commands | |
| Complete CLI Reference | commands.md |
| Azure Portal | My quotas - Use only as fallback |
| REST API | Microsoft.Quota provider - Unreliable, do NOT use first |
| Required Permission | Reader (view) or Quota Request Operator (manage) |
⚠️ CRITICAL: ALWAYS USE CLI FIRSTAzure CLI () is the ONLY reliable method for checking quotas. Use CLI FIRST, always.az quotaDO 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
errors when providers aren't supportedBadRequest- CLI has consistent output format and better error messages
- Portal may show incomplete or cached data
Mandatory workflow:
- FIRST: Try
/az quota list/az quota showaz quota usage show- If CLI returns
: Then use Azure service limits docsBadRequest- 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 ( |
| 所需扩展 | |
| 核心命令 | |
| 完整CLI参考 | commands.md |
| Azure门户 | 我的配额 - 仅作为备用方案使用 |
| REST API | Microsoft.Quota提供商 - 不可靠,请不要优先使用 |
| 所需权限 | 读者(查看)或配额请求操作员(管理) |
⚠️ 重要提示:请始终优先使用CLIAzure CLI ()是唯一可靠的配额检查方法。请始终优先使用CLI。az quota不要将REST API或门户作为首选方法,它们不可靠且容易产生误导。为何必须优先使用CLI:
- REST API不可靠,会显示误导性结果
- REST API中的“无限制”或“Unlimited”值并不代表容量无限制
- “无限制”通常意味着该资源不支持配额API(而非真的无限制!)
- 当提供商不支持时,CLI会返回明确的
错误BadRequest- CLI输出格式一致,错误信息更清晰
- 门户可能显示不完整或缓存的数据
强制工作流:
- 首先: 尝试使用
/az quota list/az quota showaz quota usage show- 如果CLI返回
: 再使用Azure服务限制文档BadRequest- 永远不要从REST API或门户开始 - 仅作为最后手段使用
如果在REST API/门户中看到“无限制”: 这并不代表容量无限制,它意味着:
- 配额API不支持该资源类型,或者
- 配额未通过API强制执行,或者
- 仍需遵循服务特定限制(请查看文档)
有关完整的CLI命令参考和示例,请参阅commands.md。
Quota Types
配额类型
| Type | Adjustability | Approval | Examples |
|---|---|---|---|
| Adjustable | Can increase via Portal/CLI/API | Usually auto-approved | VM vCPUs, Public IPs, Storage accounts |
| Non-adjustable | Fixed limits | Cannot be changed | Subscription-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 Type | Quota Resource Name |
|---|---|
| |
| |
| |
| ARM资源类型 | 配额资源名称 |
|---|---|
| |
| |
| |
Discovery Workflow
发现工作流
Never assume the quota resource name from the ARM type. Always use this workflow:
-
List all quotas for the resource provider:bash
az quota list --scope /subscriptions/<id>/providers/<ProviderNamespace>/locations/<region> -
Match by(human-readable description) to find the relevant quota
localizedValue -
Use thefield (not ARM resource type) in subsequent commands:
namebashaz 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类型推断配额资源名称,请始终遵循以下工作流:
-
列出资源提供商的所有配额:bash
az quota list --scope /subscriptions/<id>/providers/<ProviderNamespace>/locations/<region> -
通过(人类可读描述)匹配找到相关配额
localizedValue -
后续命令中使用字段(而非ARM资源类型):
namebashaz 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
undefined1. 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
--scope /subscriptions/<subscription-id>/providers/Microsoft.Compute/locations/eastus
az quota list
--scope /subscriptions/<subscription-id>/providers/Microsoft.Compute/locations/eastus
--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
--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
--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
--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
--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
undefinedDefine 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)
--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)
--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)
--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)
--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
undefinedRequest 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
--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
--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
--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
--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
undefinedList all compute quotas in East US (table format)
以表格形式列出美国东部的所有计算配额
az quota list
--scope /subscriptions/<subscription-id>/providers/Microsoft.Compute/locations/eastus
--output table
--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
--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
--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
--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
--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
--scope /subscriptions/<subscription-id>/providers/Microsoft.App/locations/eastus
--output table
> **📖 另请参阅:** [az quota list](./references/commands.md#az-quota-list)Troubleshooting
故障排除
Common Errors
常见错误
| Error | Cause | Solution |
|---|---|---|
| REST API "No Limit" | REST API showing misleading "unlimited" values | CRITICAL: "No Limit" ≠ unlimited! Use CLI instead. See warning above. Check service limits docs |
| REST API failures | REST API unreliable and misleading | Always use Azure CLI - See commands.md for complete CLI reference |
| Quota extension not installed | |
| Resource provider not supported by quota API | Use CLI (preferred) or service limits docs |
| Microsoft.Quota provider not registered | |
| Deployment would exceed quota | Request increase or choose different region |
| Incorrect scope format | Use pattern: |
| 错误 | 原因 | 解决方案 |
|---|---|---|
| REST API显示“无限制” | REST API显示误导性的“无限制”值 | 重要提示:“无限制”≠真的无限制! 请改用CLI。请参阅上方警告。查看服务限制文档 |
| REST API调用失败 | REST API不可靠且易误导 | 始终使用Azure CLI - 请参阅commands.md获取完整CLI参考 |
| 未安装配额扩展 | 执行 |
| 配额API不支持该资源提供商 | 使用CLI(首选)或服务限制文档 |
| 未注册Microsoft.Quota提供商 | 执行 |
| 部署将超出配额 | 申请配额提升或选择其他区域 |
| 范围格式不正确 | 使用以下格式: |
Unsupported Resource Providers
不支持的资源提供商
Known unsupported providers:
- ❌ Microsoft.DocumentDB (Cosmos DB) - Use Portal or Cosmos DB limits docs
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.DocumentDB (Cosmos DB) - 使用门户或Cosmos DB限制文档
已确认支持的提供商:
- ✅ Microsoft.Compute(VM、磁盘、核心)
- ✅ Microsoft.Network(虚拟网络、IP、负载均衡器)
- ✅ Microsoft.App(容器应用)
- ✅ Microsoft.Storage(存储账户)
- ✅ Microsoft.MachineLearningServices(机器学习计算)
📖 另请参阅: 故障排除指南
Additional Resources
附加资源
| Resource | Link |
|---|---|
| CLI Commands Reference | commands.md - Complete syntax, parameters, examples |
| Azure Quotas Overview | Microsoft Learn |
| Service Limits Documentation | Azure subscription limits |
| Azure Portal - My Quotas | Portal Link |
| Request Quota Increases | How to request increases |
| 资源 | 链接 |
|---|---|
| CLI命令参考 | commands.md - 完整语法、参数、示例 |
| Azure配额概述 | Microsoft Learn |
| 服务限制文档 | Azure订阅限制 |
| Azure门户 - 我的配额 | 门户链接 |
| 申请配额提升 | 如何申请提升 |
Best Practices
最佳实践
- ✅ Always check quotas before deployment - Prevent quota exceeded errors
- ✅ Run first - Discover correct quota resource names
az quota list - ✅ Compare regions - Find regions with available capacity
- ✅ Account for growth - Request 20% buffer above immediate needs
- ✅ Use table output for overview - for quick scanning
--output table - ✅ Document quota sources - Track whether from quota API or official docs
- ✅ Monitor usage trends - Set up alerts at 80% threshold (via Portal)
- ✅ 部署前务必检查配额 - 避免配额超限错误
- ✅ 先运行- 发现正确的配额资源名称
az quota list - ✅ 对比多个区域 - 寻找有可用容量的区域
- ✅ 考虑增长需求 - 申请比即时需求多20%的缓冲量
- ✅ 使用表格输出查看概览 - 使用快速扫描
--output table - ✅ 记录配额来源 - 跟踪配额来自配额API还是官方文档
- ✅ 监控使用趋势 - 在门户中设置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. 验证容量 │
│ 可用容量 = 限制值 - (使用量 + 需求) │
└─────────────────┬───────────────────────┘
│
▼
┌────────┴────────┐
│ │
✅ 容量充足 ❌ 容量不足
│ │
▼ ▼
继续部署 申请配额提升
或更换区域