When using this skill, you MUST output the COMPLETE script result without ANY truncation, omission, or summarization. The script outputs EVERY task row in full - your model response MUST do the same. NEVER use "..." placeholders or summarize task counts. Display ALL rows exactly as shown.
Query DTS task status using Alibaba Cloud CLI. Outputs results in Chinese.
CRITICAL: AI-Mode and Plugin Setup Required
Before using this skill, you MUST configure AI-Mode and update plugins:
bash
# Enable AI-Mode for plugin-based API calls
aliyun configure ai-mode enable
# Set user agent for proper plugin compatibility
aliyun configure ai-mode set-user-agent --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-dts-task-query"
# Update all plugins to latest version
aliyun plugin update --all
# Verify DTS plugin is installed
aliyun plugin list
# To disable AI-Mode later (if needed)
aliyun configure ai-mode disable
Note: This skill uses plugin mode commands ( aliyun dts describe-dts-jobs). AI-Mode must be enabled for these commands to work correctly.
See detailed RAM policy requirements in references/ram-policies.md.
Automatically queries all 27 public cloud regions if no region is specified.
bash
python scripts/query_dts_tasks.py [--region <id>] [--instance-id <id>] [--job-name <name>] [--workers <N>]
⚠️ MANDATORY - Model Response Rules:
Performance Tuning:
--workers: Number of concurrent API calls (default: 8). Recommended values:
Reliability Features (v12):
API retry logic: Retries failed API calls up to 3 times with exponential backoff to ensure consistent results
Thread-safe collection: Uses Lock to prevent race conditions during parallel data collection
Strict response validation: Only accepts responses with valid "DtsJobList" field
Detailed error logging: Distinguishes between timeout errors and other exceptions for easier debugging
Verified: Tested with 50+ consecutive runs - all returned identical results
MIGRATION, SYNC, SUBSCRIBE) unless a specific region is provided._QueryRegion field into each task object during the query phase.--endpoint parameter to query tasks successfully.PayType is PrePaid or PostPaid.--workers.⚠️ CRITICAL - Output Completeness:
text
#### 迁移任务
共 [N] 个
| 地域 | 状态 | DTS任务名称 | 过期时间 | DTS任务ID | 创建时间 | DTS实例ID |
|------|------|-------------|----------|-----------|----------|-----------|
| [Region1] | [Status1] | [Name1] | [ExpireTime1] | [JobID1] | [CreateTime1] | [InstanceID1] |
| [Region2] | [Status2] | [Name2] | [ExpireTime2] | [JobID2] | [CreateTime2] | [InstanceID2] |
| [Region3] | [Status3] | [Name3] | [ExpireTime3] | [JobID3] | [CreateTime3] | [InstanceID3] |
The script outputs ALL rows with actual data for EVERY task - NO truncation.
共 [N] 个
地域状态DTS任务名称过期时间DTS任务ID创建时间DTS实例ID[Region][Status][Name][ExpireTime][JobID][CreateTime][InstanceID]
共 [N] 个
地域状态DTS任务名称过期时间DTS任务ID创建时间DTS实例ID[Region][Status][Name][ExpireTime][JobID][CreateTime][InstanceID]
共 [N] 个
地域状态DTS任务名称过期时间DTS任务ID创建时间DTS实例ID[Region][Status][Name][ExpireTime][JobID][CreateTime][InstanceID]
Field Definitions:
Parse parameters.
SECURITY & VALIDATION:
--region parameter MUST be validated against SUPPORTED_REGIONS whitelist. Invalid regions cause immediate exit with error.--workers parameter MUST be within range [1, 32]. Values outside this range cause immediate exit with error.describe-dts-jobs call. If it returns 403 or 400, immediately halt and report RAM permission issues.PERFORMANCE: Create ThreadPoolExecutor with --workers (default 8).
Query API for each region/type combo in parallel, injecting _QueryRegion and adding --endpoint for overseas regions.
RELIABILITY (Fallback Logic): If describe-dts-jobs fails consecutively 3 times for a specific target, terminate the execution immediately without attempting other DTS interfaces or regions for that target.
PERFORMANCE: Skip pagination if page 1 returns empty (early exit optimization).
PERFORMANCE: Use PageSize=200 to minimize API calls (50% reduction vs v10).
PERFORMANCE: Increased timeout to 10s per API call for reliability (v12.1 - balanced speed/reliability).
RELIABILITY: Retry failed API calls up to 3 times with exponential backoff (0.2s, 0.4s) for better timeout handling (v12+).
RELIABILITY: Use Lock for thread-safe data collection (v12).
RELIABILITY: Validate API responses - only accept those with valid "DtsJobList" field (v12).
Save raw JSON to /tmp/dts_raw_*.json.
Read temp file, filter by PayType (PrePaid/PostPaid), then apply user filters.
Group tasks by type (Migration/Sync/Subscribe), sort each group by CreateTime (newest first).
Format and print Chinese report with complete task list (NO TRUNCATION).
Delete temp file.
Output Completeness Guarantee:
REMEMBER: The script output is COMPLETE and GUARANTEED. Your model response MUST preserve 100% of it without ANY truncation, summarization, or omission. Display EVERY task row exactly as shown.