MaxCompute Quota Management
Manage MaxCompute (ODPS) Quota resources using Alibaba Cloud CLI and SDK. This skill covers pay-as-you-go quota creation, quota query, and quota listing operations.
Limitations and Notes
| Feature | CLI Support | SDK Support | Notes |
|---|
| Create Pay-as-you-go Quota | ✅ Yes | ✅ Yes | Fully supported |
| Create Subscription Quota | ❌ Not Supported | ❌ Not Supported | Temporarily unavailable |
| Query Quota (GetQuota) | ✅ Yes | ✅ Yes | ⚠️ Deprecated - Use QueryQuota instead |
| Query Quota (QueryQuota) | ✅ Yes | ✅ Yes | Recommended replacement for GetQuota |
| List Quotas | ✅ Yes | ✅ Yes | Fully supported (both payasyougo and subscription) |
| Delete Quota | ❌ No API | ❌ No API | Not available via API - Must use Console |
| Modify Quota | ❌ Not in scope | ❌ Not in scope | Not covered in this solution |
Important:
- Create Subscription Quota is temporarily NOT supported in this skill. For subscription quota creation, please use the Alibaba Cloud Console.
- Delete Quota operation is NOT available through CLI or SDK. You must use the Alibaba Cloud Console to delete quotas.
- QueryQuota is preferred - GetQuota is deprecated but acceptable if it returns success
- ⚠️ CRITICAL: When checking if quota exists, ALWAYS use ListQuotas API, NEVER use GetQuota
- 🚨 MANDATORY: Before CreateQuota, MUST call ListQuotas first - NEVER skip this step
Architecture
Alibaba Cloud Account → MaxCompute Service → Quota Resources (CU)
├── Pay-as-you-go Quota (后付费) ← **Creation Supported**
└── Subscription Quota (预付费) ← Query/List only
Installation
Pre-check: Aliyun CLI >= 3.3.1 required
Run
to verify >= 3.3.1. If not installed or version too low,
see
references/cli-installation-guide.md for installation instructions.
Then
[MUST] run
aliyun configure set --auto-plugin-install true
to enable automatic plugin installation.
bash
# Verify CLI version
aliyun version
# Enable auto plugin installation
aliyun configure set --auto-plugin-install true
Environment Variables
| Variable | Required | Description |
|---|
ALIBABA_CLOUD_ACCESS_KEY_ID
| Yes | Alibaba Cloud Access Key ID |
ALIBABA_CLOUD_ACCESS_KEY_SECRET
| Yes | Alibaba Cloud Access Key Secret |
Parameter Confirmation
IMPORTANT: Parameter Confirmation — Before executing any command or API call,
ALL user-customizable parameters (e.g., RegionId, quota nicknames, billing types, etc.)
MUST be confirmed with the user. Do NOT assume or use default values without explicit user approval.
| Parameter Name | Required/Optional | Description | Default Value |
|---|
| Required | Alibaba Cloud region (e.g., cn-hangzhou, cn-shanghai) | - |
| Required | Billing type: only (subscription not supported) | - |
| Required | Product code (see table below) | - |
| Optional | Filter for listing: or or | |
| Optional | Max items per page for listing | |
Commodity Codes (for Pay-as-you-go)
| Site | Commodity Code |
|---|
| China (国内站) | |
| International (国际站) | |
Authentication
Security: Never expose credentials
- Don't print AK/SK values
- Don't ask user to type AK/SK in chat
- Don't use with hardcoded values
Check credentials:
If no credentials, ask user to run
first, then continue.
Core Workflow
🚨 CRITICAL RULE FOR ALL OPERATIONS:
| Operation | First Command | Then |
|---|
| CREATE quota | | If empty → Create; If exists → Stop |
| QUERY quota | | Show results |
| LIST quotas | | Show list |
⚠️ CREATE without ListQuotas first = ERROR
FORBIDDEN COMMANDS - NEVER USE:
- ❌
aliyun maxcompute create-quota
- WRONG CASE (kebab-case), use PascalCase
- ❌
aliyun maxcompute GetQuota
- DEPRECATED, use instead
- ❌
aliyun bssopenapi CreateInstance
- WRONG API (BssOpenApi), use MaxCompute CreateQuota instead
- ❌
aliyun bssopenapi QueryAvailableInstances
- WRONG API for listing quotas, use MaxCompute ListQuotas instead
- ❌ commands - WRONG SERVICE (Quota Center), use MaxCompute instead
MUST USE INSTEAD:
- ✅
aliyun maxcompute list-quotas
- For listing/checking quotas (MaxCompute service, NOT BssOpenApi)
- ✅
aliyun maxcompute query-quota
- For querying quota details (MaxCompute service)
- ✅
aliyun maxcompute CreateQuota
- For creating quota (MaxCompute service)
⚠️ IMPORTANT: Use
commands (MaxCompute service), NOT
commands (Quota Center service).
Command Case Rules:
- API actions use PascalCase:
- CLI commands use kebab-case: ,
CREATE Quota (CHECK FIRST - THEN CREATE):
🚨 PREPAID/SUBSCRIPTION QUOTAS ARE FORBIDDEN:
This skill ONLY supports pay-as-you-go quota creation.
- If user wants prepaid/subscription quota → Tell them to use Alibaba Cloud Console
- Do NOT attempt to create prepaid quotas
🚨 FOR CREATE: FIRST RUN LISTQUOTAS - NEVER SKIP THIS:
STEP 1 - MANDATORY: Call ListQuotas FIRST
bash
aliyun maxcompute list-quotas --billing-type payasyougo --region <R>
DO NOT proceed to Step 2 until you get ListQuotas result
Use MaxCompute service (), NOT Quota Center ().
AFTER ListQuotas result (STEP 2):
| Result | Action |
|---|
| List shows quota | DO NOT CREATE - Inform user "Quota already exists" → Done |
| List is empty | Go to Step 3 (Create) |
STEP 3 - ONLY IF LIST WAS EMPTY:
PRE-CREATE CHECKLIST - ALL MUST BE TRUE:
bash
aliyun maxcompute CreateQuota --chargeType payasyougo --commodityCode odps --region <R>
For International Site:
bash
aliyun maxcompute CreateQuota --chargeType payasyougo --commodityCode odps_intl --region <R>
CRITICAL:
- Use (PascalCase), NOT (kebab-case)
- FORBIDDEN: , , or any kebab-case variant
- Use MaxCompute CreateQuota, NOT BssOpenApi CreateInstance
- Do NOT use
aliyun bssopenapi CreateInstance
- commodityCode values:
- China site: or
- International site: or
- NEVER use as commodityCode
- Note: When is set, commodityCode validation is not strict
FINALLY:
- Parse result
- Show user
- Done
⚠️ NEVER call CreateQuota before ListQuotas. This causes errors.
Note: If quota already exists, DO NOT create. Only create when ListQuotas returns empty list.
QUERY Quota (when user provides nickname):
PRIORITY: Use
as the primary API for querying specific quota details by nickname.
CHECKLIST:
USE THIS COMMAND:
bash
aliyun maxcompute query-quota --nickname <N> --region <R>
IMPORTANT: If nickname contains Chinese characters, URL-encode it first before passing to the command.
FORBIDDEN: aliyun maxcompute GetQuota
- use
instead.
- Parse JSON
- Extract: , , ,
- Show all fields → Done
LIST Quotas:
⚠️ FOR LISTING QUOTAS: ONLY use MaxCompute ListQuotas, NOT BssOpenApi QueryAvailableInstances
When checking for existing pay-as-you-go quotas (before creation):
bash
aliyun maxcompute list-quotas --billing-type payasyougo --region <R>
MUST include --billing-type payasyougo
to filter at API level.
When listing all quotas (user request):
bash
aliyun maxcompute list-quotas --billing-type ALL --region <R>
billingType parameter:
-
-
-
Use
when checking for existing pay-as-you-go quotas
-
Parse JSON
-
-
Show list → Done
Quick Reference
See references/related-apis.md for complete CLI command reference and response format details.
Key Points:
- Use
list-quotas --billing-type payasyougo
before creating
- Use (not ) for querying
- Use (PascalCase) for creating
- Always include
--user-agent AlibabaCloud-Agent-Skills
Task Completion
Finish with:
- Summary of what was done
- Key results (nickname, region, status)
- "✅ Complete"
Error Handling
| Error Code | What to Do |
|---|
| Quota exists → Query it and show details → Task complete |
| Quota doesn't exist → Inform user |
| Wrong parameter format → Check with user |
| No permission → Direct to Console |
| Retry once or contact support |
Cleanup
No Delete API - Must use
Console to delete quotas
API Reference
See references/related-apis.md for complete API reference, CLI commands, and response formats.
Best Practices
- Always confirm region with user before any operation
- For creation: First list to check if quota exists (one per region limit)
- If quota exists: Query it for user instead of trying to create
- Use query-quota (NOT get-quota) for quota details
- For subscription quotas: Direct user to Alibaba Cloud Console
Reference Links
| Reference | Description |
|---|
| references/related-apis.md | Complete CLI commands and API reference |
| references/ram-policies.md | Required RAM permissions |
| references/verification-method.md | Success verification steps |
| references/acceptance-criteria.md | Testing acceptance criteria |
| references/cli-installation-guide.md | CLI installation guide |
Related Documentation