Alibaba Cloud DTS Task Manager
Overview
Manage Alibaba Cloud DTS (Data Transmission Service) tasks: create data migration/synchronization tasks, view task status/latency, stop/start/release tasks. All operations are guided interactively.
Parameter Parsing
Determine the operation mode based on user input, and read the corresponding references file for detailed workflow:
| User Intent |
Keywords |
Action |
Reference File |
| Create migration task |
empty / "create" / "new" / "migration" |
Interactive creation |
references/create-task.md |
| Create sync task |
"sync" / "synchronization" |
Interactive sync task creation |
references/create-task.md |
| View task list |
"list" / "view" / "ls" |
List all tasks |
references/list-tasks.md |
| View task status |
"status ID" |
View specified task details |
references/task-status.md |
| Stop task |
"stop ID" / "suspend ID" / "pause ID" |
Suspend specified task |
references/suspend-task.md |
| Start/Resume task |
"start ID" / "resume ID" |
Start or resume task |
references/start-task.md |
| Release task |
"release ID" / "delete ID" / "remove ID" |
Release (delete) task |
references/delete-task.md |
| Environment setup |
"setup" / "configure" / "init" |
Check and configure environment |
references/setup.md |
When no parameters are provided, ask the user to choose the desired operation.
Step-by-Step Operation Workflows
Create Task (Migration / Sync)
Steps (full details in references/create-task.md):
- Prerequisites check (CLI installed, auth configured)
- Select Region + Task type (MIGRATION or SYNC)
- Configure source: engine type, access method, connection info, optional SSL
- Configure destination: engine type, access method, connection info, optional SSL
- Define migration objects: full database or specific tables, with optional name mapping
- Select migration types: schema / full data / incremental (default: all)
- Select instance class: micro / small / medium / large
- Review summary (passwords shown as
******) and confirm
- Execute: CreateDtsInstance -> ConfigureDtsJob -> StartDtsJob
- On failure at any step after instance creation, auto-release the instance
Example input: "Create a MySQL to Kafka sync task"
Example output:
DTS task created successfully!
Instance ID: <dts-instance-id>
Job ID: <job-id>
Status: Initializing
To check status: aliyun dts DescribeDtsJobDetail --DtsJobId <job-id> --RegionId cn-hangzhou
List Tasks
Steps (full details in references/list-tasks.md):
- Prerequisites check
- Query tasks by each JobType (MIGRATION, SYNC, SUBSCRIBE) separately
- Display consolidated results in table format
Example input: "List my DTS tasks"
Example output:
| Task ID | Name | Type | Status | Source | Destination | Delay |
|----------------|------------------------------|-----------|----------------|--------------|--------------|--------|
| <job-id-1> | migration-mysql-mysql-0401 | MIGRATION | Migrating | RDS MySQL | RDS MySQL | - |
| <job-id-2> | sync-mysql-kafka-0401 | SYNC | Synchronizing | RDS MySQL | Kafka | 128ms |
View Task Status
Steps (full details in references/task-status.md):
- Prerequisites check
- Resolve ID: if only one ID given, look up via DescribeDtsJobs first
- Call DescribeDtsJobDetail
- Display status, progress, delay (convert ms to readable format)
Example input: "Check status of "
Example output:
Task: <job-id> (migration-mysql-mysql-0401)
Type: MIGRATION
Status: Migrating
Progress:
Schema migration: Finished
Full data migration: Finished (1,234,567 rows)
Incremental: Running, delay 236ms
Source: RDS MySQL <source-instance-id> (cn-hangzhou)
Destination: RDS MySQL <dest-instance-id> (cn-hangzhou)
Stop / Start / Release Task
Stop (full details in references/suspend-task.md):
- Resolve ID, display task info, confirm, then call SuspendDtsJob
Start/Resume (full details in references/start-task.md):
- Resolve ID, then call StartDtsJob
Release/Delete (full details in references/delete-task.md):
- Resolve ID
- Pre-check: call DescribeDtsJobDetail to check current status
- If task is active (Synchronizing/Migrating/InitializingDataLoad), warn user and require explicit confirmation
- Double confirmation required before calling DeleteDtsJob
Environment Setup
Steps (full details in references/setup.md):
- Check aliyun CLI installation
- Check authentication configuration
- Test connectivity with a DescribeDtsJobs call
Edge Cases
- User provides only one ID: Try it as DtsJobId first; look up DtsInstanceId via DescribeDtsJobs. If DtsInstanceID field is empty on the task, pass only DtsJobId.
- API parameter case inconsistency:
DescribeDtsJobDetail uses --DtsInstanceID (uppercase D), while DeleteDtsJob/ConfigureDtsJob use --DtsInstanceId (lowercase d). Always verify with aliyun dts <API> help before calling.
- Ambiguous ID format: If the ID doesn't clearly match DtsJobId or DtsInstanceId pattern, fuzzy search via DescribeDtsJobs.
- Delete active task: Never delete a running task without pre-check. Query status first; if Synchronizing/Migrating, prompt user to suspend first or explicitly confirm forced deletion.
- Creation failure mid-flow: If CreateDtsInstance succeeds but ConfigureDtsJob or StartDtsJob fails, auto-release the created instance to avoid ongoing charges.
- Timeout / retry: All API calls use
--read-timeout 30 --connect-timeout 10. CreateDtsInstance includes --ClientToken (UUID) for idempotent retries.
- Multi-region queries: When listing tasks, query MIGRATION/SYNC/SUBSCRIBE separately per region. The
--JobType parameter defaults to MIGRATION; omitting it silently drops sync/subscribe tasks. Never use --Type (causes InvalidParameter).
- MongoDB specifics: MongoDB endpoints require
--SourceEndpointDatabaseName in ConfigureDtsJob.
Interaction Rules
Important: All information gathering must use interactive selections to avoid workflow interruption from free-text questions.
Selection-type information: Provide fixed options
Applicable to scenarios with fixed choices: task type, engine type, access method, instance selection, migration type, specification selection, etc.
Free-input information: Provide common defaults + custom input
Applicable to scenarios requiring user free input: IP address, port, username, password, database name, table name, etc.
Provide common default values as options; users can select or enter custom values.
Consolidate related input items into as few interaction rounds as possible.
Sensitive information: Never display in plaintext
CRITICAL: Passwords, AccessKey Secrets, certificates, and private keys must NEVER appear in plaintext anywhere in the conversation — this applies to ALL stages:
- During collection: When the user provides a password or secret in a message (e.g., "password: MyPass123"), you MUST immediately treat it as sensitive. Do NOT quote, repeat, summarize, or reference the plaintext value in your response. Simply acknowledge receipt, e.g., "Source database password received." Then internally store it for later CLI execution. Even if the user typed the password in plain text, your reply must NEVER contain it.
- When summarizing user input: If the user provides multiple fields including a password in one message (e.g., "username: dts, password: abc123"), your acknowledgment must mask the password: "Username: dts, Password: ******". Never reproduce the password portion of the user's message.
- In confirmation summaries: Always show
****** for password fields.
- In CLI commands displayed to the user: Show passwords as
'******', never the actual value. The real value is only used internally when executing the command.
- In error messages / logs: If an API error response contains sensitive fields, redact them before displaying.
- In stored variables or references: Never repeat the plaintext value in follow-up messages.
- In local files: Never write passwords or secrets to any local file (scripts, configs, logs, temp files, etc.). All sensitive values must only exist in memory during CLI execution.
Use single quotes around passwords in actual CLI execution to prevent shell expansion.
Prerequisites
Before executing any operation, the following checks must be performed:
1. Check aliyun CLI installation
which aliyun
If not installed, prompt the user:
2. Check authentication configuration
aliyun configure list
If not configured, guide the user through setup:
aliyun configure --mode AK
Requires: AccessKey ID, AccessKey Secret, Region Id
Important: Never display the user's AccessKey Secret in the conversation. Protect sensitive information.
3. Select Region
Let the user select a Region using interactive choices, not text input.
Supported Region list:
Mainland China:
| Region ID |
Name |
| cn-beijing |
China North 2 (Beijing) |
| cn-hangzhou |
China East 1 (Hangzhou) |
| cn-shanghai |
China East 2 (Shanghai) |
| cn-shenzhen |
China South 1 (Shenzhen) |
| cn-guangzhou |
China South 3 (Guangzhou) |
| cn-qingdao |
China North 1 (Qingdao) |
| cn-zhangjiakou |
China North 3 (Zhangjiakou) |
| cn-huhehaote |
China North 5 (Hohhot) |
| cn-wulanchabu |
China North 6 (Ulanqab) |
| cn-heyuan |
China South 2 (Heyuan) |
| cn-chengdu |
China Southwest 1 (Chengdu) |
| cn-nanjing |
China East 5 (Nanjing - Local Region) |
| cn-fuzhou |
China East 6 (Fuzhou - Local Region) |
| cn-wuhan-lr |
China Central 1 (Wuhan - Local Region) |
Hong Kong (China) and International:
| Region ID |
Name |
| cn-hongkong |
China (Hong Kong) |
| ap-southeast-1 |
Singapore |
| ap-southeast-3 |
Malaysia (Kuala Lumpur) |
| ap-southeast-5 |
Indonesia (Jakarta) |
| ap-southeast-6 |
Philippines (Manila) |
| ap-southeast-7 |
Thailand (Bangkok) |
| ap-northeast-1 |
Japan (Tokyo) |
| ap-northeast-2 |
South Korea (Seoul) |
| eu-central-1 |
Germany (Frankfurt) |
| eu-west-1 |
UK (London) |
| us-east-1 |
US (Virginia) |
| us-west-1 |
US (Silicon Valley) |
| me-east-1 |
UAE (Dubai) |
| na-south-1 |
Mexico |
Interactive pagination:
- First screen (common): cn-beijing (China North 2 - Beijing), cn-hangzhou (China East 1 - Hangzhou), cn-shanghai (China East 2 - Shanghai), cn-shenzhen (China South 1 - Shenzhen)
- After selecting Other: cn-guangzhou, cn-qingdao, cn-chengdu, cn-hongkong
- Continue Other: Show remaining Regions or let user input Region ID directly
This step can be combined with Step 1 (task type) to reduce interaction rounds.
Error Handling
- When API calls fail, parse error messages and provide actionable suggestions
- If instance creation succeeds but subsequent steps fail, automatically release the created instance to avoid charges
- Common errors:
InvalidAccessKeyId.NotFound - Invalid AccessKey, check configuration
Forbidden.RAM - Insufficient RAM permissions, requires AliyunDTSFullAccess policy
InvalidParameter - Parameter error, check input
UnSupportedTaskType - Unsupported link combination, suggest changing engine or access method
OperationDenied - Operation denied, task status may not allow this operation
- Network timeout - Check network connection
CLI Call Standards
- All aliyun CLI commands must include
--user-agent AlibabaCloud-Agent-Skills parameter (except local configuration commands like aliyun configure)
- All aliyun CLI API calls must set timeouts:
--read-timeout 30 --connect-timeout 10
- All aliyun CLI command responses are JSON; parse JSON to extract key information for display
Input Validation and Injection Prevention
CRITICAL: Before constructing any CLI command, ALL user-provided input parameters must be validated and sanitized to prevent command injection.
Validation rules by parameter type:
| Parameter |
Validation Rule |
| IP address |
Must match IPv4 pattern (^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$), each octet 0-255 |
| Port |
Integer only, range 1-65535 |
| Instance ID |
Alphanumeric, hyphens, and underscores only (^[a-zA-Z0-9_-]+$) |
| Database name |
Alphanumeric, underscores, hyphens only (^[a-zA-Z0-9_-]+$) |
| Table name |
Alphanumeric, underscores, hyphens, dots only (^[a-zA-Z0-9_.\-]+$) |
| Username |
Alphanumeric, underscores, hyphens, dots only (^[a-zA-Z0-9_.\-]+$) |
| Region ID |
Must match known Region ID list or pattern ^[a-z]{2}-[a-z]+-?\d*$ |
| DtsJobName |
Alphanumeric, hyphens, underscores, dots only, max 128 chars |
Shell injection prevention:
- All user-provided parameter values must be wrapped in single quotes (
'...') when passed to CLI commands, not just passwords
- Before quoting, reject any input containing single quotes (
'), or escape them properly (''')
- Reject any input containing shell metacharacters (
; | & $ ` ( ) { } \n) for parameters where they are never valid (IP, port, instance ID, username, database name)
- DbList JSON must be validated as syntactically correct JSON before passing to
--DbList
- If validation fails, display a clear error message and ask the user to re-enter the value; never pass unvalidated input to the shell
Notes
- Never display passwords, certificates, keys, or other sensitive information in any output; show as
****** in confirmation summaries
- Releasing a task is an irreversible operation; always require double confirmation
- Creating tasks incurs charges (pay-as-you-go); remind users
- If the ID format is ambiguous, attempt fuzzy search matching via DescribeDtsJobs
- Use the Region from the configuration file by default, unless the user specifies a different Region
- All information gathering must use interactive methods to avoid workflow interruption
- Consolidate related input items into the same interaction round to minimize rounds
1---2name: alibabacloud-dts-task-manager3description: Create, view, and manage Alibaba Cloud DTS data migration/synchronization tasks interactively. Automatically triggered when the user mentions keywords such as "DTS task", "DTS migration", "DTS sync", "data migration task", "data sync task", "create migration", "create DTS", "new DTS", "DTS status", "migration status", "sync status", "stop migration", "suspend DTS", "release DTS".4---5
6# Alibaba Cloud DTS Task Manager
7
8## Overview
9
10Manage Alibaba Cloud DTS (Data Transmission Service) tasks: create data migration/synchronization tasks, view task status/latency, stop/start/release tasks. All operations are guided interactively.
11
12## Parameter Parsing
13
14Determine the operation mode based on user input, and read the corresponding references file for detailed workflow:
15
16| User Intent | Keywords | Action | Reference File |
17|------------|----------|--------|---------------|
18| Create migration task | empty / "create" / "new" / "migration" | Interactive creation | `references/create-task.md` |
19| Create sync task | "sync" / "synchronization" | Interactive sync task creation | `references/create-task.md` |
20| View task list | "list" / "view" / "ls" | List all tasks | `references/list-tasks.md` |
21| View task status | "status ID" | View specified task details | `references/task-status.md` |
22| Stop task | "stop ID" / "suspend ID" / "pause ID" | Suspend specified task | `references/suspend-task.md` |
23| Start/Resume task | "start ID" / "resume ID" | Start or resume task | `references/start-task.md` |
24| Release task | "release ID" / "delete ID" / "remove ID" | Release (delete) task | `references/delete-task.md` |
25| Environment setup | "setup" / "configure" / "init" | Check and configure environment | `references/setup.md` |
26
27When no parameters are provided, ask the user to choose the desired operation.
28
29## Step-by-Step Operation Workflows
30
31### Create Task (Migration / Sync)
32
33**Steps** (full details in `references/create-task.md`):
341. Prerequisites check (CLI installed, auth configured)
352. Select Region + Task type (MIGRATION or SYNC)
363. Configure source: engine type, access method, connection info, optional SSL
374. Configure destination: engine type, access method, connection info, optional SSL
385. Define migration objects: full database or specific tables, with optional name mapping
396. Select migration types: schema / full data / incremental (default: all)
407. Select instance class: micro / small / medium / large
418. Review summary (passwords shown as `******`) and confirm
429. Execute: CreateDtsInstance -> ConfigureDtsJob -> StartDtsJob
4310. On failure at any step after instance creation, auto-release the instance
44
45**Example input**: "Create a MySQL to Kafka sync task"
46**Example output**:
47```
48DTS task created successfully!
49 Instance ID: <dts-instance-id>
50 Job ID: <job-id>
51 Status: Initializing
52
53To check status: aliyun dts DescribeDtsJobDetail --DtsJobId <job-id> --RegionId cn-hangzhou
54```
55
56### List Tasks
57
58**Steps** (full details in `references/list-tasks.md`):
591. Prerequisites check
602. Query tasks by each JobType (MIGRATION, SYNC, SUBSCRIBE) separately
613. Display consolidated results in table format
62
63**Example input**: "List my DTS tasks"
64**Example output**:
65```
66| Task ID | Name | Type | Status | Source | Destination | Delay |
67|----------------|------------------------------|-----------|----------------|--------------|--------------|--------|
68| <job-id-1> | migration-mysql-mysql-0401 | MIGRATION | Migrating | RDS MySQL | RDS MySQL | - |
69| <job-id-2> | sync-mysql-kafka-0401 | SYNC | Synchronizing | RDS MySQL | Kafka | 128ms |
70```
71
72### View Task Status
73
74**Steps** (full details in `references/task-status.md`):
751. Prerequisites check
762. Resolve ID: if only one ID given, look up via DescribeDtsJobs first
773. Call DescribeDtsJobDetail
784. Display status, progress, delay (convert ms to readable format)
79
80**Example input**: "Check status of <job-id>"
81**Example output**:
82```
83Task: <job-id> (migration-mysql-mysql-0401)
84Type: MIGRATION
85Status: Migrating
86Progress:
87 Schema migration: Finished
88 Full data migration: Finished (1,234,567 rows)
89 Incremental: Running, delay 236ms
90Source: RDS MySQL <source-instance-id> (cn-hangzhou)
91Destination: RDS MySQL <dest-instance-id> (cn-hangzhou)
92```
93
94### Stop / Start / Release Task
95
96**Stop** (full details in `references/suspend-task.md`):
971. Resolve ID, display task info, confirm, then call SuspendDtsJob
98
99**Start/Resume** (full details in `references/start-task.md`):
1001. Resolve ID, then call StartDtsJob
101
102**Release/Delete** (full details in `references/delete-task.md`):
1031. Resolve ID
1042. **Pre-check**: call DescribeDtsJobDetail to check current status
1053. If task is active (Synchronizing/Migrating/InitializingDataLoad), warn user and require explicit confirmation
1064. Double confirmation required before calling DeleteDtsJob
107
108### Environment Setup
109
110**Steps** (full details in `references/setup.md`):
1111. Check aliyun CLI installation
1122. Check authentication configuration
1133. Test connectivity with a DescribeDtsJobs call
114
115## Edge Cases
116
117- **User provides only one ID**: Try it as DtsJobId first; look up DtsInstanceId via DescribeDtsJobs. If DtsInstanceID field is empty on the task, pass only DtsJobId.
118- **API parameter case inconsistency**: `DescribeDtsJobDetail` uses `--DtsInstanceID` (uppercase D), while `DeleteDtsJob`/`ConfigureDtsJob` use `--DtsInstanceId` (lowercase d). Always verify with `aliyun dts <API> help` before calling.
119- **Ambiguous ID format**: If the ID doesn't clearly match DtsJobId or DtsInstanceId pattern, fuzzy search via DescribeDtsJobs.
120- **Delete active task**: Never delete a running task without pre-check. Query status first; if Synchronizing/Migrating, prompt user to suspend first or explicitly confirm forced deletion.
121- **Creation failure mid-flow**: If CreateDtsInstance succeeds but ConfigureDtsJob or StartDtsJob fails, auto-release the created instance to avoid ongoing charges.
122- **Timeout / retry**: All API calls use `--read-timeout 30 --connect-timeout 10`. CreateDtsInstance includes `--ClientToken` (UUID) for idempotent retries.
123- **Multi-region queries**: When listing tasks, query MIGRATION/SYNC/SUBSCRIBE separately per region. The `--JobType` parameter defaults to MIGRATION; omitting it silently drops sync/subscribe tasks. Never use `--Type` (causes InvalidParameter).
124- **MongoDB specifics**: MongoDB endpoints require `--SourceEndpointDatabaseName` in ConfigureDtsJob.
125
126## Interaction Rules
127
128**Important: All information gathering must use interactive selections to avoid workflow interruption from free-text questions.**
129
130### Selection-type information: Provide fixed options
131Applicable to scenarios with fixed choices: task type, engine type, access method, instance selection, migration type, specification selection, etc.
132
133### Free-input information: Provide common defaults + custom input
134Applicable to scenarios requiring user free input: IP address, port, username, password, database name, table name, etc.
135Provide common default values as options; users can select or enter custom values.
136Consolidate related input items into as few interaction rounds as possible.
137
138### Sensitive information: Never display in plaintext
139
140**CRITICAL**: Passwords, AccessKey Secrets, certificates, and private keys must **NEVER** appear in plaintext anywhere in the conversation — this applies to ALL stages:
141
142- **During collection**: When the user provides a password or secret in a message (e.g., "password: MyPass123"), you MUST immediately treat it as sensitive. **Do NOT quote, repeat, summarize, or reference the plaintext value in your response.** Simply acknowledge receipt, e.g., "Source database password received." Then internally store it for later CLI execution. Even if the user typed the password in plain text, your reply must NEVER contain it.
143- **When summarizing user input**: If the user provides multiple fields including a password in one message (e.g., "username: dts, password: abc123"), your acknowledgment must mask the password: "Username: dts, Password: ******". Never reproduce the password portion of the user's message.
144- **In confirmation summaries**: Always show `******` for password fields.
145- **In CLI commands displayed to the user**: Show passwords as `'******'`, never the actual value. The real value is only used internally when executing the command.
146- **In error messages / logs**: If an API error response contains sensitive fields, redact them before displaying.
147- **In stored variables or references**: Never repeat the plaintext value in follow-up messages.
148- **In local files**: Never write passwords or secrets to any local file (scripts, configs, logs, temp files, etc.). All sensitive values must only exist in memory during CLI execution.
149
150Use single quotes around passwords in actual CLI execution to prevent shell expansion.
151
152## Prerequisites
153
154**Before executing any operation, the following checks must be performed:**
155
156### 1. Check aliyun CLI installation
157
158```bash
159which aliyun
160```
161
162If not installed, prompt the user:
163- macOS: `brew install aliyun-cli`
164- Or download from https://github.com/aliyun/aliyun-cli/releases
165- After installation, run `aliyun configure` to set up authentication
166
167### 2. Check authentication configuration
168
169```bash
170aliyun configure list
171```
172
173If not configured, guide the user through setup:
174```bash
175aliyun configure --mode AK
176```
177Requires: AccessKey ID, AccessKey Secret, Region Id
178
179**Important**: Never display the user's AccessKey Secret in the conversation. Protect sensitive information.
180
181### 3. Select Region
182
183Let the user select a Region using interactive choices, not text input.
184
185Supported Region list:
186
187**Mainland China**:
188| Region ID | Name |
189|-----------|------|
190| cn-beijing | China North 2 (Beijing) |
191| cn-hangzhou | China East 1 (Hangzhou) |
192| cn-shanghai | China East 2 (Shanghai) |
193| cn-shenzhen | China South 1 (Shenzhen) |
194| cn-guangzhou | China South 3 (Guangzhou) |
195| cn-qingdao | China North 1 (Qingdao) |
196| cn-zhangjiakou | China North 3 (Zhangjiakou) |
197| cn-huhehaote | China North 5 (Hohhot) |
198| cn-wulanchabu | China North 6 (Ulanqab) |
199| cn-heyuan | China South 2 (Heyuan) |
200| cn-chengdu | China Southwest 1 (Chengdu) |
201| cn-nanjing | China East 5 (Nanjing - Local Region) |
202| cn-fuzhou | China East 6 (Fuzhou - Local Region) |
203| cn-wuhan-lr | China Central 1 (Wuhan - Local Region) |
204
205**Hong Kong (China) and International**:
206| Region ID | Name |
207|-----------|------|
208| cn-hongkong | China (Hong Kong) |
209| ap-southeast-1 | Singapore |
210| ap-southeast-3 | Malaysia (Kuala Lumpur) |
211| ap-southeast-5 | Indonesia (Jakarta) |
212| ap-southeast-6 | Philippines (Manila) |
213| ap-southeast-7 | Thailand (Bangkok) |
214| ap-northeast-1 | Japan (Tokyo) |
215| ap-northeast-2 | South Korea (Seoul) |
216| eu-central-1 | Germany (Frankfurt) |
217| eu-west-1 | UK (London) |
218| us-east-1 | US (Virginia) |
219| us-west-1 | US (Silicon Valley) |
220| me-east-1 | UAE (Dubai) |
221| na-south-1 | Mexico |
222
223**Interactive pagination**:
224- First screen (common): cn-beijing (China North 2 - Beijing), cn-hangzhou (China East 1 - Hangzhou), cn-shanghai (China East 2 - Shanghai), cn-shenzhen (China South 1 - Shenzhen)
225- After selecting Other: cn-guangzhou, cn-qingdao, cn-chengdu, cn-hongkong
226- Continue Other: Show remaining Regions or let user input Region ID directly
227
228This step can be combined with Step 1 (task type) to reduce interaction rounds.
229
230## Error Handling
231
232- When API calls fail, parse error messages and provide actionable suggestions
233- If instance creation succeeds but subsequent steps fail, automatically release the created instance to avoid charges
234- Common errors:
235 - `InvalidAccessKeyId.NotFound` - Invalid AccessKey, check configuration
236 - `Forbidden.RAM` - Insufficient RAM permissions, requires AliyunDTSFullAccess policy
237 - `InvalidParameter` - Parameter error, check input
238 - `UnSupportedTaskType` - Unsupported link combination, suggest changing engine or access method
239 - `OperationDenied` - Operation denied, task status may not allow this operation
240 - Network timeout - Check network connection
241
242## CLI Call Standards
243
244- All aliyun CLI commands must include `--user-agent AlibabaCloud-Agent-Skills` parameter (except local configuration commands like `aliyun configure`)
245- All aliyun CLI API calls must set timeouts: `--read-timeout 30 --connect-timeout 10`
246- All aliyun CLI command responses are JSON; parse JSON to extract key information for display
247
248### Input Validation and Injection Prevention
249
250**CRITICAL**: Before constructing any CLI command, ALL user-provided input parameters must be validated and sanitized to prevent command injection.
251
252**Validation rules by parameter type**:
253
254| Parameter | Validation Rule |
255|-----------|----------------|
256| IP address | Must match IPv4 pattern (`^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$`), each octet 0-255 |
257| Port | Integer only, range 1-65535 |
258| Instance ID | Alphanumeric, hyphens, and underscores only (`^[a-zA-Z0-9_-]+$`) |
259| Database name | Alphanumeric, underscores, hyphens only (`^[a-zA-Z0-9_-]+$`) |
260| Table name | Alphanumeric, underscores, hyphens, dots only (`^[a-zA-Z0-9_.\-]+$`) |
261| Username | Alphanumeric, underscores, hyphens, dots only (`^[a-zA-Z0-9_.\-]+$`) |
262| Region ID | Must match known Region ID list or pattern `^[a-z]{2}-[a-z]+-?\d*$` |
263| DtsJobName | Alphanumeric, hyphens, underscores, dots only, max 128 chars |
264
265**Shell injection prevention**:
266- **All** user-provided parameter values must be wrapped in single quotes (`'...'`) when passed to CLI commands, not just passwords
267- Before quoting, reject any input containing single quotes (`'`), or escape them properly (`'''`)
268- Reject any input containing shell metacharacters (`` ; | & $ ` ( ) { } \n ``) for parameters where they are never valid (IP, port, instance ID, username, database name)
269- DbList JSON must be validated as syntactically correct JSON before passing to `--DbList`
270- If validation fails, display a clear error message and ask the user to re-enter the value; never pass unvalidated input to the shell
271
272## Notes
273
274- **Never display passwords, certificates, keys, or other sensitive information in any output**; show as `******` in confirmation summaries
275- Releasing a task is an irreversible operation; always require double confirmation
276- Creating tasks incurs charges (pay-as-you-go); remind users
277- If the ID format is ambiguous, attempt fuzzy search matching via DescribeDtsJobs
278- Use the Region from the configuration file by default, unless the user specifies a different Region
279- All information gathering must use interactive methods to avoid workflow interruption
280- Consolidate related input items into the same interaction round to minimize rounds