huawei-cloud-dws-list
БесплатноЗапускает вложенные скриптыНе проверен1. List Huawei Cloud DWS (Data Warehouse Service / GaussDB(DWS)) clusters in a tenant region through KooCLI (hcloud DWS ListClusters — read-only GET…
от wlc-dev411 установок в других каталогахОб этом скилле
Huawei Cloud DWS Cluster List
Overview
Query the DWS (Data Warehouse Service) cluster list of a tenant region through
KooCLI hcloud DWS ListClusters (official read-only
GET /v1.0/{project_id}/clusters, verified in the huaweicloudsdkdws v2 client
_list_clusters_http_info metadata — resource_path: "/v1.0/{project_id}/clusters").
The skill is aimed at DWS inventory inspection, daily operations patrol, and as a
pre-query step for other DWS skills that need a cluster_id.
Architecture:
agent → python3 scripts/list_dws.py → hcloud DWS ListClusters --cli-region=<region>
→ Huawei Cloud DWS OpenAPI (regional endpoint) → parsed JSON → table / --json / --names-only
(hcloud binary missing) → fallback: huaweicloudsdkdws v2 DwsClient.list_clusters
Key properties:
- Read-only by design — the only API ever invoked is
ListClusters(GET). A write-intent guard scans user arguments and validates the operation name; mutating intents (create / delete / update / resize / restart / stop / restore / upgrade / reboot ...) are rejected with an explicit message before any command runs. - CLI first, SDK fallback — KooCLI is the primary execution path; when the
hcloud binary is absent, the script falls back to the official
huaweicloudsdkdwsv2 SDK (list_clusters). Credentials are always read by the CLI profile / SDK environment — never handled by the script. - Full-field table output — the default table renders the union of all
fields returned by ListClusters, with
endpoints/public_endpoints/public_ipflattened into readableendpoint/public_endpoint/publicIpcolumns. - Client-side filters & paging — the real ListClusters API has no name / id /
status / limit / offset parameters (only
enterprise_project_id); the script fetches the full list in a single call and applies those filters locally. - Offline-testable — every code path (filters, paging, error classification, guard, SDK fallback) is covered by unit tests that mock the hcloud subprocess.
Out of scope: every mutating DWS action (create / delete / resize / restart / stop / restore snapshot / reset password / upgrade / reboot). Those require a dedicated write-capable skill and explicit user confirmation.
Prerequisites
- KooCLI (
hcloud) installed — see references/cli-installation-guide.md. Alternative:pip install huaweicloudsdkdwsto enable the SDK fallback path. - Active credential profile — configure credentials out-of-band
(
hcloud configurein your terminal, or credential environment variables). Never paste AK/SK into chat; the script never reads, echoes, or stores secrets itself — authentication is delegated entirely to the hcloud profile / SDK environment. - IAM permission — read-only DWS list permission; least-privilege policy in references/iam-policies.md.
- Python 3.8+ (standard library only — argparse / json / subprocess).
- Outbound HTTPS access to
*.myhuaweicloud.com.
Workflow
- Confirm the target region (default
cn-north-4); every DWS call is region-scoped. - Confirm hcloud readiness (optional, read-only):
hcloud configure list. - Run the list script with the desired output mode and filters.
- Read the result — table for humans,
--jsonfor downstream tooling,--names-onlyfor a compact inventory. - Handle the empty / error cases per the Edge Cases table below (the script prints an explicit hint for empty region, 403, and missing AK/SK).
Core Commands
# Full-field table (default)
python3 scripts/list_dws.py --region cn-north-4
# Raw JSON of every returned field
python3 scripts/list_dws.py --json
# Compact cluster-name list only
python3 scripts/list_dws.py --names-only
# Filter by cluster status (client-side exact, case-insensitive)
python3 scripts/list_dws.py --status AVAILABLE
# Filter by name (client-side substring) / exact ID
python3 scripts/list_dws.py --name dws-demo
python3 scripts/list_dws.py --cluster-id 6f8f7b0a-...
# Client-side pagination and the real enterprise-project API parameter
python3 scripts/list_dws.py --limit 20 --offset 0 --enterprise-project-id 0
# Combine filters
python3 scripts/list_dws.py --region cn-south-1 --status AVAILABLE \
--limit 10 --names-only
Equivalent direct KooCLI command (the script wraps exactly this call):
hcloud DWS ListClusters --cli-region=cn-north-4
hcloud DWS ListClusters --cli-region=cn-north-4 --enterprise_project_id=0
Parameter Confirmation
| Parameter | Required | Description | Example |
|---|---|---|---|
--region / -r |
No | Huawei Cloud region (default cn-north-4) |
cn-south-1 |
--json |
No | Output the raw cluster array as JSON | — |
--names-only |
No | Output cluster names only | — |
--name |
No | Filter by cluster name — **appli |
Установить huawei-cloud-dws-list в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл huawei-cloud-dws-list?
1. List Huawei Cloud DWS (Data Warehouse Service / GaussDB(DWS)) clusters in a tenant region through KooCLI (hcloud DWS ListClusters — read-only GET /v1.0/{project_id}/clusters), with an automatic fallback to the official huaweicloudsdkdws v2 SDK when hcloud is not installed. 2. Three output modes: full-field table (default, every returned field including 名称/ID/状态/版本/规格/节点数/可用区/连接信息), --json (raw response array), and --names-only (compact cluster-name list). 3. Supports --name / --status / --cluster-id filtering, --limit / --offset pagination, region override, and the real --enterprise-project-id API parameter. --name / --status / --cluster-id / --limit / --offset are applied client-side (the real ListClusters API exposes only enterprise_project_id). 4. Explicit error hints for empty cluster lists (「当前区域无 DWS 集群」), 403 / insufficient IAM permission (「无权限访问 DWS,请检查 IAM 权限」), missing or invalid AK/SK credentials, and hcloud not installed. 5. Built-in write-intent guard: any mutating intent (create / delete / update / resize / restart / stop / restore / upgrade / reboot) or any operation other than ListClusters is rejected before execution — this skill is strictly read-only. 6. Triggers include: "list DWS clusters", "DWS cluster list", "DWS 集群列表", "查询DWS集群", "数据仓库集群列表", "GaussDB(DWS) 列表", "DWS inventory", "list data warehouse clusters", "华为云DWS集群". 7. Offline unit tests (mocked hcloud subprocess) cover output modes, filters, pagination, error scenarios, SDK fallback, and the write-intent guard.
Как установить скилл huawei-cloud-dws-list?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл huawei-cloud-dws-list запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic