alibabacloud-pai-dsw-manage
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePAI DSW Instance Management
PAI DSW实例管理
Manage the full lifecycle of Alibaba Cloud PAI DSW (Data Science Workshop) instances — from provisioning through configuration changes, status monitoring, and start/stop operations. Also supports querying available ECS compute specs.
Architecture:
PAI Workspace + DSW Instance + ECS Spec + Image + VPC + DatasetAPI Version:
pai-dsw/2022-01-01管理阿里云PAI DSW(Data Science Workshop)实例的全生命周期——从资源部署到配置变更、状态监控、启停操作,同时支持查询可用的ECS计算规格。
架构:
PAI Workspace + DSW Instance + ECS Spec + Image + VPC + DatasetAPI版本:
pai-dsw/2022-01-01Installation
安装
Pre-check: Aliyun CLI >= 3.3.1 requiredRunto verify the version is 3.3.1 or higher. If not installed or the version is too low, seealiyun versionfor installation instructions.references/cli-installation-guide.md[MUST] Then runto enable automatic plugin installation.aliyun configure set --auto-plugin-install true
bash
undefined预检查:要求Aliyun CLI版本 >= 3.3.1运行确认版本为3.3.1或更高。如果未安装或版本过低,参考aliyun version的安装指引操作。references/cli-installation-guide.md[必填操作] 随后运行开启自动插件安装功能。aliyun configure set --auto-plugin-install true
bash
undefinedmacOS (recommended)
macOS(推荐方式)
brew install aliyun-cli
brew install aliyun-cli
Verify version
校验版本
aliyun version
aliyun version
Enable automatic plugin installation
开启自动插件安装
aliyun configure set --auto-plugin-install true
aliyun configure set --auto-plugin-install true
Install pai-dsw plugin
安装pai-dsw插件
aliyun plugin install --names pai-dsw
---aliyun plugin install --names pai-dsw
---Authentication
身份认证
Pre-check: Alibaba Cloud Credentials RequiredSecurity Rules:
- NEVER read, echo, or print AK/SK values (e.g.,
is FORBIDDEN)echo $ALIBABA_CLOUD_ACCESS_KEY_ID- NEVER ask the user to input AK/SK directly in the conversation or command line
- NEVER use
with literal credential valuesaliyun configure set- ONLY use
to check credential statusaliyun configure listbashaliyun configure listCheck the output for a valid profile (AK, STS, or OAuth identity).If no valid profile exists, STOP here.
- Obtain credentials from Alibaba Cloud Console
- Configure credentials outside of this session (via
in a terminal or environment variables in a shell profile)aliyun configure- Return and retry after
shows a valid profilealiyun configure list
预检查:需要阿里云凭证安全规则:
- 绝对不要读取、回显或打印AK/SK值(例如禁止执行
)echo $ALIBABA_CLOUD_ACCESS_KEY_ID- 绝对不要要求用户在对话或命令行中直接输入AK/SK
- 绝对不要搭配明文凭证值使用
命令aliyun configure set- 仅可使用
检查凭证状态aliyun configure listbashundefined
aliyun configure list
> 检查输出中是否存在有效配置文件(AK、STS或OAuth身份)。
>
> **如果没有有效配置文件,请停止操作:**
> 1. 从[阿里云控制台](https://ram.console.aliyun.com/manage/ak)获取凭证
> 2. **在当前会话之外**配置凭证(通过终端执行`aliyun configure`或在Shell配置文件中设置环境变量)
> 3. 待`aliyun configure list`显示有效配置文件后,返回重试即可
---RAM Permissions
RAM权限
See for the complete permission list and minimum-privilege policy.
references/ram-policies.md[MUST] Permission Failure Handling: When any command or API call fails due to permission errors at any point during execution, follow this process:
- Read
to get the full list of permissions required by this skillreferences/ram-policies.md- Use the
skill to guide the user through requesting the necessary permissionsram-permission-diagnose- Pause and wait until the user confirms that the required permissions have been granted
参考获取完整权限列表和最小权限策略。
references/ram-policies.md[必填操作]权限错误处理: 执行过程中任意命令或API调用因权限错误失败时,按照以下流程处理:
- 查看
获取本技能所需的完整权限列表references/ram-policies.md- 使用
技能引导用户申请所需权限ram-permission-diagnose- 暂停操作,等待用户确认已授予所需权限后再继续
Parameter Confirmation
参数确认
IMPORTANT: Parameter Confirmation — Before executing any command or API call, ALL user-customizable parameters (e.g., RegionId, instance names, CIDR blocks, passwords, domain names, resource specifications, etc.) MUST be confirmed with the user. Do NOT assume or use default values without explicit user approval.
| Parameter | Required | Description | Default |
|---|---|---|---|
| Required | PAI workspace ID | None — user must provide |
| Required | Instance name (letters, digits, underscores only; max 27 chars) | None — user must provide |
| Required (post-paid) | ECS compute spec, e.g., | None |
| Mutually exclusive with | Image ID from PAI console | None |
| Mutually exclusive with | Container image URL. See | None |
| Required | Region, e.g., | None — user must confirm |
| Optional | Visibility scope: | |
| Required (update/get/start/stop) | Instance ID ( | None |
| Optional | VPC ID for private network access | None |
| Optional | VSwitch ID within the VPC | None |
| Optional | Security group ID | None |
| Required (spec query) | Accelerator type: | None — user must confirm |
| Optional | Dataset mounts in CLI list format: `DatasetId=<> MountPath=<> MountAccess=RO | RW` |
| Optional | CLI read timeout in seconds (for long-running operations) | |
| Optional | CLI connection timeout in seconds | |
How to get WorkspaceId: If the user doesn't know their workspace ID, run:bashaliyun aiworkspace list-workspaces --region <region> --user-agent AlibabaCloud-Agent-SkillsThis returns all workspaces the user has access to. Select the appropriate one based onor ask the user to confirm.WorkspaceNameReference: Create and Manage Workspaces
重要提示:参数确认 — 执行任意命令或API调用前,所有用户可自定义参数(例如RegionId、实例名称、CIDR块、密码、域名、资源规格等)必须与用户确认。未经用户明确许可,不得假设或使用默认值。
| 参数 | 必填 | 说明 | 默认值 |
|---|---|---|---|
| 是 | PAI工作空间ID | 无,用户必须提供 |
| 是 | 实例名称(仅支持字母、数字、下划线,最长27个字符) | 无,用户必须提供 |
| 是(按量付费场景) | ECS计算规格,例如 | 无 |
| 与 | PAI控制台提供的镜像ID | 无 |
| 与 | 容器镜像URL,常用官方镜像参考 | 无 |
| 是 | 地域,例如 | 无,用户必须确认 |
| 可选 | 可见范围: | |
| 是(更新/查询/启动/停止场景) | 实例ID(格式为 | 无 |
| 可选 | 私网访问使用的VPC ID | 无 |
| 可选 | VPC内的交换机ID | 无 |
| 可选 | 安全组ID | 无 |
| 是(规格查询场景) | 加速器类型: | 无,用户必须确认 |
| 可选 | 数据集挂载,CLI列表格式:`DatasetId=<> MountPath=<> MountAccess=RO | RW` |
| 可选 | CLI读超时时间,单位为秒(适用于长时间运行的操作) | |
| 可选 | CLI连接超时时间,单位为秒 | |
如何获取WorkspaceId:如果用户不知道自己的工作空间ID,运行:bashundefined
aliyun aiworkspace list-workspaces --region <region> --user-agent AlibabaCloud-Agent-Skills
该命令会返回用户有权限访问的所有工作空间,可根据`WorkspaceName`选择对应项或请用户确认。 参考:[创建和管理工作空间](https://help.aliyun.com/zh/pai/user-guide/create-and-manage-workspaces)
Core Workflow
核心流程
Full command syntax and parameter details:.references/related-commands.mdEveryCLI command must includealiyun.--user-agent AlibabaCloud-Agent-Skills
完整命令语法和参数详情参考:。references/related-commands.md所有CLI命令必须添加aliyun参数。--user-agent AlibabaCloud-Agent-Skills
1. Query Available ECS Specs
1. 查询可用ECS规格
Run to list available compute specs.
aliyun pai-dsw list-ecs-specs --accelerator-type <CPU|GPU> --region <region>[MUST] Region confirmation: Theparameter is required. Spec availability varies by region — always confirm the region with the user before querying.--region
[MUST] Determine accelerator type correctly:
- User mentions a spec name (e.g.,
): Query BOTH CPU and GPU types, then matchecs.hfc6.10xlargein results. Use the returnedInstanceTypefield to confirm the classification.AcceleratorType- User specifies image type: GPU image URL (contains
or-gpu-) → query GPU specs; CPU image URL → query CPU specs.cu- User describes use case only: GPU for 大模型训练/深度学习, CPU for 数据分析/轻量任务. Always confirm with user if ambiguous.
- [IMPORTANT] Do NOT guess from spec name prefix — the naming convention is unreliable. Always verify via API response.
[MUST] Choose accelerator type based on user requirements:
- Default recommendation: GPU for 大模型训练/深度学习, CPU for 数据分析/轻量任务
- Match image type (strong indicator): If user specifies a GPU image URL (contains
or-gpu-), query GPU specs. If CPU image, query CPU specs.cu- Spec name requires verification: If user mentions a spec name, query both types and find the match in results
- Always confirm with user before querying if the use case is ambiguous and no spec name is provided
Key response fields:
- : Spec name (e.g.,
InstanceType)ecs.hfc6.10xlarge - :
AcceleratorTypeorCPU— the actual classification from APIGPU - : PRIMARY indicator —
IsAvailablemeans the spec is available for pay-as-you-go/subscriptiontrue - : SECONDARY indicator — only for spot instances:
SpotStockStatus(available) orWithStock(unavailable)NoStock - /
CPU/Memory/GPU: Hardware detailsGPUType - : Hourly price in CNY
Price
[MUST] Availability check logic:
- For pay-as-you-go/subscription: Check
IsAvailable == true- For spot instances: Check
ANDIsAvailable == trueSpotStockStatus == "WithStock"- DO NOT use
alone to judge availability — many specs haveSpotStockStatusbutIsAvailable: trueSpotStockStatus: "NoStock"- Example:
withecs.hfc6.10xlarge→ Available for pay-as-you-goIsAvailable: true, SpotStockStatus: "NoStock"
运行罗列可用计算规格。
aliyun pai-dsw list-ecs-specs --accelerator-type <CPU|GPU> --region <region>[必填操作]地域确认:参数为必填项,不同地域的可用规格不同,查询前必须与用户确认地域。--region
[必填操作]正确判断加速器类型:
- 用户指定了规格名称(例如
):同时查询CPU和GPU类型,然后匹配结果中的ecs.hfc6.10xlarge,使用返回的InstanceType字段确认分类。AcceleratorType- 用户指定了镜像类型:GPU镜像URL(包含
或-gpu-)→ 查询GPU规格;CPU镜像URL → 查询CPU规格。cu- 用户仅描述了使用场景:大模型训练/深度学习用GPU,数据分析/轻量任务用CPU。如果场景不明确,必须与用户确认。
- [重要提示]不要通过规格名称前缀猜测:命名规则不可靠,必须通过API返回结果验证。
[必填操作]根据用户需求选择加速器类型:
- 默认推荐:大模型训练/深度学习用GPU,数据分析/轻量任务用CPU
- 匹配镜像类型(强判定指标):如果用户指定的GPU镜像URL包含
或-gpu-,查询GPU规格;如果是CPU镜像,查询CPU规格。cu- 规格名称需要验证:如果用户提到了规格名称,同时查询两种类型并在结果中查找匹配项
- 如果使用场景不明确且未提供规格名称,查询前必须与用户确认
关键返回字段:
- :规格名称(例如
InstanceType)ecs.hfc6.10xlarge - :
AcceleratorType或CPU— API返回的实际分类GPU - :核心判定指标 —
IsAvailable表示该规格支持按量付费/包年包月true - :次要判定指标 — 仅适用于抢占式实例:
SpotStockStatus(有库存)或WithStock(无库存)NoStock - /
CPU/Memory/GPU:硬件详情GPUType - :每小时价格,单位为人民币
Price
[必填操作]可用性校验逻辑:
- 按量付费/包年包月场景:检查
IsAvailable == true- 抢占式实例场景:检查
且IsAvailable == trueSpotStockStatus == "WithStock"- 不要仅通过
判断可用性 — 很多规格SpotStockStatus但IsAvailable: trueSpotStockStatus: "NoStock"- 示例:
的ecs.hfc6.10xlarge→ 支持按量付费IsAvailable: true, SpotStockStatus: "NoStock"
2. Create Instance (check-then-act)
2. 创建实例(先检查再操作)
[MUST] Idempotency guarantee: The CreateInstance API does not support ClientToken, so idempotency is ensured via a check-then-act pattern. Before creating, you must callto check if the name already exists.list-instances --instance-name <name>
Step 2.1 — Check existence
bash
aliyun pai-dsw list-instances \
--instance-name <name> \
--region <region> \
--resource-id ALL \
--user-agent AlibabaCloud-Agent-SkillsDecision logic:
- → Name is available, proceed to Step 2.2 to create
TotalCount == 0 - → [MUST] Verify exact name match:
TotalCount >= 1- Iterate through the returned array
Instances - For each instance, compare its field with the target name character by character (case-sensitive, exact string match)
InstanceName - Exact match found () → Name already exists:
instance.InstanceName === targetName- Extract the from the matching instance
InstanceId - Call to get full details
get-instance --instance-id <id> - Compare key parameters (,
EcsSpec,ImageUrl, etc.)Accessibility - Match → Return the existing , do not recreate
InstanceId - Mismatch → Ask user to choose a different name
- Extract the
- No exact match found (no instance has ) → Name is available, proceed to Step 2.2 to create
InstanceName === targetName
- Iterate through the returned
[WARNING] Critical: Exact name match requiredThefilter may return partial matches. For example:--instance-name
- Query:
--instance-name llm_train_001- Response may include:
,llm_train_001,llm_train_001_v2llm_train_001_backupYou MUST verify exact match by checking:for instance in response.Instances: if instance.InstanceName == targetName: # EXACT string equality # Name already exists - DO NOT createDo NOT assume name is available just becausebut you "think" no exact match. IfTotalCount > 0, carefully check each instance's InstanceName field.TotalCount >= 1
Step 2.2 — Provision
Run with required args: , , , , and either or .
aliyun pai-dsw create-instance--workspace-id--instance-name--ecs-spec--region--image-url--image-id[MUST] Region confirmation: Theparameter is required and must be confirmed with the user. Do NOT use CLI default region without explicit user approval. Spec availability and pricing vary by region.--region
[MUST] Match EcsSpec with image type:
- GPU image URL (contains
or-gpu-) → Must select a GPU spec (e.g.,cu)ecs.gn6v-c4g1.xlarge- CPU image URL (contains
) → Must select a CPU spec (e.g.,-cpu-)ecs.c6.large- The spec type MUST match the image type, otherwise the instance will fail to start
- Use case (大模型训练/数据分析) is only a recommendation, image type is the definitive indicator
Dataset mounting (optional): If the user specifies a dataset to mount, use theparameter in CLI list format:--datasetsbash--datasets DatasetId=<dataset-id> MountPath=<mount-path> MountAccess=RO[MUST] Dataset parameters require explicit user confirmation — do NOT assume or auto-generate dataset configurations.Official images:.references/common-images.mdAdvanced usage (VPC, datasets):.references/related-commands.md
Response:
{"InstanceId": "dsw-xxxxx", ...}[IMPORTANT] Return immediately after creation: Afterreturnscreate-instance, do NOT block waiting forInstanceIdstatus. Instead:Running
- Return the
and current status (InstanceId) to the user immediatelyCreating- Provide the user with a command to check status later:
bashaliyun pai-dsw get-instance --instance-id <instance-id> --user-agent AlibabaCloud-Agent-Skills- Inform the user that instance startup typically takes 2–5 minutes
Why this matters: Blocking polling prevents the agent from responding to other user requests. DSW instance creation is a long-running operation; the agent should return control to the user promptly.
[必填操作]幂等性保证:CreateInstance API不支持ClientToken,因此通过先检查再操作的模式保证幂等性。创建前必须调用检查名称是否已存在。list-instances --instance-name <name>
步骤2.1 — 检查存在性
bash
aliyun pai-dsw list-instances \\
--instance-name <name> \\
--region <region> \\
--resource-id ALL \\
--user-agent AlibabaCloud-Agent-Skills判定逻辑:
- → 名称可用,进入步骤2.2执行创建
TotalCount == 0 - → [必填操作]校验精确名称匹配:
TotalCount >= 1- 遍历返回的数组
Instances - 逐个比较实例的字段和目标名称逐字符匹配(大小写敏感,精确字符串匹配)
InstanceName - 找到精确匹配项()→ 名称已存在:
instance.InstanceName === targetName- 提取匹配实例的
InstanceId - 调用获取完整详情
get-instance --instance-id <id> - 对比核心参数(、
EcsSpec、ImageUrl等)Accessibility - 参数匹配 → 返回已存在的,不要重复创建
InstanceId - 参数不匹配 → 请用户选择其他名称
- 提取匹配实例的
- 未找到精确匹配项(没有实例的)→ 名称可用,进入步骤2.2执行创建
InstanceName === targetName
- 遍历返回的
[警告]关键要求:必须精确匹配名称筛选器可能返回部分匹配结果,例如:--instance-name
- 查询参数:
--instance-name llm_train_001- 响应可能包含:
、llm_train_001、llm_train_001_v2llm_train_001_backup必须通过以下校验确认精确匹配:for instance in response.Instances: if instance.InstanceName == targetName: # 精确字符串相等 # 名称已存在 - 不要创建不要因为但你“认为”没有精确匹配就判定名称可用。如果TotalCount > 0,必须仔细检查每个实例的InstanceName字段。TotalCount >= 1
步骤2.2 — 资源部署
运行并传入必填参数:、、、,以及或二选一。
aliyun pai-dsw create-instance--workspace-id--instance-name--ecs-spec--region--image-url--image-id[必填操作]地域确认:参数为必填项,必须与用户确认。未经用户明确许可,不要使用CLI默认地域。不同地域的规格可用性和定价不同。--region
[必填操作]EcsSpec与镜像类型匹配:
- GPU镜像URL(包含
或-gpu-)→ 必须选择GPU规格(例如cu)ecs.gn6v-c4g1.xlarge- CPU镜像URL(包含
)→ 必须选择CPU规格(例如-cpu-)ecs.c6.large- 规格类型必须与镜像类型匹配,否则实例将启动失败
- 使用场景(大模型训练/数据分析)仅为推荐,镜像类型是最终判定指标
数据集挂载(可选):如果用户指定要挂载数据集,使用CLI列表格式的参数:--datasetsbash--datasets DatasetId=<dataset-id> MountPath=<mount-path> MountAccess=RO[必填操作] 数据集参数需要用户明确确认 — 不要假设或自动生成数据集配置。官方镜像参考:。references/common-images.md高级用法(VPC、数据集)参考:。references/related-commands.md
返回结果:
{"InstanceId": "dsw-xxxxx", ...}[重要提示]创建完成后立即返回:返回create-instance后,不要阻塞等待InstanceId状态,而是:Running
- 立即将
和当前状态(InstanceId)返回给用户Creating- 为用户提供后续查询状态的命令:
bashaliyun pai-dsw get-instance --instance-id <instance-id> --user-agent AlibabaCloud-Agent-Skills- 告知用户实例启动通常需要2-5分钟
设计原因:阻塞轮询会阻止Agent响应其他用户请求。DSW实例创建是长时间运行的操作,Agent应及时将控制权交还给用户。
3. List Instances
3. 罗列实例
Run . Filter by or ; paginate with / .
aliyun pai-dsw list-instances--workspace-id--status--page-number--page-size运行,可通过或筛选,通过 / 分页。
aliyun pai-dsw list-instances--workspace-id--status--page-number--page-size4. Get Instance Details
4. 获取实例详情
Run to check instance status and details.
aliyun pai-dsw get-instance --instance-id <id>When to poll: Only poll when the user explicitly asks to wait for a status change (e.g., "wait until it's running"). Otherwise, return the current status immediately.Timeout limits: Maximum 60 polls (30 minutes total). If exceeded, stop and prompt user to check manually.Polling interval: 10–30 seconds between calls.CLI timeout: For long-running operations, increase read timeout:bashaliyun pai-dsw get-instance --instance-id <id> --read-timeout 30 --user-agent AlibabaCloud-Agent-SkillsOnce, access the instance viaStatus == "Running".InstanceUrlFor complete status transitions, see Instance Status Values in.references/related-commands.md
运行查询实例状态和详情。
aliyun pai-dsw get-instance --instance-id <id>轮询触发条件:仅当用户明确要求等待状态变更时(例如“等它运行起来”)才进行轮询,否则立即返回当前状态。超时限制:最多轮询60次(总计30分钟),超时后停止并提示用户手动检查。轮询间隔:两次调用间隔10-30秒。CLI超时配置:对于长时间运行的操作,增大读超时时间:bashaliyun pai-dsw get-instance --instance-id <id> --read-timeout 30 --user-agent AlibabaCloud-Agent-Skills当时,可通过Status == "Running"访问实例。InstanceUrl完整状态流转参考中的实例状态值说明。references/related-commands.md
5. Stop Instance
5. 停止实例
Run .
aliyun pai-dsw stop-instance --instance-id <id>Status transition:→Running→StoppingStoppedSave environment image: To save the environment as a custom image before stopping, use the PAI Console. See Create a DSW Instance Image for instructions.
运行。
aliyun pai-dsw stop-instance --instance-id <id>状态流转:→Running→StoppingStopped保存环境镜像:如果需要在停止前将环境保存为自定义镜像,可使用PAI控制台操作,参考创建DSW实例镜像获取指引。
6. Update Instance
6. 更新实例
Run to modify , , , , , etc.
aliyun pai-dsw update-instance --instance-id <id>--instance-name--ecs-spec--image-id--accessibility--datasets[MUST] Before updating:
- Call
to check current status and configurationget-instance- Check if update is needed:
- For
: Compare current--ecs-specwith target spec. If already equal, skip update and inform userEcsSpec- For
/--image-id: Compare current--image-url/ImageIdwith targetImageUrl- For
: Compare current--instance-namewith targetInstanceName- If already at target configuration, return current instance info — do not call update-instance
- If update is needed, use
to auto-start after update--start-instance true[IMPORTANT] Always update the specified instance by its. Do NOT substitute with another instance that already has the target spec — the user's request is to upgrade the specific instance, not to find an alternative.InstanceId
运行修改、、、、等参数。
aliyun pai-dsw update-instance --instance-id <id>--instance-name--ecs-spec--image-id--accessibility--datasets[必填操作]更新前检查:
- 调用
检查当前状态和配置get-instance- 检查是否需要更新:
- 对于
:对比当前--ecs-spec和目标规格,如果已经一致,跳过更新并告知用户EcsSpec- 对于
/--image-id:对比当前--image-url/ImageId和目标值ImageUrl- 对于
:对比当前--instance-name和目标名称InstanceName- 如果已经是目标配置,返回当前实例信息 — 不要调用update-instance
- 如果需要更新,使用
参数在更新完成后自动启动实例--start-instance true[重要提示] 始终通过更新指定实例,不要替换为其他已经符合目标规格的实例 — 用户的需求是升级指定实例,而不是寻找替代实例。InstanceId
7. Start Instance
7. 启动实例
Run , then poll (Step 4) until .
aliyun pai-dsw start-instance --instance-id <id>RunningPrerequisite: Instance must be inorStoppedstate. CallFailedto confirm before starting.get-instance
运行,然后按照步骤4的逻辑轮询直到状态变为。
aliyun pai-dsw start-instance --instance-id <id>Running前置条件:实例必须处于或Stopped状态,启动前调用Failed确认。get-instance
Success Verification
成功校验
Full verification steps: .
references/verification-method.mdQuick check: should return with a non-empty .
get-instanceStatus == "Running"InstanceUrl完整校验步骤参考:。
references/verification-method.md快速校验:返回且不为空。
get-instanceStatus == "Running"InstanceUrlCleanup
清理
This skill does not expose instance deletion (irreversible operation — use the console).To stop incurring charges, stop the instance via Step 5 ().stop-instance
本技能不开放实例删除功能(不可逆操作,请通过控制台操作)。如果要停止计费,通过步骤5的命令停止实例即可。stop-instance
Best Practices
最佳实践
- Always run check-then-act before creation — use to avoid duplicate-instance errors.
list-instances --instance-name <name> - Prefer visibility — prevents accidental operations by other workspace users.
PRIVATE - Check instance status before update — call first; some parameters require Stopped state, others can be updated while Running.
get-instance - Use with
--resource-id ALL— the default only returns post-paid instances.list-instances - Observe polling timeout limits — see Step 4 for timeout and interval guidance.
- Verify spec availability before provisioning — run to confirm the spec is available in the target region.
list-ecs-specs - Tag instances with Labels — simplifies batch queries and lifecycle management.
- 创建前始终执行先检查再操作 — 使用避免重复实例错误。
list-instances --instance-name <name> - 优先使用可见性 — 避免其他工作空间用户误操作。
PRIVATE - 更新前检查实例状态 — 先调用;部分参数要求实例处于Stopped状态,其他参数可在Running状态下更新。
get-instance - 搭配
list-instances使用 — 默认仅返回按量付费实例。--resource-id ALL - 遵守轮询超时限制 — 参考步骤4的超时和间隔指引。
- 部署前校验规格可用性 — 运行确认目标地域下该规格可用。
list-ecs-specs - 为实例添加标签 — 简化批量查询和生命周期管理。
References
参考文档
| Document | Path |
|---|---|
| CLI Installation | |
| RAM Policies | |
| CLI Commands | |
| Verification | |
| Acceptance Criteria | |
| Common Images | |
| PAI DSW API Overview | help.aliyun.com |
| 文档 | 路径 |
|---|---|
| CLI安装 | |
| RAM策略 | |
| CLI命令 | |
| 校验方法 | |
| 验收标准 | |
| 常用镜像 | |
| PAI DSW API概览 | help.aliyun.com |
| ", |