Azure 配额与用量查询管理
azure-quotas
检查/管理跨提供商的 Azure 配额与用量。用于部署规划、容量验证、区域选择。使用场景:"检查配额"、"服务限制"、"当前用量"、"申请提高配额"、"超出配额"、"验证容量"、"区域可用性"、"预配限制"、"vCPU 限制"、"我的订阅中可用多少 vCPU"。
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 264
- Forks
- 225
01 前言 Front Matter
- name
- azure-quotas
- license
- MIT
- metadata
- { "author": "Microsoft", "version": "0.0.0-placeholder" }
- description
- 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".
02 资源文件 6
- 参考文档agents/openai.yaml210 B
- 参考文档references/advanced-commands.md1.8 KB
- 参考文档references/commands.md10.4 KB
- 脚本scripts/check-quota.ps13.3 KB
- 脚本scripts/check-quota.sh3.1 KB
- 参考文档version.json55 B
03 SKILL.md 正文
Azure Quotas - Service Limits & Capacity Management
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.
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
Quick Reference
| Property | Details |
|---|---|
| Primary Tool | Azure 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 Reference | commands.md |
| Azure Portal | My quotas - Use only as fallback |
| REST API | Microsoft.Quota provider - Unreliable, do NOT use first |
| MCP Server | azure-quota MCP server — NEVER use this. It is unreliable. Always use az quota CLI instead. |
| Required Permission | Reader (view) or Quota Request Operator (manage) |
⚠️ ALWAYS USE CLI FIRST
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 quotacommands; fall back to Azure service limits docs if CLI returnsBadRequest.For complete CLI reference, see 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.
Understanding Resource Name Mapping
⚠️ CRITICAL: There is NO 1:1 mapping between ARM resource types and quota resource names.
Example Mappings
| ARM Resource Type | Quota Resource Name |
|---|---|
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:
-
List all quotas for the resource provider:
az quota list --scope /subscriptions/<id>/providers/<ProviderNamespace>/locations/<region> -
Match by
localizedValue(human-readable description) to find the relevant quota -
Use the
namefield (not ARM resource type) in subsequent commands:az quota show --resource-name ManagedEnvironmentCount --scope ... az quota usage show --resource-name ManagedEnvironmentCount --scope ...
? Detailed mapping examples and workflow: See commands.md - Resource Name Mapping
Scripts
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.
| Script | Purpose | Usage |
|---|---|---|
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 |
scripts/check-quota.sh |
Same as above (bash) | Primary script for quota checks |
Core Workflows
Workflow 1: Check Quota for a Specific Resource
Scenario: Verify quota limits and current usage before deployment
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:
.\scripts\check-quota.ps1 -ResourceProvider <provider> -Region <region>
./scripts/check-quota.sh <provider> <region>
To check a single resource, add the resource name:
.\scripts\check-quota.ps1 -ResourceProvider <provider> -Region <region> -ResourceName <resource-name>
./scripts/check-quota.sh <provider> <region> <resource-name>
Example:
.\scripts\check-quota.ps1 -ResourceProvider Microsoft.Compute -Region eastus
Example Output:
| Resource | Region | Limit | Usage | Available |
|---|---|---|---|---|
| cores | eastus | 100 | 50 | 50 |
| standardDSv3Family | eastus | 350 | 50 | 300 |
| virtualMachines | eastus | 25000 | 5 | 24995 |
| ... | ... | ... | ... | ... |
? See also: az quota show, az quota usage show
Workflow 2: Compare Quotas Across Regions
Scenario: Find the best region for deployment based on available capacity
# Define candidate regions
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: commands.md for full scripted multi-region loop patterns
Workflow 3: Request Quota Increase
Scenario: Current quota is insufficient for deployment
# Request increase for VM quota
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, az quota request status
Workflow 4: List All Quotas for Planning
Scenario: Understand all quotas for a resource provider in a region
# List all compute quotas in East US (table format)
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
# List all Container Apps quotas
az quota list \
--scope /subscriptions/<subscription-id>/providers/Microsoft.App/locations/eastus \
--output table
? See also: az quota list
Troubleshooting
Common Errors
| Error | Cause | Solution |
|---|---|---|
| REST API "No Limit" | Misleading — not unlimited | Use CLI instead; see warning in Quick Reference |
ExtensionNotFound |
Quota extension not installed | az extension add --name quota |
BadRequest |
Resource provider not supported by quota API | Check service limits docs |
MissingRegistration |
Microsoft.Quota provider not registered | az provider register --namespace Microsoft.Quota |
QuotaExceeded |
Deployment would exceed quota | Request increase or choose different region |
InvalidScope |
Incorrect scope format | Use pattern: /subscriptions/<id>/providers/<namespace>/locations/<region> |
| 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. |
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
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 |
Best Practices
- ✅ Always check quotas before deployment - Prevent quota exceeded errors
- ✅ Run
az quota listfirst - Discover correct quota resource names - ✅ Compare regions - Find regions with available capacity
- ✅ Account for growth - Request 20% buffer above immediate needs
- ✅ Use table output for overview -
--output tablefor quick scanning - ✅ Monitor usage trends - Set up alerts at 80% threshold (via Portal)
04 同仓库更多 Skills
azure-advisor-cost-optimization
Analyze Azure Advisor Cost/IdleResources findings and prevalidate deletion safety, including Service Groups. WHEN: "find unused Azure resources", "what resources am I paying for but no longer using", "idle-resource savings", "historical idle-resource savings", "are these idle resources safe to delete". Generic Cost, other subcategories, and cross-category requests use azure-advisor.
Foundry IQ 知识库管理
foundry-iq
Foundry IQ 知识库。适用时机:让本地或 Blob 文档可被搜索;创建/诊断知识库;对不支持的连接器或多源知识库的创建/重新配置进行分类处理;将现有知识库连接到智能体(包括多源知识库);创建/复用 Search 服务;从现有知识库检索带引用的内容;无需品牌词。在查询/目标类问题前先阅读其流程说明。不适用:其他知识库提供商、存储库文件搜索、不涉及 Foundry IQ 知识库或连接器请求的经典 Azure AI Search 索引/查询/应用类工作、通用智能体创建。
Python 应用 Azure 部署
python-appservice-deploy
将 Python(Flask/Django/FastAPI)代码部署到 Azure App Service Linux。触发条件:"Flask App Service"、"Django App Service"、"FastAPI App Service"、"将 Python 部署到 App Service"。不适用:Container Apps、Functions、非 Python、Terraform/Bicep/IaC、完整基础设施——请使用 azure-prepare。
Azure OpenAI 快速部署
preset
通过分析所有可用区域的容量,智能地将 Azure OpenAI 模型部署到最优区域。自动优先检查当前区域,并在需要时显示备选方案。适用于:快速部署、最优区域、最佳区域、自动区域选择、快速配置、多区域容量检查、高可用部署、部署到最佳位置。不适用于:自定义 SKU 选择(使用 customize)、特定版本选择(使用 customize)、自定义容量配置(使用 customize)、PTU 部署(使用 customize)。
Azure OpenAI 自定义部署
customize
具有完全自定义控制能力的 Azure OpenAI 模型交互式引导部署流程。逐步选择模型版本、SKU(GlobalStandard/Standard/ProvisionedManaged)、容量、RAI 策略(内容过滤器)以及高级选项(动态配额、优先处理、溢出)。适用于:自定义部署、定制模型部署、选择版本、选择 SKU、设置容量、配置内容过滤器、RAI 策略、部署选项、详细部署、高级部署、PTU 部署、预置吞吐量。不适用于:快速部署到最优区域(使用 preset)。
Azure OpenAI 模型容量查询
capacity
跨区域和跨项目发现可用的 Azure OpenAI 模型容量。分析配额限制、比较可用性,并根据容量需求推荐最佳部署位置。适用场景:查找容量、检查配额、可以在哪里部署、容量发现、容量最佳区域、多项目容量搜索、配额分析、模型可用性、区域比较、检查 TPM 可用性。不适用场景:实际部署(发现后转交给预设或自定义技能)、配额提升申请(引导用户前往 Azure 门户)、列出现有部署。