huawei-cloud-apig-instance-list
БесплатноЗапускает вложенные скриптыНе проверен1. List Huawei Cloud APIG dedicated instances in a tenant region through KooCLI (hcloud APIG ListInstancesV2 — read-only GET…
от wlc-dev190 установок в других каталогахОб этом скилле
Huawei Cloud APIG Dedicated Instance List
Overview
Query the APIG (API Gateway) dedicated instance inventory of a tenant through
KooCLI hcloud APIG ListInstancesV2 --cli-region=<region> (official read-only GET
/v2/{project_id}/apigw/instances), and optionally drill down into one
instance's API inventory through hcloud APIG ListApisV2 --cli-region=<region> (official read-only
GET /v2/{project_id}/apigw/instances/{instance_id}/apis). Both endpoints and
parameter names were verified against the official huaweicloudsdkapig v2
client metadata (_list_instances_v2_http_info,
_list_apis_v2_http_info) and the KooCLI --help output at build time.
Architecture:
agent → python3 scripts/list_apig_instances.py → hcloud APIG ListInstancesV2 --cli-region=<region>
→ Huawei Cloud APIG OpenAPI (apig.<region>.myhuaweicloud.com)
→ parsed JSON → compact list / --table / --json
(--instance-id) → hcloud APIG ListApisV2 --instance_id=<id> → API list of that instance
(hcloud binary missing) → fallback: huaweicloudsdkapig v2 ApigClient
.list_instances_v2 / .list_apis_v2
Key properties:
- Read-only by design — the only APIs ever invoked are
ListInstancesV2andListApisV2(both GET).build_command()cannot construct anything else, and a write-intent guard rejects mutating intents before any command runs. - CLI first, SDK fallback — KooCLI is the primary execution path; when the
hcloudbinary is absent the script falls back to the officialhuaweicloudsdkapigv2 SDK. Credentials are always resolved by the CLI profile / SDK environment — never handled by the script. - Instance → API drill-down —
--instance-idfirst verifies the instance exists (a ListInstancesV2 call filtered byinstance_id), then lists that instance's APIs; an unknown id yields an explicit实例不存在error (exit 1). - Offline-testable — paging, filters, output modes, error classification, the guard and the SDK fallback are all covered by unit tests that mock the KooCLI subprocess (no credentials, no network).
Out of scope: every mutating APIG action (create / delete / update instances, publish / offline APIs, bind / unbind EIP), other APIG objects (groups, environments, apps, plugins, ACLs, throttling policies, signatures), and non-APIG services. Those require dedicated write-capable skills with explicit user confirmation.
Prerequisites
- KooCLI (
hcloud) installed — see references/cli-installation-guide.md. Alternative:pip install huaweicloudsdkcore huaweicloudsdkapigto enable the SDK fallback path. - Active credential profile — configure credentials out-of-band (run the KooCLI configure command in your terminal, or set credential environment variables). Never paste AK/SK into chat; the script never reads, echoes or stores secrets — authentication is delegated entirely to the hcloud profile / SDK environment.
- project_id (SDK fallback only) — both REST paths carry
{project_id}; when falling back to the SDK, supply it via--project-idor theHUAWEICLOUD_SDK_PROJECT_ID/HUAWEI_PROJECT_IDenvironment variables. The KooCLI path resolves it from the profile automatically. - IAM permission — read-only
apig:instances:list(instances) andapig:apis:list(APIs); least-privilege policy in references/iam-policies.md. - Python 3.8+ (standard library only — argparse / json / subprocess).
- Outbound HTTPS access to
apig.cn-north-4.myhuaweicloud.com.
Workflow
- Confirm the target region (default
cn-north-4). - (Optional, read-only) confirm KooCLI readiness by listing the active credential profile.
- Run the list script with the desired output mode and filters; add
--instance-idto drill down into one instance's API list. - Read the result — compact list for humans,
--tablefor a fixed-column overview,--jsonfor downstream tooling. - Handle the empty / error cases per the Error Handling table (the script prints explicit hints for an empty region, 403, missing AK/SK, parameter errors and a non-existent instance).
Core Commands
# Compact list (default): 名称 / 实例ID / 状态
python3 scripts/list_apig_instances.py --region cn-north-4
# Fixed-column table: 实例ID/名称/状态/规格/版本/可用区/EIP/VPC/创建时间
python3 scripts/list_apig_instances.py --table
# Raw response records as JSON
python3 scripts/list_apig_instances.py --json
# Client-side filters: exact name, fuzzy name, status
python3 scripts/list_apig_instances.py --name apig-prod-01
python3 scripts/list_apig_instances.py --name apig --fuzzy
python3 scripts/list_apig_instances.py --status Running
# Drill down: list the APIs of one instance (validates the id first)
python3 scripts/list_apig_instances.py --instance-id c16795b9553d422a8cb1977a2279113f
python3 scripts/list_apig_instances.py --instance-id
Установить huawei-cloud-apig-instance-list в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл huawei-cloud-apig-instance-list?
1. List Huawei Cloud APIG dedicated instances in a tenant region through KooCLI (hcloud APIG ListInstancesV2 — read-only GET /v2/{project_id}/apigw/instances), with an automatic fallback to the official huaweicloudsdkapig v2 SDK when hcloud is not installed. 2. Drill down into one instance's API inventory with --instance-id (hcloud APIG ListApisV2 — read-only GET /v2/{project_id}/apigw/instances/{instance_id}/apis); an unknown instance id is reported explicitly with a non-zero exit code. 3. Three output modes: compact list (default — instance name / id / status), --table (实例ID/名称/状态/规格/版本/可用区/EIP/VPC/创建时间), and --json (raw response records). 4. Client-side filters --name (--fuzzy for substring match), --instance-id and --status; --region override (default cn-north-4); --limit 1-100 with automatic offset/limit paging. 5. Explicit error hints for empty instance lists, 403 / insufficient IAM permission, missing or invalid AK/SK credentials, [USE_ERROR] parameter errors, and a non-existent instance id. 6. Built-in write-intent guard: any mutating intent (create / delete / update / publish / offline / bind-eip / unbind-eip / ...) is rejected before execution — this skill is strictly read-only. 7. Triggers include: "list APIG instances", "APIG 实例列表", "查询APIG实例", "APIG 专享版实例", "apig instance inventory", "查询实例API列表", "APIG API 列表", "apig gateway list".
Как установить скилл huawei-cloud-apig-instance-list?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл huawei-cloud-apig-instance-list запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic