alibabacloud-odps-project-manage
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMaxCompute Project Management
MaxCompute项目管理
Manage Alibaba Cloud MaxCompute (ODPS) Projects including creation, querying, listing, and deletion operations.
管理阿里云MaxCompute(ODPS)项目,支持创建、查询、列举和删除操作。
Quick Start
快速开始
When user asks about MaxCompute projects, follow these steps:
- Identify intent: create / list / get / delete
- Get RegionId: Ask user which region (e.g., cn-hangzhou, cn-shanghai)
- Execute: Run the appropriate command with and
--region {REGION_ID}--user-agent AlibabaCloud-Agent-Skills - Verify: Confirm the result and report to user
当用户询问MaxCompute项目相关问题时,遵循以下步骤操作:
- 识别意图:创建/列举/查询/删除
- 获取RegionId:询问用户所属地域(例如cn-hangzhou、cn-shanghai)
- 执行操作:运行对应命令,携带和
--region {REGION_ID}参数--user-agent AlibabaCloud-Agent-Skills - 结果验证:确认执行结果并反馈给用户
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
--region {ACTUAL_REGION_ID} - My command includes
--user-agent AlibabaCloud-Agent-Skills - 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.
运行任何命令前必须确认所有检查项都通过:
- 我已向用户询问RegionId(不使用默认值)
- 我已获取用户提供的真实RegionId值(不是占位符)
- 我的命令包含
--region {实际的RegionId值} - 我的命令包含参数
--user-agent AlibabaCloud-Agent-Skills - 我不会读取或输出任何AK/SK值
- 我不会为用户提供的参数使用硬编码值
如果任何检查项不通过,请停止操作,修复后再继续。
Task Completion Checklist
任务完成检查清单
CRITICAL: You MUST complete ALL steps in order. Do NOT stop early.
重要提示:必须按顺序完成所有步骤,不得提前终止。
For LIST Projects:
列举项目操作:
- 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
- If user specified a quota: Use
- Execute with REQUIRED parameters:
bash
aliyun maxcompute list-projects --region {REGION_ID} --quota-nick-name={QUOTA_NICKNAME} --max-item=20 --user-agent AlibabaCloud-Agent-Skills - 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
- Call
- Parse response and present results
- Confirm task completion
FORBIDDEN:
- ❌ Use for pagination
--marker - ❌ Fetch all projects then filter locally with Python/jq
- ❌ Call API without parameter
--quota-nick-name
REQUIRED:
- ✅ ALWAYS use with user's quota or default
--quota-nick-name - ✅ ALWAYS use
--max-item=20 - ✅ Let API do server-side filtering
- 询问用户:"您需要查询哪个地域的项目?(例如cn-hangzhou、cn-shanghai)"
- 询问用户:"需要按哪个配额别名过滤?(例如os_PayAsYouGoQuota,按回车键使用默认值)"
- 必须使用quota-nick-name参数:
- 如果用户指定了配额:使用
--quota-nick-name={用户指定的配额} - 如果用户未指定:使用
--quota-nick-name=os_PayAsYouGo
- 如果用户指定了配额:使用
- 携带必填参数执行命令:
bash
aliyun maxcompute list-projects --region {REGION_ID} --quota-nick-name={QUOTA_NICKNAME} --max-item=20 --user-agent AlibabaCloud-Agent-Skills - 等待命令执行返回结果
- 如果返回400错误(配额不存在):
- 执行
aliyun maxcompute list-quotas --billing-type ALL --region {REGION_ID} --user-agent AlibabaCloud-Agent-Skills - 向用户展示可用配额供选择
- 使用用户选择的配额重新执行列举项目命令
- 执行
- 解析响应并向用户展示结果
- 确认任务完成
禁止操作:
- ❌ 使用进行分页
--marker - ❌ 拉取所有项目后用Python/jq在本地过滤
- ❌ 不携带参数调用API
--quota-nick-name
必须要求:
- ✅ 始终携带参数,值为用户指定的配额或默认配额
--quota-nick-name - ✅ 始终携带参数
--max-item=20 - ✅ 让API完成服务端过滤
For GET Project:
查询项目操作:
- Ask user: "Which region? (e.g., cn-hangzhou)"
- Ask user: "What is the project name?"
- Execute:
aliyun maxcompute get-project --region {REGION_ID} --project-name {PROJECT_NAME} --user-agent AlibabaCloud-Agent-Skills - Wait for command output
- Parse the JSON response - look for ,
data.name,data.statusdata.owner - Present project details to user in a clear format
- Confirm task completion to user
- 询问用户:"项目所属哪个地域?(例如cn-hangzhou)"
- 询问用户:"项目名称是什么?"
- 执行命令:
aliyun maxcompute get-project --region {REGION_ID} --project-name {PROJECT_NAME} --user-agent AlibabaCloud-Agent-Skills - 等待命令执行返回结果
- 解析JSON响应,提取、
data.name、data.status字段data.owner - 以清晰的格式向用户展示项目详情
- 向用户确认任务完成
For CREATE Project:
创建项目操作:
- 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:
aliyun maxcompute list-quotas --billing-type ALL --region {REGION_ID} --user-agent AlibabaCloud-Agent-Skills - Wait for command output
- Parse ListQuotas response: Find a quota with and its secondary quotas (look in
nickNameor similar)data.quotas[].subQuotas - 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 REGION_ID, PROJECT_NAME, and SECONDARY_QUOTA_NICKNAME (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:
Example with real values:bash
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-Skillsbashaliyun maxcompute create-project --region cn-hangzhou --body '{"name":"my-project-123","defaultQuota":"os_PayAsYouGoQuota_sub","productType":"payasyougo","typeSystem":"2"}' --user-agent AlibabaCloud-Agent-Skills - 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:
aliyun maxcompute get-project --region {REGION_ID} --project-name {PROJECT_NAME} --user-agent AlibabaCloud-Agent-Skills - CRITICAL: Verify the response contains the CORRECT project name (the one user requested, not a different project)
- CHECK STATUS: Verify response contains
"status":"AVAILABLE" - 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"
- 询问用户:"需要在哪个地域创建项目?(例如cn-hangzhou)"
- 询问用户:"项目名称是什么?"
- 必填校验: 如果项目名称为空或全是空格,停止操作并再次询问用户:"项目名称不能为空,请提供有效的项目名称。"
- 重要提示: 存储用户提供的准确项目名称,不要使用占位符文本
- 必须调用列举配额接口: 执行命令:
aliyun maxcompute list-quotas --billing-type ALL --region {REGION_ID} --user-agent AlibabaCloud-Agent-Skills - 等待命令执行返回结果
- 解析列举配额响应: 查找带有的配额及其二级配额(查看
nickName或类似字段)data.quotas[].subQuotas - 严格校验: 从列举配额响应中选择二级配额的nickName(不能是主配额)
- 去除空格: 移除配额别名前后的空格,如果别名中间包含空格,去除空格或选择其他配额
- 前置检查: 确认你已获取REGION_ID、PROJECT_NAME和SECONDARY_QUOTA_NICKNAME的真实值(已去空格,无空白字符)
- 询问typeSystem(可选): "需要使用哪种类型系统?(1=MaxCompute、2=MaxCompute2、hive=Hive兼容;默认值:2)"
- 校验typeSystem: 必须是"1"、"2"或"hive",如果未指定或值无效,使用默认值"2"
- 使用真实值执行创建命令:
真实值示例:bash
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-Skillsbashaliyun maxcompute create-project --region cn-hangzhou --body '{"name":"my-project-123","defaultQuota":"os_PayAsYouGoQuota_sub","productType":"payasyougo","typeSystem":"2"}' --user-agent AlibabaCloud-Agent-Skills - 等待命令执行返回结果
- 检查创建响应: 如果创建命令返回错误(非2xx状态码),停止操作并向用户报告错误,不要继续执行验证步骤
- 仅当创建成功时执行: 执行以下命令验证创建结果:
aliyun maxcompute get-project --region {REGION_ID} --project-name {PROJECT_NAME} --user-agent AlibabaCloud-Agent-Skills - 重要提示: 验证响应中包含正确的项目名称(用户请求的名称,不是其他项目)
- 检查状态: 验证响应中包含
"status":"AVAILABLE" - 如果验证返回403/访问被拒绝: 告知用户所需的权限要求并停止操作
- 如果未找到项目: 报告"项目创建失败 - 创建后未找到对应项目"
- 如果返回了错误的项目: 报告错误,不要使用其他项目替代
- 仅当所有检查都通过时: 向用户确认:"项目{PROJECT_NAME}创建成功,状态为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 |
|---|---|---|
| Project doesn't exist | Check project name spelling and region |
| Name taken | Ask user for a different project name |
| No valid quota | Run list-quotas first, ensure quota exists |
| Bad naming format | Use only lowercase, numbers, underscores (3-28 chars) |
| RAM permission issue | Inform user: "You need odps:ListQuotas, odps:CreateProject and odps:GetProject permissions. Please contact your administrator." |
| Missing --region | Always add |
| Missing read privilege | Inform user about required permissions and stop |
| 错误 | 原因 | 解决方案 |
|---|---|---|
| 项目不存在 | 检查项目名称拼写和所属地域 |
| 项目名称已被占用 | 请用户提供其他项目名称 |
| 无有效配额 | 先运行list-quotas命令,确认配额存在 |
| 命名格式不符合要求 | 仅使用小写字母、数字、下划线(长度3-28个字符) |
| RAM权限不足 | 告知用户:"您需要odps:ListQuotas、odps:CreateProject和odps:GetProject权限,请联系管理员处理。" |
| 缺少--region参数 | 所有命令都要添加 |
| 缺少读取权限 | 告知用户所需权限并停止操作 |
Forbidden Actions
禁止行为
CRITICAL: Never do these:
- 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
with literal credential valuesaliyun configure set- NEVER run
commandsaliyun ram- NEVER execute ANY command without
--user-agent AlibabaCloud-Agent-Skills- NEVER skip asking for RegionId — this is ALWAYS required
- NEVER assume a default region — always ask the user
- NEVER use deprecated API format
— ALWAYS use plugin formatCreateProject(lowercase with hyphen)create-project- NEVER execute
— project deletion is NOT supported by this skillaliyun maxcompute delete-project
重要提示:绝对不要执行以下操作:
- 绝对不要读取/输出AK/SK值(例如
)echo $ALIBABA_CLOUD_ACCESS_KEY_ID- 绝对不要使用硬编码值——始终向用户询问参数,然后使用用户提供的真实值(不是占位符文本)
- 绝对不要使用字面凭证值执行
命令aliyun configure set- 绝对不要运行
相关命令aliyun ram- 绝对不要执行任何不携带
参数的命令--user-agent AlibabaCloud-Agent-Skills- 绝对不要跳过询问RegionId的步骤——这是必填项
- 绝对不要假设默认地域——始终询问用户
- 绝对不要使用已废弃的API格式
——始终使用插件格式CreateProject(小写加连字符)create-project- 绝对不要执行
命令——本技能不支持项目删除操作aliyun maxcompute delete-project
Negative Examples
反面示例
| ❌ WRONG | ✅ CORRECT |
|---|---|
| |
| |
| Ask user first, then use their answer |
Missing | Must include |
| Never read/display credentials |
| RAM commands are outside scope |
| Project deletion is NOT supported |
| Verify different project on failure | Report failure, don't substitute |
| ❌ 错误 | ✅ 正确 |
|---|---|
| |
| |
| 先询问用户,再使用用户提供的答案 |
缺少 | 必须携带 |
| 绝对不要读取/展示凭证信息 |
| RAM命令不在本技能支持范围内 |
| 不支持项目删除操作 |
| 创建失败时验证其他项目 | 报告失败,不要替换项目 |
Architecture
架构
MaxCompute Service
└── Project (Workspace)
├── defaultQuota (Compute Resource - MUST exist before project creation)
├── productType (payasyougo/subscription)
└── typeSystem ("1", "2", or "hive"; default: "2")MaxCompute Service
└── Project (Workspace)
├── defaultQuota (计算资源 - 创建项目前必须已存在)
├── productType (payasyougo/subscription)
└── typeSystem ("1", "2", 或 "hive"; 默认值: "2")Dependencies
依赖项
Prerequisite: Quota must exist before creating a project.Every MaxCompute project requires a compute quota (). The quota must already exist in your account — if it does not, thedefaultQuotacall will fail withcreate-project.get project default quota errorUse the alibabacloud-odps-quota-manage skill to create or query quotas:
- Pay-as-you-go:
aliyun maxcompute CreateQuota --chargeType payasyougo --commodityCode odps --region <region> --user-agent AlibabaCloud-Agent-Skills- Subscription: See
skill for full parameters (partNickName, CU, ord_time, etc.)alibabacloud-odps-quota-manage- List existing quotas:
aliyun maxcompute list-quotas --billing-type ALL --region <region> --user-agent AlibabaCloud-Agent-SkillsAfter creating or confirming a quota exists, use itsas thenickNameparameter when creating a project.defaultQuota
前提条件:创建项目前配额必须已存在。每个MaxCompute项目都需要一个计算配额(),该配额必须已存在于你的账户中——如果不存在,defaultQuota调用会失败并返回create-project错误。get project default quota error使用alibabacloud-odps-quota-manage技能创建或查询配额:
- 按量付费:
aliyun maxcompute CreateQuota --chargeType payasyougo --commodityCode odps --region <region> --user-agent AlibabaCloud-Agent-Skills- 包年包月: 查看
技能获取完整参数(partNickName、CU、ord_time等)alibabacloud-odps-quota-manage- 列举现有配额:
aliyun maxcompute list-quotas --billing-type ALL --region <region> --user-agent AlibabaCloud-Agent-Skills创建或确认配额存在后,使用其作为创建项目时的nickName参数值。defaultQuota
Installation
安装
Pre-check: Aliyun CLI >= 3.3.1 required Runto verify >= 3.3.1. If not installed or version too low, see references/cli-installation-guide.md for installation instructions. Then [MUST] runaliyun versionto enable automatic plugin installation.aliyun configure set --auto-plugin-install true
bash
undefined前置检查:需要Aliyun CLI >= 3.3.1版本 运行确认版本>=3.3.1,如果未安装或版本过低,查看references/cli-installation-guide.md获取安装指南。然后**[必须]**运行aliyun version开启自动安装插件功能。aliyun configure set --auto-plugin-install true
bash
undefinedInstall Alibaba Cloud CLI (with 60s timeout)
安装阿里云CLI(超时时间60秒)
curl -fsSL --max-time 60 https://aliyuncli.alicdn.com/install.sh | bash
curl -fsSL --max-time 60 https://aliyuncli.alicdn.com/install.sh | bash
Verify version (must be >= 3.3.1)
验证版本(必须 >= 3.3.1)
aliyun version
aliyun version
Enable auto plugin installation
开启自动安装插件功能
aliyun configure set --auto-plugin-install true
undefinedaliyun configure set --auto-plugin-install true
undefinedEnvironment 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):
允许的凭证检查命令(仅此命令可用):
bash
aliyun configure listWhat to look for:
- Output shows at least one profile with or
mode: AKmode: StsToken - Profile shows (masked is OK)
access_key_id: ********
If NO valid profile:
- Tell user: "Please run to set up credentials first."
aliyun configure - STOP - Do not proceed with any MaxCompute commands
FORBIDDEN - NEVER do these:
- ❌
echo $ALIBABA_CLOUD_ACCESS_KEY_ID - ❌
echo $ALIBABA_CLOUD_ACCESS_KEY_SECRET - ❌
aliyun configure get | grep access-key - ❌ Any command that displays actual credential values
bash
aliyun configure list检查要点:
- 输出显示至少有一个配置文件的或
mode: AKmode: StsToken - 配置文件显示(掩码显示即可)
access_key_id: ********
如果没有有效配置文件:
- 告知用户:"请先运行配置凭证。"
aliyun configure - 停止操作 - 不要继续执行任何MaxCompute命令
禁止操作 - 绝对不要执行:
- ❌
echo $ALIBABA_CLOUD_ACCESS_KEY_ID - ❌
echo $ALIBABA_CLOUD_ACCESS_KEY_SECRET - ❌
aliyun configure get | grep access-key - ❌ 任何会展示真实凭证值的命令
RAM Policy
RAM策略
[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.
[必须] RAM权限前置检查: 执行工作流前,确认当前用户拥有所需权限。所需权限列在references/ram-policies.md中。注意: 你不需要通过CLI命令验证RAM权限,ram-policies.md中列出的权限仅作为用户参考,假设用户已配置合适权限,继续执行工作流即可。
Parameters
参数
Always ask user for these values — never assume defaults:
| Parameter | Required | Description |
|---|---|---|
| Yes | Region ID (cn-hangzhou, cn-shanghai, etc.) |
| Yes | Project name |
| For create | Quota alias (get from list-quotas) |
始终向用户询问以下参数值——绝对不要假设默认值:
| 参数 | 是否必填 | 说明 |
|---|---|---|
| 是 | 地域ID(cn-hangzhou、cn-shanghai等) |
| 是 | 项目名称 |
| 创建时必填 | 配额别名(从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
列举项目: 用户提问 → Agent询问RegionId → Agent执行list-projects命令 → Agent展示结果
创建项目: 用户提问 → Agent询问RegionId → Agent询问projectName → Agent调用list-quotas接口 → Agent创建项目 → Agent验证结果 → Agent确认创建成功
Commands
命令
List Projects
列举项目
bash
undefinedbash
undefinedAsk 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.aliyun maxcompute list-projects --region {REGION_ID} --quota-nick-name={QUOTA_NICKNAME} --max-item=20 --user-agent AlibabaCloud-Agent-Skills
**必须要求:** 始终携带`--quota-nick-name`参数(用户指定值或默认值),绝对不要拉取所有项目后在本地过滤。Get Project
查询项目
bash
aliyun maxcompute get-project --region {REGION_ID} --project-name {PROJECT_NAME} --user-agent AlibabaCloud-Agent-Skillsbash
aliyun maxcompute get-project --region {REGION_ID} --project-name {PROJECT_NAME} --user-agent AlibabaCloud-Agent-SkillsCreate Project
创建项目
- List quotas first:
bash
aliyun maxcompute list-quotas --billing-type ALL --region {REGION_ID} --user-agent AlibabaCloud-Agent-Skills- Create with quota nickName from response:
bash
aliyun maxcompute create-project --region {REGION_ID} --body '{"name":"{PROJECT_NAME}","defaultQuota":"{QUOTA_NICKNAME}","productType":"payasyougo"}' --user-agent AlibabaCloud-Agent-Skills- 先列举配额:
bash
aliyun maxcompute list-quotas --billing-type ALL --region {REGION_ID} --user-agent AlibabaCloud-Agent-Skills- 使用响应中的配额别名创建项目:
bash
aliyun maxcompute create-project --region {REGION_ID} --body '{"name":"{PROJECT_NAME}","defaultQuota":"{QUOTA_NICKNAME}","productType":"payasyougo"}' --user-agent AlibabaCloud-Agent-SkillsDelete Project
删除项目
bash
aliyun maxcompute delete-project --region {REGION_ID} --project-name {PROJECT_NAME} --user-agent AlibabaCloud-Agent-Skillsbash
aliyun maxcompute delete-project --region {REGION_ID} --project-name {PROJECT_NAME} --user-agent AlibabaCloud-Agent-SkillsSuccess Verification Method
成功验证方法
See references/verification-method.md for detailed verification steps.
Verification Command:
bash
aliyun maxcompute get-project --region {REGION_ID} --project-name {PROJECT_NAME} --user-agent AlibabaCloud-Agent-SkillsSuccess Criteria:
- Response contains
"status":"AVAILABLE" - Response contains correct matching the created project
"name" - Response contains correct matching the specified quota
"defaultQuota"
If verification fails:
- Check error message for specific issue
- Report failure reason to user
- Suggest corrective action based on error type
查看references/verification-method.md获取详细的验证步骤。
验证命令:
bash
aliyun maxcompute get-project --region {REGION_ID} --project-name {PROJECT_NAME} --user-agent AlibabaCloud-Agent-Skills成功标准:
- 响应包含
"status":"AVAILABLE" - 响应包含的与创建的项目名称一致
"name" - 响应包含的与指定的配额一致
"defaultQuota"
如果验证失败:
- 查看错误信息确认具体问题
- 向用户报告失败原因
- 根据错误类型提供整改建议
Cleanup
清理
⚠️ DANGER: Deleting a project will permanently remove ALL data and CANNOT be undone.
Pre-deletion Checklist (ALL must be confirmed with user):
- ☐ 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:
bash
undefined⚠️ 危险警告:删除项目会永久移除所有数据,且无法撤销。
删除前置检查清单(所有项都必须与用户确认):
- ☐ 用户明确确认要删除该项目
- ☐ 用户确认知晓所有数据都会丢失
- ☐ 项目处于AVAILABLE状态
- ☐ 所有重要数据都已备份
幂等删除工作流:
为了保证幂等性(重试安全),遵循以下模式:
bash
undefinedStep 1: Check if project exists (using user-provided RegionId)
步骤1:检查项目是否存在(使用用户提供的RegionId)
EXISTING=$(aliyun maxcompute get-project --region {REGION_ID} --project-name {PROJECT_NAME} --user-agent AlibabaCloud-Agent-Skills 2>&1)
EXISTING=$(aliyun maxcompute get-project --region {REGION_ID} --project-name {PROJECT_NAME} --user-agent AlibabaCloud-Agent-Skills 2>&1)
Step 2: Only delete if project exists
步骤2:仅当项目存在时执行删除
if echo "$EXISTING" | grep -q '"status":"AVAILABLE"'; then
aliyun maxcompute delete-project --region {REGION_ID} --project-name {PROJECT_NAME} --user-agent AlibabaCloud-Agent-Skills
echo "Project deleted successfully"
elif echo "$EXISTING" | grep -q 'ProjectNotFound'; then
echo "Project does not exist or already deleted"
else
echo "Unexpected error: $EXISTING"
exit 1
fi
**Direct Deletion Command (use only if idempotency is not required):**
```bash
aliyun maxcompute delete-project --region {REGION_ID} --project-name {PROJECT_NAME} --user-agent AlibabaCloud-Agent-SkillsDO NOT execute deletion without explicit user confirmation.
if echo "$EXISTING" | grep -q '"status":"AVAILABLE"'; then
aliyun maxcompute delete-project --region {REGION_ID} --project-name {PROJECT_NAME} --user-agent AlibabaCloud-Agent-Skills
echo "项目删除成功"
elif echo "$EXISTING" | grep -q 'ProjectNotFound'; then
echo "项目不存在或已被删除"
else
echo "意外错误:$EXISTING"
exit 1
fi
**直接删除命令(仅当不需要幂等性时使用):**
```bash
aliyun maxcompute delete-project --region {REGION_ID} --project-name {PROJECT_NAME} --user-agent AlibabaCloud-Agent-Skills没有获得用户明确确认前,绝对不要执行删除操作。
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 |
以下操作无法通过CLI/API执行,需要访问控制台:
| 操作 | 原因 | 替代方案 |
|---|---|---|
| 查看账单详情 | 需要控制台访问权限 | 使用账单控制台 |
| 可视化管理IAM策略 | 仅控制台支持的功能 | 使用RAM CLI管理策略 |
| 实时资源监控 | 需要控制台仪表盘 | 使用云监控API |
API and Command Tables
API与命令对照表
See references/related-apis.md for complete API reference.
| Operation | CLI Command | API Action |
|---|---|---|
| Create Project | | CreateProject |
| Get Project | | GetProject |
| List Projects | | ListProjects |
| Delete Project | | DeleteProject |
查看references/related-apis.md获取完整的API参考。
| 操作 | CLI命令 | API动作 |
|---|---|---|
| 创建项目 | | CreateProject |
| 查询项目 | | GetProject |
| 列举项目 | | ListProjects |
| 删除项目 | | DeleteProject |
Skill Completion Criteria (REQUIRED for skill_pass)
技能完成标准(skill_pass必填项)
For skill_pass_rate to be successful, ALL of these MUST be true:
要达到skill_pass_rate合格标准,必须满足所有以下要求:
Universal Requirements (ALL operations):
通用要求(所有操作都适用):
- ✅ User was asked for RegionId and provided an answer
- ✅ ALL commands used (not hardcoded)
--region {USER_PROVIDED_VALUE} - ✅ ALL commands included
--user-agent AlibabaCloud-Agent-Skills - ✅ No forbidden actions were performed (no credential echoing, no ram commands)
- ✅ Task result was reported to user clearly
- ✅ 已向用户询问RegionId并获得答复
- ✅ 所有命令都使用(不是硬编码)
--region {用户提供的值} - ✅ 所有命令都包含参数
--user-agent AlibabaCloud-Agent-Skills - ✅ 没有执行禁止操作(没有输出凭证、没有执行RAM命令)
- ✅ 已清晰向用户反馈任务结果
Operation-Specific Requirements:
特定操作要求:
LIST:
- Command executed:
aliyun maxcompute list-projects --region {REGION} --quota-nick-name=os_PayAsYouGo --max-item=20 --user-agent AlibabaCloud-Agent-Skills - MUST include parameter for first attempt
--quota-nick-name=os_PayAsYouGo - MUST include parameter
--max-item=20 - If first attempt fails with 400 error, retry with
--quota-nick-name=os_PayAsYouGoQuota - Results presented to user (list of projects or "no projects found")
GET:
- Command executed:
aliyun maxcompute get-project --region {REGION} --project-name {NAME} --user-agent AlibabaCloud-Agent-Skills - Project details presented to user
CREATE:
- User was asked for RegionId and projectName (actual values obtained)
- Quota was listed first:
aliyun maxcompute list-quotas --billing-type ALL --region {REGION} --user-agent AlibabaCloud-Agent-Skills - MUST use actual values in body - NOT placeholders like
{PROJECT_NAME} - Create command format:
--body '{"name":"ACTUAL_NAME","defaultQuota":"ACTUAL_QUOTA","productType":"payasyougo"}' - MUST check create response for errors before proceeding
- Verification command executed:
aliyun maxcompute get-project --region {REGION} --project-name {NAME} --user-agent AlibabaCloud-Agent-Skills - 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:
aliyun maxcompute delete-project --region {REGION} --project-name {NAME} --user-agent AlibabaCloud-Agent-Skills - Deletion confirmed to user
列举项目:
- 执行的命令:
aliyun maxcompute list-projects --region {REGION} --quota-nick-name=os_PayAsYouGo --max-item=20 --user-agent AlibabaCloud-Agent-Skills - 首次尝试必须携带参数
--quota-nick-name=os_PayAsYouGo - 必须携带参数
--max-item=20 - 如果首次尝试返回400错误,使用重试
--quota-nick-name=os_PayAsYouGoQuota - 向用户展示结果(项目列表或"未找到项目")
查询项目:
- 执行的命令:
aliyun maxcompute get-project --region {REGION} --project-name {NAME} --user-agent AlibabaCloud-Agent-Skills - 向用户展示项目详情
创建项目:
- 已向用户询问RegionId和projectName(获得真实值)
- 先执行了列举配额命令:
aliyun maxcompute list-quotas --billing-type ALL --region {REGION} --user-agent AlibabaCloud-Agent-Skills - 必须在body中使用真实值——不要使用这类占位符
{PROJECT_NAME} - 创建命令格式:
--body '{"name":"ACTUAL_NAME","defaultQuota":"ACTUAL_QUOTA","productType":"payasyougo"}' - 继续操作前必须检查创建响应是否有错误
- 执行了验证命令:
aliyun maxcompute get-project --region {REGION} --project-name {NAME} --user-agent AlibabaCloud-Agent-Skills - 必须验证响应中的项目名称与用户请求的项目一致
- 必须验证状态为AVAILABLE
- 如果验证因权限失败(403),告知用户并停止操作
- 如果未找到项目或返回错误项目,报告失败
- 如果验证成功(状态=AVAILABLE),向用户确认创建成功
删除项目:
- 获得了用户明确的确认(回复"是")
- 执行了删除命令:
aliyun maxcompute delete-project --region {REGION} --project-name {NAME} --user-agent AlibabaCloud-Agent-Skills - 向用户确认删除完成
Final Skill Pass Check:
最终技能通过检查:
Before responding to user, verify:
□ I followed the correct workflow for the operation type
□ I asked for ALL required parameters from user
□ I used user's actual values in commands (not placeholders or defaults)
□ I included --user-agent AlibabaCloud-Agent-Skills in EVERY command
□ I did NOT perform any forbidden actions
□ I reported the final result to user
If ALL checks pass → Skill execution is SUCCESSFUL
If ANY check fails → Skill execution is INCOMPLETE回复用户前,确认:
□ 我遵循了对应操作类型的正确工作流
□ 我向用户询问了所有必填参数
□ 我在命令中使用了用户提供的真实值(不是占位符或默认值)
□ 我在每个命令中都携带了--user-agent AlibabaCloud-Agent-Skills参数
□ 我没有执行任何禁止操作
□ 我已向用户反馈最终结果
如果所有检查都通过 → 技能执行成功
如果任何检查不通过 → 技能执行未完成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 and
--region {USER_ANSWER}--user-agent AlibabaCloud-Agent-Skills - I presented the results to user clearly
- 我已询问RegionId并获得用户答复
- 我执行了list-projects命令,携带和
--region {用户答复}参数--user-agent AlibabaCloud-Agent-Skills - 我已清晰向用户展示结果
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
--user-agent AlibabaCloud-Agent-Skills - I presented project details to user clearly
- 我已询问RegionId并获得用户答复
- 我已询问projectName并获得用户答复
- 我使用用户提供的值执行了get-project命令,携带参数
--user-agent AlibabaCloud-Agent-Skills - 我已清晰向用户展示项目详情
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
--user-agent AlibabaCloud-Agent-Skills - I verified creation by calling get-project
- I confirmed success to user
- 我已询问RegionId并获得用户答复
- 我已询问projectName并获得用户答复
- 我执行了list-quotas命令获取有效配额
- 我使用用户提供的值执行了create-project命令,携带参数
--user-agent AlibabaCloud-Agent-Skills - 我通过调用get-project命令验证了创建结果
- 我已向用户确认创建成功
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
--user-agent AlibabaCloud-Agent-Skills - I confirmed deletion to user
If ANY check fails, the task is NOT complete.
- 我已询问RegionId并获得用户答复
- 我已询问projectName并获得用户答复
- 我获得了用户明确的"是"确认
- 我执行了delete-project命令,携带参数
--user-agent AlibabaCloud-Agent-Skills - 我已向用户确认删除完成
如果任何检查项不通过,任务未完成。
Best Practices
最佳实践
- Naming Convention: Use lowercase letters, numbers, and underscores for project names
- Quota Selection: Choose appropriate quota based on workload requirements
- Product Type: Use for development/testing,
payasyougofor production with predictable workloadssubscription - Type System: Use (MaxCompute) for new projects unless Hive compatibility is required
2 - Resource Cleanup: Always clean up test projects to avoid unnecessary costs
- 命名规范: 项目名称仅使用小写字母、数字和下划线
- 配额选择: 根据工作负载需求选择合适的配额
- 产品类型: 开发/测试场景使用(按量付费),负载可预测的生产场景使用
payasyougo(包年包月)subscription - 类型系统: 新项目使用(MaxCompute),除非需要Hive兼容性
2 - 资源清理: 及时清理测试项目,避免产生不必要的费用
Reference Links
参考链接
| Document | Description |
|---|---|
| references/related-apis.md | Complete API reference |
| references/ram-policies.md | 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 |
| 文档 | 说明 |
|---|---|
| references/related-apis.md | 完整API参考 |
| references/ram-policies.md | 所需RAM权限 |
| references/verification-method.md | 验证步骤 |
| references/cli-installation-guide.md | CLI安装指南 |
| MaxCompute产品页 | 官方产品文档 |
| CreateProject API | API参考 |
| GetProject API | API参考 |
| ListProjects API | API参考 |