MaxCompute Project Management
Manage Alibaba Cloud MaxCompute (ODPS) Projects including creation, querying, listing, and deletion operations.
Quick Start
When user asks about MaxCompute projects, follow these steps:
- 1. Identify intent: create / list / get / delete
- Get RegionId: Ask user which region (e.g., cn-hangzhou, cn-shanghai)
- Execute: Run the appropriate command with
--region {REGION_ID} and INLINECODE1 - Verify: Confirm the result and report to user
Pre-flight Checklist (Execute BEFORE every command)
You MUST verify ALL of these before running any command:
- - [ ] I have asked the user for RegionId (not using default)
- [ ] I have the actual RegionId value from user (not placeholder)
- [ ] My command includes INLINECODE2
- [ ] My command includes INLINECODE3
- [ ] I am NOT reading or echoing any AK/SK values
- [ ] I am NOT using hardcoded values for user-provided parameters
If ANY check fails, STOP and fix before proceeding.
Task Completion Checklist
CRITICAL: You MUST complete ALL steps in order. Do NOT stop early.
For LIST Projects:
- 1. [ ] Ask user: "Which region would you like to query? (e.g., cn-hangzhou, cn-shanghai)"
- [ ] Ask user: "Which quota nickname to filter by? (e.g., os_PayAsYouGoQuota, or press Enter for default)"
- [ ] MUST use quota-nick-name parameter:
- If user specified a quota: Use
--quota-nick-name={USER_QUOTA}
- If user didn't specify: Use
--quota-nick-name=os_PayAsYouGo
- 4. [ ] Execute with REQUIRED parameters:
aliyun maxcompute list-projects --region {REGION_ID} --quota-nick-name={QUOTA_NICKNAME} --max-item=20 --user-agent AlibabaCloud-Agent-Skills
- 5. [ ] Wait for command output
- [ ] If 400 error (quota not found):
- Call
aliyun maxcompute list-quotas --billing-type ALL --region {REGION_ID} --user-agent AlibabaCloud-Agent-Skills
- Present available quotas to user for selection
- Re-run ListProjects with user-selected quota
- 7. [ ] Parse response and present results
- [ ] Confirm task completion
FORBIDDEN:
- - ❌ Use
--marker for pagination - ❌ Fetch all projects then filter locally with Python/jq
- ❌ Call API without
--quota-nick-name parameter
REQUIRED:
- - ✅ ALWAYS use
--quota-nick-name with user's quota or default - ✅ ALWAYS use INLINECODE10
- ✅ Let API do server-side filtering
For GET Project:
- 1. [ ] Ask user: "Which region? (e.g., cn-hangzhou)"
- [ ] Ask user: "What is the project name?"
- [ ] Execute: INLINECODE11
- [ ] Wait for command output
- [ ] Parse the JSON response - look for
data.name, data.status, INLINECODE14 - [ ] Present project details to user in a clear format
- [ ] Confirm task completion to user
For CREATE Project:
- 1. [ ] Ask user: "Which region to create in? (e.g., cn-hangzhou)"
- [ ] Ask user: "What is the project name?"
- [ ] MANDATORY VALIDATION: If project name is empty or whitespace, STOP and ask user again: "Project name cannot be empty. Please provide a valid project name."
- [ ] CRITICAL: Store the user's exact project name - do NOT use placeholder text
- [ ] MUST call ListQuotas: Execute: INLINECODE15
- [ ] Wait for command output
- [ ] Parse ListQuotas response: Find a quota with
nickName and its secondary quotas (look in data.quotas[].subQuotas or similar) - [ ] STRICT VALIDATION: Select a secondary quota's nickName from the ListQuotas response (NOT the primary quota)
- [ ] TRIM WHITESPACE: Remove any leading/trailing spaces from the quota nickName. If nickName contains internal spaces, trim them or select a different quota
- [ ] PRE-FLIGHT CHECK: Verify you have actual values for REGIONID, PROJECTNAME, and SECONDARYQUOTANICKNAME (trimmed, no spaces)
- [ ] Ask for typeSystem (optional): "Which typeSystem? (1=MaxCompute, 2=MaxCompute2, hive=Hive compatible; default: 2)"
- [ ] Validate typeSystem: Must be "1", "2", or "hive". If not specified or invalid, use default "2"
- [ ] Execute create command with ACTUAL values:
aliyun maxcompute create-project --region {ACTUAL_REGION} --body '{"name":"ACTUAL_PROJECT_NAME","defaultQuota":"SECONDARY_QUOTA_NICKNAME","productType":"payasyougo","typeSystem":"TYPE_SYSTEM_VALUE"}' --user-agent AlibabaCloud-Agent-Skills
Example with real values:
aliyun maxcompute create-project --region cn-hangzhou --body '{"name":"my-project-123","defaultQuota":"os_PayAsYouGoQuota_sub","productType":"payasyougo","typeSystem":"2"}' --user-agent AlibabaCloud-Agent-Skills
- 14. [ ] Wait for command output
- [ ] CHECK CREATE RESPONSE: If create command returned error (non-2xx), STOP and report error to user. Do NOT proceed to verification.
- [ ] ONLY IF create succeeded: Verify by executing: INLINECODE18
- [ ] CRITICAL: Verify the response contains the CORRECT project name (the one user requested, not a different project)
- [ ] CHECK STATUS: Verify response contains INLINECODE19
- [ ] If verification returns 403/Access Denied: Inform user about permission requirements and stop
- [ ] If project not found: Report "Project creation failed - project not found after creation"
- [ ] If wrong project returned: Report error - do not use a different project as substitute
- [ ] ONLY IF all checks pass: Confirm to user: "Project {PROJECT_NAME} created successfully with status AVAILABLE"
For DELETE Project:
NOTE: Project deletion is NOT supported by this skill.
If user requests deletion, respond: "Project deletion is not supported. Please use the Alibaba Cloud Console or contact your administrator."
Common Errors & Solutions
| Error | Cause | Solution |
|---|
| INLINECODE20 | Project doesn't exist | Check project name spelling and region |
| INLINECODE21 |
Name taken | Ask user for a different project name |
|
get project default quota error | No valid quota | Run list-quotas first, ensure quota exists |
|
InvalidProjectName | Bad naming format | Use only lowercase, numbers, underscores (3-28 chars) |
|
NoPermission or
403 Access Denied | RAM permission issue | Inform user: "You need odps:ListQuotas, odps:CreateProject and odps:GetProject permissions. Please contact your administrator." |
|
RegionId required | Missing --region | Always add
--region {REGION_ID} to commands |
|
ODPS-0420095: Access Denied | Missing read privilege | Inform user about required permissions and stop |
Forbidden Actions
CRITICAL: Never do these:
- 1. NEVER read/echo AK/SK values (e.g.,
echo $ALIBABA_CLOUD_ACCESS_KEY_ID) - NEVER use hardcoded values — always ask user for parameters, then use their ACTUAL answer (not placeholder text)
- NEVER use
aliyun configure set with literal credential values - NEVER run
aliyun ram commands - NEVER execute ANY command without INLINECODE32
- NEVER skip asking for RegionId — this is ALWAYS required
- NEVER assume a default region — always ask the user
- NEVER use deprecated API format
CreateProject — ALWAYS use plugin format create-project (lowercase with hyphen) - NEVER execute
aliyun maxcompute delete-project — project deletion is NOT supported by this skill
Negative Examples
| ❌ WRONG | ✅ CORRECT |
|---|
| INLINECODE36 (deprecated) | INLINECODE37 (lowercase) |
| INLINECODE38 (placeholder) |
'{"name":"actual-name"}' (actual value) |
|
--region cn-hangzhou (hardcoded) | Ask user first, then use their answer |
| Missing
--user-agent | Must include
--user-agent AlibabaCloud-Agent-Skills |
|
echo $ALIBABA_CLOUD_ACCESS_KEY_ID | Never read/display credentials |
|
aliyun ram ... commands | RAM commands are outside scope |
|
aliyun maxcompute delete-project | Project deletion is NOT supported |
| Verify different project on failure | Report failure, don't substitute |
Architecture
CODEBLOCK3
Dependencies
Prerequisite: Quota must exist before creating a project.
Every MaxCompute project requires a compute quota (defaultQuota). The quota must already exist in your account — if it does not, the create-project call will fail with get project default quota error.
Use the alibabacloud-odps-quota-manage skill to create or query quotas:
- - Pay-as-you-go: INLINECODE49
- Subscription: See
alibabacloud-odps-quota-manage skill for full parameters (partNickName, CU, ord_time, etc.) - List existing quotas: INLINECODE51
After creating or confirming a quota exists, use its nickName as the defaultQuota parameter when creating a project.
Installation
Pre-check: Aliyun CLI >= 3.3.1 required
Run aliyun version 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.
CODEBLOCK4
Environment Variables
No additional environment variables required beyond standard Alibaba Cloud credentials.
Authentication
CRITICAL: You MUST check credentials before ANY operation.
Allowed Credential Check (ONLY this command):
CODEBLOCK5
What to look for:
- - Output shows at least one profile with
mode: AK or INLINECODE57 - Profile shows
access_key_id: ******** (masked is OK)
If NO valid profile:
- - Tell user: "Please run
aliyun configure to set up credentials first." - STOP - Do not proceed with any MaxCompute commands
FORBIDDEN - NEVER do these:
- - ❌ INLINECODE60
- ❌ INLINECODE61
- ❌ INLINECODE62
- ❌ Any command that displays actual credential values
RAM Policy
[MUST] RAM Permission Pre-check: Before executing the workflow, verify that the current user has the required permissions.
Required permissions are listed in references/ram-policies.md.
Note: You do NOT need to verify RAM permissions via CLI commands. The permissions listed in ram-policies.md are for user reference only. Proceed with the workflow assuming the user has configured appropriate permissions.
Parameters
Always ask user for these values — never assume defaults:
| Parameter | Required | Description |
|---|
| INLINECODE63 | Yes | Region ID (cn-hangzhou, cn-shanghai, etc.) |
| INLINECODE64 |
Yes | Project name |
|
quotaNickName | For create | Quota alias (get from list-quotas) |
Example Conversation
LIST: User asks → Agent requests RegionId → Agent executes list-projects → Agent presents results
CREATE: User asks → Agent requests RegionId → Agent requests projectName → Agent calls list-quotas → Agent creates project → Agent verifies → Agent confirms success
Commands
List Projects
# Ask user for quota nickname first, then:
aliyun maxcompute list-projects --region {REGION_ID} --quota-nick-name={QUOTA_NICKNAME} --max-item=20 --user-agent AlibabaCloud-Agent-Skills
MUST: Always use
--quota-nick-name parameter (user-specified or default). Never fetch all and filter locally.
Get Project
CODEBLOCK7
Create Project
- 1. List quotas first:
CODEBLOCK8
- 2. Create with quota nickName from response:
CODEBLOCK9
Delete Project
CODEBLOCK10
Success Verification Method
See references/verification-method.md for detailed verification steps.
Verification Command:
CODEBLOCK11
Success Criteria:
- - Response contains INLINECODE67
- Response contains correct
"name" matching the created project - Response contains correct
"defaultQuota" matching the specified quota
If verification fails:
- 1. Check error message for specific issue
- Report failure reason to user
- Suggest corrective action based on error type
Cleanup
⚠️ DANGER: Deleting a project will permanently remove ALL data and CANNOT be undone.
Pre-deletion Checklist (ALL must be confirmed with user):
- 1. ☐ User explicitly confirms they want to delete the project
- ☐ User confirms they understand all data will be lost
- ☐ Project is in AVAILABLE status
- ☐ All important data has been backed up
Idempotent Deletion Workflow:
To ensure idempotency (safe for retries), follow this pattern:
CODEBLOCK12
Direct Deletion Command (use only if idempotency is not required):
CODEBLOCK13
DO NOT execute deletion without explicit user confirmation.
Limitations
The following operations cannot be performed via CLI/API and require Console access:
| Operation | Reason | Alternative |
|---|
| View billing details | Requires Console access | Use Billing Console |
| Manage IAM policies visually |
Console-only feature | Use RAM CLI for policy management |
| Real-time resource monitoring | Requires Console dashboard | Use CloudMonitor APIs |
API and Command Tables
See references/related-apis.md for complete API reference.
| Operation | CLI Command | API Action |
|---|
| Create Project | INLINECODE70 | CreateProject |
| Get Project |
aliyun maxcompute get-project | GetProject |
| List Projects |
aliyun maxcompute list-projects | ListProjects |
| Delete Project |
aliyun maxcompute delete-project | DeleteProject |
Skill Completion Criteria (REQUIRED for skill_pass)
For skillpassrate to be successful, ALL of these MUST be true:
Universal Requirements (ALL operations):
- 1. ✅ User was asked for RegionId and provided an answer
- ✅ ALL commands used
--region {USER_PROVIDED_VALUE} (not hardcoded) - ✅ ALL commands included INLINECODE75
- ✅ No forbidden actions were performed (no credential echoing, no ram commands)
- ✅ Task result was reported to user clearly
Operation-Specific Requirements:
LIST:
- - Command executed: INLINECODE76
- MUST include
--quota-nick-name=os_PayAsYouGo parameter for first attempt - MUST include
--max-item=20 parameter - If first attempt fails with 400 error, retry with INLINECODE79
- Results presented to user (list of projects or "no projects found")
GET:
- - Command executed: INLINECODE80
- Project details presented to user
CREATE:
- - User was asked for RegionId and projectName (actual values obtained)
- Quota was listed first: INLINECODE81
- MUST use actual values in body - NOT placeholders like INLINECODE82
- Create command format: INLINECODE83
- MUST check create response for errors before proceeding
- Verification command executed: INLINECODE84
- MUST verify the project name in response matches the requested project
- MUST verify status is AVAILABLE
- If verification fails due to permissions (403), inform user and stop
- If project not found or wrong project returned, report failure
- If verification succeeds (status=AVAILABLE), confirm success to user
DELETE:
- - Explicit user confirmation obtained ("yes" response)
- Delete command executed: INLINECODE85
- Deletion confirmed to user
Final Skill Pass Check:
CODEBLOCK14
Final Verification (Before Marking Task Complete)
You MUST verify ALL of these before telling user the task is done:
For LIST:
- - [ ] I asked for RegionId and got user's answer
- [ ] I executed list-projects with
--region {USER_ANSWER} and INLINECODE87 - [ ] I presented the results to user clearly
For GET:
- - [ ] I asked for RegionId and got user's answer
- [ ] I asked for projectName and got user's answer
- [ ] I executed get-project with user's values and INLINECODE88
- [ ] I presented project details to user clearly
For CREATE:
- - [ ] I asked for RegionId and got user's answer
- [ ] I asked for projectName and got user's answer
- [ ] I executed list-quotas to get a valid quota
- [ ] I executed create-project with user's values and INLINECODE89
- [ ] I verified creation by calling get-project
- [ ] I confirmed success to user
For DELETE:
- - [ ] I asked for RegionId and got user's answer
- [ ] I asked for projectName and got user's answer
- [ ] I got explicit "yes" confirmation from user
- [ ] I executed delete-project with INLINECODE90
- [ ] I confirmed deletion to user
If ANY check fails, the task is NOT complete.
Best Practices
- 1. Naming Convention: Use lowercase letters, numbers, and underscores for project names
- Quota Selection: Choose appropriate quota based on workload requirements
- Product Type: Use
payasyougo for development/testing, subscription for production with predictable workloads - Type System: Use
2 (MaxCompute) for new projects unless Hive compatibility is required - Resource Cleanup: Always clean up test projects to avoid unnecessary costs
Reference Links
Required RAM permissions |
|
references/verification-method.md | Verification steps |
|
references/cli-installation-guide.md | CLI installation guide |
|
MaxCompute Product Page | Official product documentation |
|
CreateProject API | API reference |
|
GetProject API | API reference |
|
ListProjects API | API reference |
MaxCompute 项目管理
管理阿里云 MaxCompute (ODPS) 项目,包括创建、查询、列出和删除操作。
快速开始
当用户询问 MaxCompute 项目时,请遵循以下步骤:
- 1. 识别意图:创建 / 列出 / 获取 / 删除
- 获取地域ID:询问用户所在区域(例如:cn-hangzhou、cn-shanghai)
- 执行:使用 --region {REGION_ID} 和 --user-agent AlibabaCloud-Agent-Skills 运行相应命令
- 验证:确认结果并报告给用户
执行前检查清单(在每条命令前执行)
在运行任何命令之前,您必须验证以下所有项目:
- - [ ] 我已向用户询问地域ID(未使用默认值)
- [ ] 我已从用户处获取实际的地域ID值(非占位符)
- [ ] 我的命令包含 --region {实际地域ID}
- [ ] 我的命令包含 --user-agent AlibabaCloud-Agent-Skills
- [ ] 我未读取或回显任何AK/SK值
- [ ] 我未对用户提供的参数使用硬编码值
如果任何检查失败,请停止并在继续前修复。
任务完成检查清单
关键:您必须按顺序完成所有步骤。请勿提前停止。
对于列出项目:
- 1. [ ] 询问用户:您想查询哪个地域?(例如:cn-hangzhou、cn-shanghai)
- [ ] 询问用户:按哪个配额昵称进行筛选?(例如:os_PayAsYouGoQuota,或按回车使用默认值)
- [ ] 必须使用配额昵称参数:
- 如果用户指定了配额:使用 --quota-nick-name={用户配额}
- 如果用户未指定:使用 --quota-nick-name=os_PayAsYouGo
- 4. [ ] 使用必需参数执行:
bash
aliyun maxcompute list-projects --region {REGION
ID} --quota-nick-name={QUOTANICKNAME} --max-item=20 --user-agent AlibabaCloud-Agent-Skills
- 5. [ ] 等待命令输出
- [ ] 如果出现400错误(未找到配额):
- 调用 aliyun maxcompute list-quotas --billing-type ALL --region {REGION_ID} --user-agent AlibabaCloud-Agent-Skills
- 向用户展示可用配额供选择
- 使用用户选择的配额重新运行ListProjects
- 7. [ ] 解析响应并展示结果
- [ ] 确认任务完成
禁止操作:
- - ❌ 使用 --marker 进行分页
- ❌ 获取所有项目然后使用Python/jq在本地筛选
- ❌ 不带 --quota-nick-name 参数调用API
必需操作:
- - ✅ 始终使用 --quota-nick-name 配合用户配额或默认值
- ✅ 始终使用 --max-item=20
- ✅ 让API进行服务端筛选
对于获取项目:
- 1. [ ] 询问用户:哪个地域?(例如:cn-hangzhou)
- [ ] 询问用户:项目名称是什么?
- [ ] 执行:aliyun maxcompute get-project --region {REGIONID} --project-name {PROJECTNAME} --user-agent AlibabaCloud-Agent-Skills
- [ ] 等待命令输出
- [ ] 解析JSON响应 - 查找 data.name、data.status、data.owner
- [ ] 以清晰格式向用户展示项目详情
- [ ] 向用户确认任务完成
对于创建项目:
- 1. [ ] 询问用户:在哪个地域创建?(例如:cn-hangzhou)
- [ ] 询问用户:项目名称是什么?
- [ ] 强制验证: 如果项目名称为空或仅含空格,请停止并再次询问用户:项目名称不能为空。请提供有效的项目名称。
- [ ] 关键: 存储用户确切的项目名称 - 请勿使用占位符文本
- [ ] 必须调用ListQuotas: 执行:aliyun maxcompute list-quotas --billing-type ALL --region {REGIONID} --user-agent AlibabaCloud-Agent-Skills
- [ ] 等待命令输出
- [ ] 解析ListQuotas响应: 查找具有 nickName 的配额及其二级配额(在 data.quotas[].subQuotas 或类似位置查找)
- [ ] 严格验证: 从ListQuotas响应中选择一个二级配额的nickName(非主配额)
- [ ] 修剪空格: 移除配额nickName中的前导/尾随空格。如果nickName包含内部空格,请修剪或选择其他配额
- [ ] 执行前检查: 验证您已获取REGIONID、PROJECTNAME和SECONDARYQUOTA_NICKNAME的实际值(已修剪,无空格)
- [ ] 询问typeSystem(可选): 使用哪种类型系统?(1=MaxCompute,2=MaxCompute2,hive=Hive兼容;默认:2)
- [ ] 验证typeSystem: 必须为1、2或hive。如果未指定或无效,使用默认值2
- [ ] 使用实际值执行创建命令:
bash
aliyun maxcompute create-project --region {实际地域} --body {name:实际项目名称,defaultQuota:二级配额昵称,productType:payasyougo,typeSystem:类型系统值} --user-agent AlibabaCloud-Agent-Skills
使用实际值的示例:
bash
aliyun maxcompute create-project --region cn-hangzhou --body {name:my-project-123,defaultQuota:osPayAsYouGoQuotasub,productType:payasyougo,typeSystem:2} --user-agent AlibabaCloud-Agent-Skills
- 14. [ ] 等待命令输出
- [ ] 检查创建响应: 如果创建命令返回错误(非2xx),请停止并向用户报告错误。请勿继续验证。
- [ ] 仅在创建成功时: 通过执行以下命令进行验证:aliyun maxcompute get-project --region {REGIONID} --project-name {PROJECTNAME} --user-agent AlibabaCloud-Agent-Skills
- [ ] 关键: 验证响应包含正确的项目名称(用户请求的那个,而非其他项目)
- [ ] 检查状态: 验证响应包含 status:AVAILABLE
- [ ] 如果验证返回403/访问被拒绝: 告知用户权限要求并停止
- [ ] 如果未找到项目: 报告项目创建失败 - 创建后未找到项目
- [ ] 如果返回了错误项目: 报告错误 - 请勿使用其他项目作为替代
- [ ] 仅在所有检查通过时: 向用户确认:项目 {PROJECT_NAME} 已成功创建,状态为AVAILABLE
对于删除项目:
注意:此技能不支持项目删除。
如果用户请求删除,请回复:不支持项目删除。请使用阿里云控制台或联系您的管理员。
常见错误及解决方案
| 错误 | 原因 | 解决方案 |
|---|
| ProjectNotFound | 项目不存在 | 检查项目名称拼写和地域 |
| ProjectAlreadyExist |
名称已被占用 | 请用户提供不同的项目名称 |
| get project default quota error | 无有效配额 | 先运行list-quotas,确保配额存在 |
| InvalidProjectName | 命名格式错误 | 仅使用小写字母、数字、下划线(3-28个字符) |
| NoPermission 或 403 Access Denied | RAM权限问题 | 告知用户:您需要odps:ListQuotas、odps:CreateProject和odps:GetProject权限。请联系您的管理员。 |
| RegionId required | 缺少 --region | 始终在命令中添加 --region {REGION_ID} |
| ODPS-0420095: Access Denied | 缺少读取权限 | 告知用户所需权限并停止 |
禁止操作
关键:切勿执行以下操作:
- 1. 切勿读取/回显AK/SK值(例如 echo $ALIBABACLOUDACCESSKEYID)
- 切勿使用硬编码值 — 始终向用户询问参数,然后使用他们的实际回答(非占位符文本)
- 切勿使用字面凭证值运行 aliyun configure set
- 切勿运行 aliyun ram