DWS cluster CPU high root cause diagnosis skill, based on KooCLI v3.2.0+ and DWS Autopilot MCP Server. Automatically collects CPU metrics, analyzes root caus...
数据分析
huawei-cloud-dws-list
试用List DWS (Data Warehouse Service) clusters under a Huawei Cloud tenant and return only the cluster names. Based on KooCLI (hcloud) DWS ListClusters API. Useful for daily inspection, resource inventory, and quick cluster overview. Triggers include: "查询DWS列表", "DWS集群列表", "列出DWS", "DWS集群名称", "list DWS clusters", "DWS cluster list", "show DWS names", "DWS inventory"
它能做什么
List DWS (Data Warehouse Service) clusters under a Huawei Cloud tenant and return only the cluster names. Based on KooCLI (hcloud) DWS ListClusters API. Useful for daily inspection, resource inventory, and quick cluster overview. Triggers include: "查询DWS列表", "DWS集群列表", "列出DWS", "DWS集群名称", "list DWS clusters", "DWS cluster list", "show DWS names", "DWS inventory"
技能文档
Huawei Cloud DWS Cluster List Skill
Overview
This skill queries the DWS (Data Warehouse Service) cluster list under a Huawei Cloud tenant and returns only the cluster names. It is designed for daily inspection, resource inventory, and quick cluster overview scenarios.
Architecture: KooCLI (hcloud) → DWS ListClusters API → jq extraction of clusters[].name
Applicable Scenarios:
- Daily inspection of DWS clusters
- Resource inventory / asset overview
- Quick listing of all DWS cluster names under the tenant
Typical Use Cases:
- "查询一下我账号下有哪些DWS集群"
- "列出所有DWS集群的名称"
- "帮我看看租户下DWS列表"
- "List all my DWS clusters"
- "Show me the DWS cluster names under this tenant"
Prerequisites
1. CLI Requirements
- KooCLI (hcloud) >= 3.2.0
- Verify installation: hcloud version
- If not installed or version too low, see CLI Installation Guide
2. Authentication Configuration
- Valid Huawei Cloud credentials (AK/SK mode), configured via the hcloud configure command
- Security Rules:
- Never expose AK/SK values in conversations or commands
- Never ask users to input AK/SK directly in conversation
- Only use the hcloud configure list command to check credential status
3. IAM Permission Requirements
dws:cluster:list(DWS cluster list permission)- See IAM Policies
Workflow
- Confirm the target region (default
cn-north-4if not specified). - Run the
hcloud DWS ListClusterscommand with--cli-region=. - Optionally filter by enterprise project with
--enterprise_project_id=. - Extract cluster names from the JSON response with
jq -r '.clusters[]?.name'. - Output the cluster name list; if none exist, report "No DWS clusters found in region ".
Core Commands
# List all DWS clusters and extract cluster names
hcloud DWS ListClusters --cli-region= | jq -r '.clusters[]?.name'
# List DWS clusters under a specific enterprise project
hcloud DWS ListClusters --cli-region= --enterprise_project_id= | jq -r '.clusters[]?.name'
# List clusters across all granted enterprise projects
hcloud DWS ListClusters --cli-region= --enterprise_project_id=all_granted_eps | jq -r '.clusters[]?.name'
# Full JSON output (when cluster details are also needed)
hcloud DWS ListClusters --cli-region=
Script Mode (quality-reporting integrated)
# Query DWS cluster names with execution-quality reporting (skill_quality_sdk)
python3 scripts/list_dws_clusters.py --region [--enterprise_project_id ]
The wrapper script scripts/list_dws_clusters.py runs the same hcloud command, extracts cluster names,
and reports execution quality (success/biz_fail/sys_fail + error codes) to the skillsopr operations console
via the vendored scripts/skill_quality_sdk.py. Reporting is silent on failure and never blocks the query.
Error Handling
Important: hcloud outputs non-JSON error text to stdout with exit code 0 for parameter/credential errors (invalid region, bad AK/SK, etc.). Do NOT rely on the shell exit code alone.
| Error scenario | hcloud behavior | Recommended handling |
|---|---|---|
Invalid --cli-region | stdout contains [USE_ERROR]The value of cli-region is not supported... + supported region list, exit 0 | Use the wrapper script (scripts/list_dws_clusters.py) which detects [USE_ERROR] / Failed to obtain project ID / Unauthorized markers regardless of exit code and reports the real cause; or run the bare hcloud command first to confirm the output is valid JSON before piping to jq |
| Invalid / expired AK/SK | stdout contains Failed to obtain project ID... Unauthorized, exit 0 | Wrapper reports "凭证认证失败" with guidance to check credential status via the hcloud configure list command and IAM dws:cluster:list permission |
| Network timeout | non-zero exit code | Wrapper reports network/timeout error (N01) |
The wrapper (_run_hcloud) checks hcloud output for [USE_ERROR], [OPENAPI_ERROR], Failed to obtain project ID,
error_code and Unauthorized markers before checking the exit code, then raises an exception that carries
both a translated fix hint and the raw hcloud output — so the real reason is never masked by a JSON parse fallback.
Response format (JSON):
{
"clusters": [
{"id": "xxx", "name": "cluster-1", "status": "AVAILABLE"},
{"id": "yyy", "name": "cluster-2", "status": "ACTIVE"}
],
"count": 2
}
Cluster names are extracted via jq -r '.clusters[]?.name'. When no clusters exist, the API returns {"clusters": [], "count": 0} and the skill reports "No DWS clusters found".
Parameter Confirmation
| Parameter | Required | Description | Example |
|---|---|---|---|
region | Yes | Huawei Cloud region for --cli-region | cn-north-4 |
enterprise_project_id | No | Enterprise project ID filter; all_granted_eps queries all authorized enterprise projects | all_granted_eps |
KooCLI Command Format Standard
hcloud --cli-region= [--key=value ...]
| Feature | Description | Example |
|---|---|---|
| Service name | Exact KooCLI Service name beginning with uppercase | DWS |
| Operation name | PascalCase | ListClusters |
| Region parameter | --cli-region= | --cli-region=cn-north-4 |
| Simple parameter | --key=value | --enterprise_project_id=all_granted_eps |
Reference Documents
- IAM Policies — Least-privilege IAM policy for DWS cluster listing
- CLI Installation Guide — KooCLI installation and configuration
- Verification Method — How to verify the skill works
- Data Flow Diagram — Mermaid diagram of the query flow
- Acceptance Criteria — Definition of done for this skill
相关技能
Query the total number of Huawei Cloud services available through KooCLI offline metadata. Returns the count of all supported cloud services from the cached service catalog. Triggers include: "how many Huawei Cloud services", "count Huawei Cloud services", "华为云服务总数", "华为云有多少个服务", "查询华为云服务数量".
Provides guidance for Huawei Cloud KooCLI command-line tool operations. Covers KooCLI installation, IAM authentication configuration, access credential confi...
Query the list of Huawei Cloud DDS (Document Database Service, 文档数据库服务) instances under the current tenant / project and return the DDS instance NAMES. By default the skill prints only the instance names (one per line); with extra flags it also returns id, status, mode, datastore engine, version and created time. Supports filtering by instance name, id, mode (Sharding/ReplicaSet/Single), datastore type (DDS-Community/DDS-Enhanced), VPC and subnet, plus pagination via limit/offset. Uses the KooCLI command `hcloud DDS ListInstances --cli-region={region}` (primary) or the huaweicloudsdkdds Python SDK (fallback). Read-only — never creates, modifies, deletes, restarts or stops any DDS instance. Use this skill whenever the user wants to list/inspect the DDS instances of the tenant or query the DDS instance name list, e.g. for database inventory, daily inspection, or cost review. Triggers include: "list DDS", "DDS list", "query DDS names", "DDS实例列表", "查询DDS", "DDS实例名称", "dds list", "how many
DWS cluster memory high root cause diagnosis skill, based on KooCLI v3.2.0+ and DWS Autopilot MCP Server. Automatically collects memory metrics, analyzes root causes (customer-side / system-side), and outputs a standardized diagnosis report. Applicable to DWS cluster memory usage too high, memory alarms, OOM scenarios. Trigger words: "内存高", "内存告警", "内存诊断", "内存使用率过高", "内存不足", "OOM", "内存溢出", "动态内存使用率超阈值", "high memory", "memory alarm", "memory diagnosis"
DWS cluster I/O overload root cause diagnosis skill, based on KooCLI v3.2.0+ and DWS Autopilot MCP Server. Automatically collects I/O metrics, analyzes root...