Xpersona
A

Alibabacloud Pai Dsw Manage

CLAWHUB · Unverified

Manage the full lifecycle of Alibaba Cloud PAI DSW (Data Science Workshop) instances — create, update, query, list, start, stop, and look up ECS specs. Trigg...

62
Rank
84
Safety
1.0k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s173swjet2yrebzqrp6hjkvmy583mxef:alibabacloud-pai-dsw-manage
  1. Install using `clawhub skill install s173swjet2yrebzqrp6hjkvmy583mxef:alibabacloud-pai-dsw-manage` in an isolated environment before connecting it to live workloads.
  2. No published capability contract is available yet, so validate auth and request/response behavior manually.
  3. Review the upstream CLAWHUB listing at https://clawhub.ai/sdk-team/alibabacloud-pai-dsw-manage before using production credentials.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-sdk-team-alibabacloud-pai-dsw-manage/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

125,464 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: alibabacloud-pai-dsw-manage
description: |
  Manage the full lifecycle of Alibaba Cloud PAI DSW (Data Science Workshop) instances — create, update, query, list, start, stop, and look up ECS specs.
  Triggers: PAI DSW, DSW instance, create instance, start instance, stop instance, update instance, query instance, instance list, ECS spec, CreateInstance, UpdateInstance, GetInstance, ListInstances, StartInstance, StopInstance, ListEcsSpecs
---

# PAI DSW Instance Management

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 + Dataset`

**API Version**: `pai-dsw/2022-01-01`

---

## Installation

> **Pre-check: Aliyun CLI >= 3.3.3 required**
>
> Run `aliyun version` to verify >= 3.3.3. If not installed or version too low,
> run `curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash` to update,
> or see [`references/cli-installation-guide.md`](references/cli-installation-guide.md) for installation instructions.

> **Pre-check: Aliyun CLI plugin update required**
> [MUST] run `aliyun configure set --auto-plugin-install true` to enable automatic plugin installation.
> [MUST] run `aliyun plugin update` to ensure that any existing plugins are always up-to-date.

```bash
# macOS (recommended)
brew install aliyun-cli

# Verify version (>= 3.3.3)
aliyun version

# Enable automatic plugin installation
aliyun configure set --auto-plugin-install true

# Update existing plugins
aliyun plugin update

# Install pai-dsw plugin
aliyun plugin install --names pai-dsw
```

**[MUST] CLI User-Agent** — Every `aliyun` CLI command invocation must include:
`--user-agent AlibabaCloud-Agent-Skills/alibabacloud-pai-dsw-manage`

---

## Authentication

> **Pre-check: Alibaba Cloud Credentials Required**
>
> **Security Rules:**
> - **NEVER** read, echo, or print AK/SK values (e.g., `echo $ALIBABA_CLOUD_ACCESS_KEY_ID` is FORBIDDEN)
> - **NEVER** ask the user to input AK/SK directly in the conversation or command line
> - **NEVER** use `aliyun configure set` with literal credential values
> - **ONLY** use `aliyun configure list` to check credential status
>
> ```bash
> aliyun configure list
> ```
> Check the output for a valid profile (AK, STS, or OAuth identity).
>
> **If no valid profile exists, STOP here.**
> 1. Obtain credentials from [Alibaba Cloud Console](https://ram.console.aliyun.com/manage/ak)
> 2. Configure credentials **outside of this session** (via `aliyun configure` in a terminal or environment variables in a shell profile)
> 3. Return and retry after `aliyun configure list` shows a valid profile

---

## RAM Permissions

See [`references/ram-policies.md`](references/ram-policies.md) for the complete permission list and minimum-privilege policy.

> **[MUST] Permission Failure Handling:** When any comma

_meta.json

{
  "ownerId": "kn74p5w8ywv6prh40g0s82gmqh83nw54",
  "slug": "alibabacloud-pai-dsw-manage",
  "version": "0.0.2",
  "publishedAt": 1776685837206
}

references/acceptance-criteria.md

# Acceptance Criteria: alibabacloud-pai-dsw-manage

**Scenario**: PAI DSW Instance Lifecycle Management
**Purpose**: Test acceptance criteria for the skill

---

## 1. Get Workspace ID (Required for CreateInstance)

> See SKILL.md "Parameter Confirmation" section for WorkspaceId requirements and `list-workspaces` command.

#### ✅ CORRECT
```bash
aliyun aiworkspace list-workspaces \
  --region cn-hangzhou \
  --user-agent AlibabaCloud-Agent-Skills
```

#### ❌ INCORRECT
```bash
# Assuming workspace ID without confirming with user
aliyun pai-dsw create-instance --workspace-id 12345 ...
# WRONG: Must confirm workspace with user first
```

---

## 2. Product Name

#### ✅ CORRECT
```bash
aliyun pai-dsw create-instance ...
aliyun pai-dsw list-instances ...
aliyun pai-dsw get-instance ...
```

#### ❌ INCORRECT
```bash
aliyun paidsw CreateInstance ...   # Traditional API format
aliyun pai_dsw create-instance ... # Underscore in product name
aliyun PAI-DSW create-instance ... # Uppercase
```

---

## 3. Command Format (kebab-case)

#### ✅ CORRECT
```bash
aliyun pai-dsw create-instance
aliyun pai-dsw update-instance
aliyun pai-dsw get-instance
aliyun pai-dsw list-instances
aliyun pai-dsw list-ecs-specs
aliyun pai-dsw start-instance
aliyun pai-dsw stop-instance
```

#### ❌ INCORRECT
```bash
aliyun pai-dsw CreateInstance     # PascalCase (traditional API)
aliyun pai-dsw createinstance     # No separator
aliyun pai-dsw create_instance    # Underscore separator
```

---

## 4. Parameter Names

### Check Instance Existence (before CreateInstance)

#### ✅ CORRECT
```bash
# Step 1: Query by instance name
aliyun pai-dsw list-instances \
  --instance-name my_instance \
  --region cn-shanghai \
  --resource-id ALL \
  --user-agent AlibabaCloud-Agent-Skills

# Step 2: Verify exact name match in response
# Parse the JSON response and check EACH instance:
#
# Response example:
# {
#   "TotalCount": 3,
#   "Instances": [
#     {"InstanceName": "my_instance_v2", "InstanceId": "dsw-xxx"},
#     {"InstanceName": "my_instance_backup", "InstanceId": "dsw-yyy"},
#     {"InstanceName": "my_instance", "InstanceId": "dsw-zzz"}  ← EXACT MATCH!
#   ]
# }
#
# Algorithm:
# found = false
# for instance in Instances:
#     if instance.InstanceName == "my_instance":  # EXACT string equality
#         found = true
#         break
#
# if found:
#     # Name already exists - DO NOT create, return existing instance
# else:
#     # Name is available - proceed to create
```

#### ❌ INCORRECT
```bash
# Wrong pattern 1: Relying solely on TotalCount > 0
if TotalCount > 0:
    print("Name already exists")  # May miss partial matches

# Wrong pattern 2: Assuming no exact match without checking
# Response: TotalCount=2, Instances=[{"InstanceName":"my_instance_v2"}, {"InstanceName":"my_instance"}]
# Agent incorrectly concludes: "ExactNameMatch: false"
# This is WRONG - must verify by iterating through ALL instances

# Wrong pattern 3: Not checking case-sensitivity
if instanceName.lower() == targetNa

references/cli-installation-guide.md

# Aliyun CLI Installation & Configuration Guide

Complete guide for installing and configuring Aliyun CLI.

> **Aliyun CLI 3.3.3+**: Supports installing and using all published Alibaba Cloud product plugins. Make sure to upgrade to 3.3.3 or later for full plugin ecosystem coverage.

## Installation

### macOS

**Using Homebrew (Recommended)**
```bash
brew install aliyun-cli
# Upgrade to latest
brew upgrade aliyun-cli

# Verify version (>= 3.3.3)
aliyun version
```

**Using Binary**
```bash
# Download
wget https://aliyuncli.alicdn.com/aliyun-cli-macosx-latest-amd64.tgz

# Extract
tar -xzf aliyun-cli-macosx-latest-amd64.tgz

# Move to PATH
sudo mv aliyun /usr/local/bin/

# Verify
aliyun version
```

### Linux

**Debian/Ubuntu**
```bash
# Download
wget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz

# Extract and install
tar -xzf aliyun-cli-linux-latest-amd64.tgz
sudo mv aliyun /usr/local/bin/

# Verify
aliyun version
```

**CentOS/RHEL**
```bash
# Download
wget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz

# Extract and install
tar -xzf aliyun-cli-linux-latest-amd64.tgz
sudo mv aliyun /usr/local/bin/

# Verify
aliyun version
```

**ARM64 Architecture**
```bash
# Download ARM64 version
wget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-arm64.tgz

# Extract and install
tar -xzf aliyun-cli-linux-latest-arm64.tgz
sudo mv aliyun /usr/local/bin/
```

### Windows

**Using Binary**
1. Download from: https://aliyuncli.alicdn.com/aliyun-cli-windows-latest-amd64.zip
2. Extract the ZIP file
3. Add the directory to your PATH environment variable
4. Open a new Command Prompt or PowerShell
5. Verify: `aliyun version`

**Using PowerShell**
```powershell
# Download
Invoke-WebRequest -Uri "https://aliyuncli.alicdn.com/aliyun-cli-windows-latest-amd64.zip" -OutFile "aliyun-cli.zip"

# Extract
Expand-Archive -Path aliyun-cli.zip -DestinationPath C:\aliyun-cli

# Add to PATH (requires admin privileges)
$env:Path += ";C:\aliyun-cli"
[Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine)

# Verify
aliyun version
```

## Configuration

### Quick Start

```bash
aliyun configure set \
  --mode AK \
  --access-key-id <your-access-key-id> \
  --access-key-secret <your-access-key-secret> \
  --region cn-hangzhou
```

All `aliyun configure` commands support non-interactive flags, which is the recommended approach — it works in scripts, CI/CD pipelines, and agent-driven automation without hanging on stdin prompts.

**Where to Get Access Keys**

1. Log in to Aliyun Console: https://ram.console.aliyun.com/
2. Navigate to: AccessKey Management
3. Create a new AccessKey pair
4. Save the secret immediately — it's only shown once

### Configuration Modes

Aliyun CLI supports 6 authentication modes. All examples below use non-interactive flags.

#### 1. AK Mode (Access Key)

Most common mode for personal accounts and scripts.

```bash
aliyun configure set \
  --mode AK \
  --access-key-id LTAI5tXXXXX

references/common-images.md

# Common Images — alibabacloud-pai-dsw-manage

Official preset images for PAI DSW. Pass the image URL via `--image-url` when creating an instance.

> The `pai-dsw` CLI plugin has no `list-images` subcommand. Browse the full catalog on the [PAI Console](https://pai.console.aliyun.com/) during instance creation, or use the images listed below. Versions are updated regularly — verify the latest in the console.

---

## URL Format

```
dsw-registry-vpc.{region}.cr.aliyuncs.com/pai/{framework}:{tag}
```

| Placeholder | Example |
|---|---|
| `{region}` | `cn-hangzhou`, `cn-shanghai`, `cn-beijing`, `cn-wulanchabu` |
| `{framework}` | `modelscope`, `pytorch`, `tensorflow`, `torcheasyrec` |
| `{tag}` | `1.34.0-pytorch2.3.1-cpu-py311-ubuntu22.04` |

Tag format: `{version}-pytorch{ver}-{cpu|gpu}-py{pyVer}[-cu{cudaVer}]-ubuntu{ver}`

---

## CPU Images

| Framework | Image URL (cn-shanghai) |
|---|---|
| ModelScope + PyTorch 2.3 | `dsw-registry-vpc.cn-shanghai.cr.aliyuncs.com/pai/modelscope:1.34.0-pytorch2.3.1-cpu-py311-ubuntu22.04` |
| TorchEasyRec + PyTorch 2.10 | `dsw-registry-vpc.cn-shanghai.cr.aliyuncs.com/pai/torcheasyrec:1.1.0-pytorch2.10.0-cpu-py311-ubuntu22.04` |

## GPU Images

| Framework | Image URL (cn-shanghai) |
|---|---|
| ModelScope + PyTorch 2.8 + CUDA 12.4 | `dsw-registry-vpc.cn-shanghai.cr.aliyuncs.com/pai/modelscope:1.31.0-pytorch2.8.0-gpu-py311-cu124-ubuntu22.04` |

---

## Usage

1. **Replace the region** — match the `{region}` segment to your workspace location.
2. **Match CPU/GPU** — use `cpu` images for CPU specs and `gpu` images for GPU specs.
3. **Choose one image parameter**:
   - `--image-url` — direct URL (official presets or custom ACR images)
   - `--image-id` — PAI-assigned image ID (e.g., `image-xxxxx`), from the console
4. **Custom ACR images** — use a private registry URL and supply `--image-auth` (base64-encoded credentials).

## Not Available via CLI

- **List images** — no `list-images` subcommand. Use the [PAI Console > Create Instance](https://pai.console.aliyun.com/) page.
- **Image metadata** — framework version, Python version, CUDA version, etc. are not queryable via CLI.

Sponsored

Ads related to Alibabacloud Pai Dsw Manage and adjacent AI workflows.