huaweicloud/huaweicloud-skills/huawei-cloud-apig-instance-management
Claude Code and agent skill by huaweicloud/huaweicloud-skills
- community
Checking that the SKILL.md file is still in the repository.
Manage Huawei Cloud APIG (API Gateway, dedicated instances) via hcloud CLI: instance lifecycle (create/list/delete), API groups, API create/update/delete, publish/offline, request throttling policies, signature keys, access control (ACL) policies, and public ingress EIP binding, plus read-only diagnosis of public access (eip_address vs sl_domain), the instance -> group -> API -> publish chain, and policy effectiveness. Delete operations require explicit user confirmation; instance creation is a 5-15 minute async operation that must be polled until status == Running. Triggers include: APIG, API gateway, API 分组, API 管理, 流控策略, throttling, 签名密钥, signature key, 访问控制, ACL 策略, access control, publish API, 发布 API, 下线 API, 实例管理, 公网访问, ingress EIP, 策略生效诊断, API 网关排障.
Install
npx vskill@latest install huaweicloud/huaweicloud-skills/huawei-cloud-apig-instance-managementSKILL.md
The same SKILL.md was published earlier as huaweicloud/huaweicloud-skills/huawei-cloud-apig-instance-management.
Huawei Cloud APIG API Gateway Management
<!-- cli-install-version: 3.9.0 -->
Step 0: Install skill-quality-cli (idempotent, skip if already installed)
The CLI installs into ~/.local/bin/, which is not always in `$PATH` (bare skill-quality-cli may exit 127). Export it first, then run the installer (it also persists the PATH export into ~/.bashrc / ~/.profile):
The script installs the bundledscripts/cli/sources to~/.local/bin/whenskill-quality-cliis not found (offline, no external download),re-exports PATH into~/.bashrc/~/.profile; it never blocks. If still not found, call the absolute path:~/.local/bin/skill-quality-cli.
Overview
This skill manages Huawei Cloud APIG (API Gateway) dedicated instances and their resources through the hcloud CLI (KooCLI). It covers instance lifecycle management, API groups, API create/update, batch publish/offline, request throttling policies, signature keys, access control (ACL) policies, and public ingress EIP binding, together with read-only diagnosis of public access configuration, the publish chain, and policy effectiveness.
Capabilities (24 `huawei_*` actions):
| Category | Level | Actions | |
|---|---|---|---|
| Query | R3 (read-only, auto) | huawei_list_apig_instances, huawei_get_apig_instance, huawei_list_apig_api_groups, huawei_list_apig_apis, huawei_list_apig_throttling_policies, huawei_list_apig_signature_keys, huawei_list_apig_access_control_policies | |
| Analyze | R3 (read-only, auto) | huawei_analyze_apig_public_access, huawei_analyze_apig_publish_chain, huawei_analyze_apig_policy_effect | |
| Manage | R2 (preview + confirm) | huawei_create_apig_instance, huawei_add_apig_ingress_eip, huawei_create_apig_api_group, huawei_create_apig_api, huawei_update_apig_api, huawei_publish_apig_api, huawei_create_apig_throttling_policy, huawei_create_apig_signature_key, huawei_create_apig_access_control_policy | |
| Manage (delete) | R1 (preview + explicit confirm) | huawei_delete_apig_instance, huawei_delete_apig_api, huawei_delete_apig_api_group, huawei_delete_apig_signature_key, huawei_delete_apig_access_control_policy |
NOT covered by this skill (use the Huawei Cloud APIG console for these): app credentials (apps/AppCode), API plugins, API acl bindings, domain binding, API group update/rename, and any other APIG operations not listed above. Requests for these operations must be declined explicitly.
All commands use the operation names exactly as enumerated by the KooCLI APIG help output (e.g. throttling policies use the RequestThrottlingPolicyV2 naming, not ThrottlingPolicyV2).
Dependency: Quality telemetry is collected automatically via skill-quality-cli (installed by scripts/ensure_cli.sh if absent).
Critical Warnings
| # | Trap | Why | |
|---|---|---|---|
| 1 | API group region-locked | An API group cannot move across regions. Create it in the target region from the start. | |
| 2 | Throttling default is per-API | The default throttling policy applies per API. Use app-level quotas (--app_call_limits) for per-user limits. | |
| 3 | CORS must be explicit | OPTIONS preflight fails until CORS is configured on the API (--cors=true). | |
| 4 | BASIC spec has no public IP | Use PROFESSIONAL + --loadbalancer_provider=elb for public access (lvs is internal-only). | |
| 5 | Instance creation takes 5-15 min | Long-running async operation. The final state is Running (NOT "SUCCESS"). Poll with ListInstancesV2 and wait for status == "Running". | |
| 6 | sl_domain is from the API Group | NOT from the instance. Get it from CreateApiGroupV2 / ListApiGroupsV2 response. It is an internal-only domain and may NXDOMAIN from the public internet — for public access use the instance eip_address. | |
| 7 | API / throttling policy names must NOT have hyphens | [a-zA-Z0-9_]+ only. Hyphens cause regex validation failure (verified for CreateRequestThrottlingPolicyV2 too, APIG.2011). | |
| 8 | VPC params need prefix | --vpc.name=<n> / --subnet.vpc_id=<id> / --security_group.name=<n> with KooCLI 7.x. | |
| 9 | AddIngressEipV2 works only with elb provider | AddEipV2 (without "Ingress") requires the lvs provider. Ingress bandwidth minimum is 5 Mbit/s. | |
| 10 | Signature key types have per-type value rules | hmac key 8-32 chars / secret 16-64; aes key length depends on algorithm (aes-128-cfb=16, aes-256-cfb=32). Omitting --sign_key/--sign_secret lets APIG auto-generate them. | |
| 11 | ACL policy with API bindings cannot be deleted | DeleteAclV2 fails (APIG error) while the policy is still bound to APIs. Unbind (BatchDeleteAclV2, R1 delete action in APP/console) first. | |
| 12 | ACL acl_value semantics depend on entity_type | For IP it is an IP/whitelist (max 100, comma-separated); for DOMAIN it is an account name (NOT a web domain). DOMAIN_ID uses the account ID. |
Prerequisites
- hcloud CLI installed and authenticated — see
references/cli-installation-guide.md - Authentication: AK/SK via environment variables (
HUAWEI_ACCESS_KEY/
HUAWEI_SECRET_KEY or any HUAWEI*/HW* pair containing access/secret key) or a local KooCLI profile created with the configure command
- Region: APIG is region-specific. Always pass
--cli-region={region}(e.g.cn-north-4,ap-southeast-1); if omitted, the profile region is used. - IAM permissions — see
references/iam-policies.mdfor least-privilege policies - Always discover parameters with
hcloud APIG <Operation> --helpbefore executing an operation you are not sure about.
- `skill-quality-cli` — ensured by
bash scripts/ensure_cli.sh(idempotent, skips if present) - Upgrade: run
skill-quality-cli upgrademanually (no auto-upgrade) - Disable telemetry report: set
SKILL_QUALITY_REPORT=0
Workflow
Core Commands
Command naming: operation names are taken verbatim from the KooCLI APIG help enumeration. Service name APIG is shown in the CLI help (the KooCLI metadata directory is lowercase apig; both forms are accepted).
Command format & execution rule. Each command below is shown in itscanonical barehcloud APIG <Operation> ...form first — this is the syntaxused for parameter discovery (--help) and the form read by skill evaluationtooling — immediately followed by the equivalentskill-quality-cli runwrapped form used at execution time. **Every hcloud command executed by thisskill MUST be wrapped withskill-quality-cli run** (mandatory rule — seeStep 0 and the Prerequisitesskill-quality-clientry) — the wrapper adds noarguments and only changes the reporting behaviour.
Query — Instances
huawei_list_apig_instances — list APIG instances and status (including eip_address):
| Parameter | Required | Description | |
|---|---|---|---|
--cli-region | Yes (auto) | Region, agent fills automatically | |
--limit | No | Items per page, default 20 (max 500) | |
--offset | No | Query offset (default 0) | |
--status | No | Filter by gateway status, e.g. Running, Creating, Deleting |
huawei_get_apig_instance — query a single instance detail:
Empty result means NOT found:ListInstancesV2returns{"total": 0, "instances": []}(exit 0, no error) when the instance does notexist. Report "实例不存在,请确认 instance_id" instead of treating it as asuccessful query.
| Parameter | Required | Description | |
|---|---|---|---|
--instance_id | No | Gateway ID (pass it to narrow to one instance) |
Query — API Groups
huawei_list_apig_api_groups — list API groups (response includes sl_domain):
| Parameter | Required | Description | |
|---|---|---|---|
--instance_id | Yes | Gateway ID | |
--limit / --offset | No | Pagination | |
--name / --id | No | Filter by group name / ID |
Query — APIs
huawei_list_apig_apis — list APIs in an instance:
| Parameter | Required | Description | |
|---|---|---|---|
--instance_id | Yes | Gateway ID | |
--group_id | No | Filter by API group ID | |
--name / --id | No | Filter by API name / ID | |
--req_method / --req_uri | No | Filter by method / URI | |
--auth_type | No | Filter by auth type (IAM/APP/NONE) |
Query — Throttling Policies
huawei_list_apig_throttling_policies — list request throttling policies (operation name per the KooCLI APIG help enumeration):
| Parameter | Required | Description | |
|---|---|---|---|
--instance_id | Yes | Gateway ID | |
--name / --id | No | Filter by policy name / ID | |
--limit / --offset | No | Pagination |
Query — Signature Keys
huawei_list_apig_signature_keys — list signature keys (operation name per the KooCLI APIG help enumeration):
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/middleware/apig/huawei-cloud-apig-instance-management/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/huaweicloud/huaweicloud-skills/huawei-cloud-apig-instance-management)