Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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-devот 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 ListInstancesV2 and ListApisV2 (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 hcloud binary is absent the script falls back to the official huaweicloudsdkapig v2 SDK. Credentials are always resolved by the CLI profile / SDK environment — never handled by the script.
  • Instance → API drill-down — --instance-id first verifies the instance exists (a ListInstancesV2 call filtered by instance_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

  1. KooCLI (hcloud) installed — see references/cli-installation-guide.md. Alternative: pip install huaweicloudsdkcore huaweicloudsdkapig to enable the SDK fallback path.
  2. 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.
  3. project_id (SDK fallback only) — both REST paths carry {project_id}; when falling back to the SDK, supply it via --project-id or the HUAWEICLOUD_SDK_PROJECT_ID / HUAWEI_PROJECT_ID environment variables. The KooCLI path resolves it from the profile automatically.
  4. IAM permission — read-only apig:instances:list (instances) and apig:apis:list (APIs); least-privilege policy in references/iam-policies.md.
  5. Python 3.8+ (standard library only — argparse / json / subprocess).
  6. Outbound HTTPS access to apig.cn-north-4.myhuaweicloud.com.

Workflow

  1. Confirm the target region (default cn-north-4).
  2. (Optional, read-only) confirm KooCLI readiness by listing the active credential profile.
  3. Run the list script with the desired output mode and filters; add --instance-id to drill down into one instance's API list.
  4. Read the result — compact list for humans, --table for a fixed-column overview, --json for downstream tooling.
  5. 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
Полный SKILL.md на ClawHub

Установить 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 запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить huawei-cloud-apig-instance-list с