Subagent Template โ Quota Validation (Step 5)
Validate SKU quota and offer restrictions across candidate regions before presenting region choices.
Critical Rules
- โ Do NOT invoke ANY skills โ no
{"skill": "azure-validate"},{"skill": "azure-prepare"}, or any other skill call. You are a quota-check subagent only. - Read
sku-quota-validation.mdbefore executing ANY quota or offer restriction check. It contains the per-provider API patterns, anti-patterns to avoid, offer restriction checks for database services, region selection logic, and output schema. All procedures live there โ follow them exactly.
Input (provided by caller)
| Field | Required |
|---|---|
subscriptionId |
YES |
| SKU list from Step 4 (service type + SKU per service) | YES |
| Restricted-offer services (PostgreSQL, MySQL) | If present in plan |
Detected DB version per DB service (from context.json.detectedServices[], e.g. MySQL 5.7) |
โ REQUIRED if a DB is in the plan โ the version-selection algorithm in sku-quota-validation.md needs it. |
Output
Return JSON (โค500 tokens):
{
"quotaResults": [
{
"region": "{checked region}",
"services": [
{ "service": "{provider}", "sku": "{sku}", "limit": "{from API}", "used": "{from API}", "available": "{limit - used > 0}" },
// if DB service: add "offerRestricted": "{from capabilities API}", "version": "{selected per sku-quota-validation.md โ exact patch, never major-only '8.0'}"
],
"allAvailable": "{true only if ALL services in this region have available=true}"
}
// one entry per checked region
],
"recommendedRegion": "{first region where allAvailable=true}",
"checkedRegions": ["{all regions checked}"],
"offerRestrictions": [
// one entry per DB service+region checked โ derive from capabilities API response
{ "provider": "{namespace}", "region": "{region}", "restricted": "{true if blocked}", "reason": "{from API or null}" }
],
"offerRestrictionsVerified": "{true only if every DB service from input has โฅ1 entry in offerRestrictions[]}"
}โ Caller: copy each DB service's returned version into prepare-plan.json.services[].version at plan-write โ scaffold needs the exact patch (ARM rejects major-only '8.0').
Workflow
- Read
sku-quota-validation.md - Run the per-provider quota checks for every SKU across all candidate regions
- If restricted-offer services are in the input, run the offer restriction check for each database service in each candidate region per
sku-quota-validation.mdยง Offer Restriction Check - Return results per the Output schema above (โค500 tokens)
Anti-Patterns (from sku-quota-validation.md โ repeated here as guardrails)
- โ
az vm list-usageโ wrong provider, misleading data - โ
az appservice list-locationsโ lists locations, NOT quota - โ
az appservice list-usagesโ wrong scope - โ
mcp_azure_mcp_quotaโ unreliable for App Service - โ
az quota listโ extension loading fails on Windows - โ Use
az restfor ALL quota checks
Rules
- โ Free โ unlimited โ F1, Consumption, Serverless all have per-subscription, per-region quotas
- โ Check BOTH limit AND current usage โ
limit=1, usage=1means FULL - โ For PostgreSQL/MySQL: run offer restriction check per
sku-quota-validation.mdยง Offer Restriction Check
Token Budget
โค500 tokens for quota results report.