alibabacloud-odps-project-manage

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

MaxCompute 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:
  1. Identify intent: create / list / get / delete
  2. Get RegionId: Ask user which region (e.g., cn-hangzhou, cn-shanghai)
  3. Execute: Run the appropriate command with
    --region {REGION_ID}
    and
    --user-agent AlibabaCloud-Agent-Skills
  4. Verify: Confirm the result and report to user
当用户询问MaxCompute项目相关问题时,遵循以下步骤操作:
  1. 识别意图:创建/列举/查询/删除
  2. 获取RegionId:询问用户所属地域(例如cn-hangzhou、cn-shanghai)
  3. 执行操作:运行对应命令,携带
    --region {REGION_ID}
    --user-agent AlibabaCloud-Agent-Skills
    参数
  4. 结果验证:确认执行结果并反馈给用户

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:

列举项目操作:

  1. Ask user: "Which region would you like to query? (e.g., cn-hangzhou, cn-shanghai)"
  2. Ask user: "Which quota nickname to filter by? (e.g., os_PayAsYouGoQuota, or press Enter for default)"
  3. 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:
    bash
    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
  6. 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
  8. 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
    --max-item=20
  • ✅ Let API do server-side filtering
  1. 询问用户:"您需要查询哪个地域的项目?(例如cn-hangzhou、cn-shanghai)"
  2. 询问用户:"需要按哪个配额别名过滤?(例如os_PayAsYouGoQuota,按回车键使用默认值)"
  3. 必须使用quota-nick-name参数:
    • 如果用户指定了配额:使用
      --quota-nick-name={用户指定的配额}
    • 如果用户未指定:使用
      --quota-nick-name=os_PayAsYouGo
  4. 携带必填参数执行命令:
    bash
    aliyun maxcompute list-projects --region {REGION_ID} --quota-nick-name={QUOTA_NICKNAME} --max-item=20 --user-agent AlibabaCloud-Agent-Skills
  5. 等待命令执行返回结果
  6. 如果返回400错误(配额不存在):
    • 执行
      aliyun maxcompute list-quotas --billing-type ALL --region {REGION_ID} --user-agent AlibabaCloud-Agent-Skills
    • 向用户展示可用配额供选择
    • 使用用户选择的配额重新执行列举项目命令
  7. 解析响应并向用户展示结果
  8. 确认任务完成
禁止操作:
  • ❌ 使用
    --marker
    进行分页
  • ❌ 拉取所有项目后用Python/jq在本地过滤
  • ❌ 不携带
    --quota-nick-name
    参数调用API
必须要求:
  • ✅ 始终携带
    --quota-nick-name
    参数,值为用户指定的配额或默认配额
  • ✅ 始终携带
    --max-item=20
    参数
  • ✅ 让API完成服务端过滤

For GET Project:

查询项目操作:

  1. Ask user: "Which region? (e.g., cn-hangzhou)"
  2. Ask user: "What is the project name?"
  3. Execute:
    aliyun maxcompute get-project --region {REGION_ID} --project-name {PROJECT_NAME} --user-agent AlibabaCloud-Agent-Skills
  4. Wait for command output
  5. Parse the JSON response - look for
    data.name
    ,
    data.status
    ,
    data.owner
  6. Present project details to user in a clear format
  7. Confirm task completion to user
  1. 询问用户:"项目所属哪个地域?(例如cn-hangzhou)"
  2. 询问用户:"项目名称是什么?"
  3. 执行命令:
    aliyun maxcompute get-project --region {REGION_ID} --project-name {PROJECT_NAME} --user-agent AlibabaCloud-Agent-Skills
  4. 等待命令执行返回结果
  5. 解析JSON响应,提取
    data.name
    data.status
    data.owner
    字段
  6. 以清晰的格式向用户展示项目详情
  7. 向用户确认任务完成

For CREATE Project:

创建项目操作:

  1. Ask user: "Which region to create in? (e.g., cn-hangzhou)"
  2. Ask user: "What is the project name?"
  3. 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."
  4. CRITICAL: Store the user's exact project name - do NOT use placeholder text
  5. MUST call ListQuotas: Execute:
    aliyun maxcompute list-quotas --billing-type ALL --region {REGION_ID} --user-agent AlibabaCloud-Agent-Skills
  6. Wait for command output
  7. Parse ListQuotas response: Find a quota with
    nickName
    and its secondary quotas (look in
    data.quotas[].subQuotas
    or similar)
  8. STRICT VALIDATION: Select a secondary quota's nickName from the ListQuotas response (NOT the primary quota)
  9. TRIM WHITESPACE: Remove any leading/trailing spaces from the quota nickName. If nickName contains internal spaces, trim them or select a different quota
  10. PRE-FLIGHT CHECK: Verify you have actual values for REGION_ID, PROJECT_NAME, and SECONDARY_QUOTA_NICKNAME (trimmed, no spaces)
  11. Ask for typeSystem (optional): "Which typeSystem? (1=MaxCompute, 2=MaxCompute2, hive=Hive compatible; default: 2)"
  12. Validate typeSystem: Must be "1", "2", or "hive". If not specified or invalid, use default "2"
  13. Execute create command with ACTUAL 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-Skills
    Example with real values:
    bash
    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
  15. CHECK CREATE RESPONSE: If create command returned error (non-2xx), STOP and report error to user. Do NOT proceed to verification.
  16. ONLY IF create succeeded: Verify by executing:
    aliyun maxcompute get-project --region {REGION_ID} --project-name {PROJECT_NAME} --user-agent AlibabaCloud-Agent-Skills
  17. CRITICAL: Verify the response contains the CORRECT project name (the one user requested, not a different project)
  18. CHECK STATUS: Verify response contains
    "status":"AVAILABLE"
  19. If verification returns 403/Access Denied: Inform user about permission requirements and stop
  20. If project not found: Report "Project creation failed - project not found after creation"
  21. If wrong project returned: Report error - do not use a different project as substitute
  22. ONLY IF all checks pass: Confirm to user: "Project {PROJECT_NAME} created successfully with status AVAILABLE"
  1. 询问用户:"需要在哪个地域创建项目?(例如cn-hangzhou)"
  2. 询问用户:"项目名称是什么?"
  3. 必填校验: 如果项目名称为空或全是空格,停止操作并再次询问用户:"项目名称不能为空,请提供有效的项目名称。"
  4. 重要提示: 存储用户提供的准确项目名称,不要使用占位符文本
  5. 必须调用列举配额接口: 执行命令:
    aliyun maxcompute list-quotas --billing-type ALL --region {REGION_ID} --user-agent AlibabaCloud-Agent-Skills
  6. 等待命令执行返回结果
  7. 解析列举配额响应: 查找带有
    nickName
    的配额及其二级配额(查看
    data.quotas[].subQuotas
    或类似字段)
  8. 严格校验: 从列举配额响应中选择二级配额的nickName(不能是主配额)
  9. 去除空格: 移除配额别名前后的空格,如果别名中间包含空格,去除空格或选择其他配额
  10. 前置检查: 确认你已获取REGION_ID、PROJECT_NAME和SECONDARY_QUOTA_NICKNAME的真实值(已去空格,无空白字符)
  11. 询问typeSystem(可选): "需要使用哪种类型系统?(1=MaxCompute、2=MaxCompute2、hive=Hive兼容;默认值:2)"
  12. 校验typeSystem: 必须是"1"、"2"或"hive",如果未指定或值无效,使用默认值"2"
  13. 使用真实值执行创建命令:
    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-Skills
    真实值示例:
    bash
    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. 等待命令执行返回结果
  15. 检查创建响应: 如果创建命令返回错误(非2xx状态码),停止操作并向用户报告错误,不要继续执行验证步骤
  16. 仅当创建成功时执行: 执行以下命令验证创建结果:
    aliyun maxcompute get-project --region {REGION_ID} --project-name {PROJECT_NAME} --user-agent AlibabaCloud-Agent-Skills
  17. 重要提示: 验证响应中包含正确的项目名称(用户请求的名称,不是其他项目)
  18. 检查状态: 验证响应中包含
    "status":"AVAILABLE"
  19. 如果验证返回403/访问被拒绝: 告知用户所需的权限要求并停止操作
  20. 如果未找到项目: 报告"项目创建失败 - 创建后未找到对应项目"
  21. 如果返回了错误的项目: 报告错误,不要使用其他项目替代
  22. 仅当所有检查都通过时: 向用户确认:"项目{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

常见错误与解决方案

ErrorCauseSolution
ProjectNotFound
Project doesn't existCheck project name spelling and region
ProjectAlreadyExist
Name takenAsk user for a different project name
get project default quota error
No valid quotaRun list-quotas first, ensure quota exists
InvalidProjectName
Bad naming formatUse only lowercase, numbers, underscores (3-28 chars)
NoPermission
or
403 Access Denied
RAM permission issueInform user: "You need odps:ListQuotas, odps:CreateProject and odps:GetProject permissions. Please contact your administrator."
RegionId required
Missing --regionAlways add
--region {REGION_ID}
to commands
ODPS-0420095: Access Denied
Missing read privilegeInform user about required permissions and stop
错误原因解决方案
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
缺少读取权限告知用户所需权限并停止操作

Forbidden Actions

禁止行为

CRITICAL: Never do these:
  1. NEVER read/echo AK/SK values (e.g.,
    echo $ALIBABA_CLOUD_ACCESS_KEY_ID
    )
  2. NEVER use hardcoded values — always ask user for parameters, then use their ACTUAL answer (not placeholder text)
  3. NEVER use
    aliyun configure set
    with literal credential values
  4. NEVER run
    aliyun ram
    commands
  5. NEVER execute ANY command without
    --user-agent AlibabaCloud-Agent-Skills
  6. NEVER skip asking for RegionId — this is ALWAYS required
  7. NEVER assume a default region — always ask the user
  8. NEVER use deprecated API format
    CreateProject
    — ALWAYS use plugin format
    create-project
    (lowercase with hyphen)
  9. NEVER execute
    aliyun maxcompute delete-project
    — project deletion is NOT supported by this skill
重要提示:绝对不要执行以下操作:
  1. 绝对不要读取/输出AK/SK值(例如
    echo $ALIBABA_CLOUD_ACCESS_KEY_ID
  2. 绝对不要使用硬编码值——始终向用户询问参数,然后使用用户提供的真实值(不是占位符文本)
  3. 绝对不要使用字面凭证值执行
    aliyun configure set
    命令
  4. 绝对不要运行
    aliyun ram
    相关命令
  5. 绝对不要执行任何不携带
    --user-agent AlibabaCloud-Agent-Skills
    参数的命令
  6. 绝对不要跳过询问RegionId的步骤——这是必填项
  7. 绝对不要假设默认地域——始终询问用户
  8. 绝对不要使用已废弃的API格式
    CreateProject
    ——始终使用插件格式
    create-project
    (小写加连字符)
  9. 绝对不要执行
    aliyun maxcompute delete-project
    命令——本技能不支持项目删除操作

Negative Examples

反面示例

❌ WRONG✅ CORRECT
aliyun maxcompute CreateProject
(deprecated)
aliyun maxcompute create-project
(lowercase)
'{"name":"{PROJECT_NAME}"}'
(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 failureReport failure, don't substitute
❌ 错误✅ 正确
aliyun maxcompute CreateProject
(已废弃)
aliyun maxcompute create-project
(小写格式)
'{"name":"{PROJECT_NAME}"}'
(占位符)
'{"name":"actual-name"}'
(真实值)
--region cn-hangzhou
(硬编码)
先询问用户,再使用用户提供的答案
缺少
--user-agent
参数
必须携带
--user-agent AlibabaCloud-Agent-Skills
参数
echo $ALIBABA_CLOUD_ACCESS_KEY_ID
绝对不要读取/展示凭证信息
aliyun ram ...
命令
RAM命令不在本技能支持范围内
aliyun maxcompute delete-project
不支持项目删除操作
创建失败时验证其他项目报告失败,不要替换项目

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 (
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:
    aliyun maxcompute CreateQuota --chargeType payasyougo --commodityCode odps --region <region> --user-agent AlibabaCloud-Agent-Skills
  • Subscription: See
    alibabacloud-odps-quota-manage
    skill for full parameters (partNickName, CU, ord_time, etc.)
  • List existing quotas:
    aliyun maxcompute list-quotas --billing-type ALL --region <region> --user-agent AlibabaCloud-Agent-Skills
After creating or confirming a quota exists, use its
nickName
as the
defaultQuota
parameter when creating a project.
前提条件:创建项目前配额必须已存在。
每个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
  • 包年包月: 查看
    alibabacloud-odps-quota-manage
    技能获取完整参数(partNickName、CU、ord_time等)
  • 列举现有配额:
    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 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.
bash
undefined
前置检查:需要Aliyun CLI >= 3.3.1版本 运行
aliyun version
确认版本>=3.3.1,如果未安装或版本过低,查看references/cli-installation-guide.md获取安装指南。然后**[必须]**运行
aliyun configure set --auto-plugin-install true
开启自动安装插件功能。
bash
undefined

Install 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
undefined
aliyun configure set --auto-plugin-install true
undefined

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):

允许的凭证检查命令(仅此命令可用):

bash
aliyun configure list
What to look for:
  • Output shows at least one profile with
    mode: AK
    or
    mode: StsToken
  • 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:
  • 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: AK
    mode: 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:
ParameterRequiredDescription
RegionId
YesRegion ID (cn-hangzhou, cn-shanghai, etc.)
projectName
YesProject name
quotaNickName
For createQuota alias (get from list-quotas)
始终向用户询问以下参数值——绝对不要假设默认值:
参数是否必填说明
RegionId
地域ID(cn-hangzhou、cn-shanghai等)
projectName
项目名称
quotaNickName
创建时必填配额别名(从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
undefined
bash
undefined

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.
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-Skills
bash
aliyun maxcompute get-project --region {REGION_ID} --project-name {PROJECT_NAME} --user-agent AlibabaCloud-Agent-Skills

Create Project

创建项目

  1. List quotas first:
bash
aliyun maxcompute list-quotas --billing-type ALL --region {REGION_ID} --user-agent AlibabaCloud-Agent-Skills
  1. 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
  1. 先列举配额:
bash
aliyun maxcompute list-quotas --billing-type ALL --region {REGION_ID} --user-agent AlibabaCloud-Agent-Skills
  1. 使用响应中的配额别名创建项目:
bash
aliyun maxcompute create-project --region {REGION_ID} --body '{"name":"{PROJECT_NAME}","defaultQuota":"{QUOTA_NICKNAME}","productType":"payasyougo"}' --user-agent AlibabaCloud-Agent-Skills

Delete Project

删除项目

bash
aliyun maxcompute delete-project --region {REGION_ID} --project-name {PROJECT_NAME} --user-agent AlibabaCloud-Agent-Skills
bash
aliyun maxcompute delete-project --region {REGION_ID} --project-name {PROJECT_NAME} --user-agent AlibabaCloud-Agent-Skills

Success 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-Skills
Success Criteria:
  • Response contains
    "status":"AVAILABLE"
  • 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
  2. Report failure reason to user
  3. 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"
    与指定的配额一致
如果验证失败:
  1. 查看错误信息确认具体问题
  2. 向用户报告失败原因
  3. 根据错误类型提供整改建议

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
  2. ☐ User confirms they understand all data will be lost
  3. ☐ Project is in AVAILABLE status
  4. ☐ All important data has been backed up
Idempotent Deletion Workflow:
To ensure idempotency (safe for retries), follow this pattern:
bash
undefined
⚠️ 危险警告:删除项目会永久移除所有数据,且无法撤销。
删除前置检查清单(所有项都必须与用户确认):
  1. ☐ 用户明确确认要删除该项目
  2. ☐ 用户确认知晓所有数据都会丢失
  3. ☐ 项目处于AVAILABLE状态
  4. ☐ 所有重要数据都已备份
幂等删除工作流:
为了保证幂等性(重试安全),遵循以下模式:
bash
undefined

Step 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-Skills
DO 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:
OperationReasonAlternative
View billing detailsRequires Console accessUse Billing Console
Manage IAM policies visuallyConsole-only featureUse RAM CLI for policy management
Real-time resource monitoringRequires Console dashboardUse CloudMonitor APIs
以下操作无法通过CLI/API执行,需要访问控制台:
操作原因替代方案
查看账单详情需要控制台访问权限使用账单控制台
可视化管理IAM策略仅控制台支持的功能使用RAM CLI管理策略
实时资源监控需要控制台仪表盘使用云监控API

API and Command Tables

API与命令对照表

See references/related-apis.md for complete API reference.
OperationCLI CommandAPI Action
Create Project
aliyun maxcompute create-project
CreateProject
Get Project
aliyun maxcompute get-project
GetProject
List Projects
aliyun maxcompute list-projects
ListProjects
Delete Project
aliyun maxcompute delete-project
DeleteProject
查看references/related-apis.md获取完整的API参考。
操作CLI命令API动作
创建项目
aliyun maxcompute create-project
CreateProject
查询项目
aliyun maxcompute get-project
GetProject
列举项目
aliyun maxcompute list-projects
ListProjects
删除项目
aliyun maxcompute delete-project
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):

通用要求(所有操作都适用):

  1. ✅ User was asked for RegionId and provided an answer
  2. ✅ ALL commands used
    --region {USER_PROVIDED_VALUE}
    (not hardcoded)
  3. ✅ ALL commands included
    --user-agent AlibabaCloud-Agent-Skills
  4. ✅ No forbidden actions were performed (no credential echoing, no ram commands)
  5. ✅ Task result was reported to user clearly
  1. ✅ 已向用户询问RegionId并获得答复
  2. ✅ 所有命令都使用
    --region {用户提供的值}
    (不是硬编码)
  3. ✅ 所有命令都包含
    --user-agent AlibabaCloud-Agent-Skills
    参数
  4. ✅ 没有执行禁止操作(没有输出凭证、没有执行RAM命令)
  5. ✅ 已清晰向用户反馈任务结果

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
    --quota-nick-name=os_PayAsYouGo
    parameter for first attempt
  • MUST include
    --max-item=20
    parameter
  • 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
    --region {USER_ANSWER}
    and
    --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

最佳实践

  1. Naming Convention: Use lowercase letters, numbers, and underscores for project names
  2. Quota Selection: Choose appropriate quota based on workload requirements
  3. Product Type: Use
    payasyougo
    for development/testing,
    subscription
    for production with predictable workloads
  4. Type System: Use
    2
    (MaxCompute) for new projects unless Hive compatibility is required
  5. Resource Cleanup: Always clean up test projects to avoid unnecessary costs
  1. 命名规范: 项目名称仅使用小写字母、数字和下划线
  2. 配额选择: 根据工作负载需求选择合适的配额
  3. 产品类型: 开发/测试场景使用
    payasyougo
    (按量付费),负载可预测的生产场景使用
    subscription
    (包年包月)
  4. 类型系统: 新项目使用
    2
    (MaxCompute),除非需要Hive兼容性
  5. 资源清理: 及时清理测试项目,避免产生不必要的费用

Reference Links

参考链接

DocumentDescription
references/related-apis.mdComplete API reference
references/ram-policies.mdRequired RAM permissions
references/verification-method.mdVerification steps
references/cli-installation-guide.mdCLI installation guide
MaxCompute Product PageOfficial product documentation
CreateProject APIAPI reference
GetProject APIAPI reference
ListProjects APIAPI reference
文档说明
references/related-apis.md完整API参考
references/ram-policies.md所需RAM权限
references/verification-method.md验证步骤
references/cli-installation-guide.mdCLI安装指南
MaxCompute产品页官方产品文档
CreateProject APIAPI参考
GetProject APIAPI参考
ListProjects APIAPI参考