huaweicloud-devkit 1.0.2-next.3 → 1.0.3-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/plugins/marketplace.json +20 -20
- package/LICENSE +201 -201
- package/README.md +139 -163
- package/README.zh-CN.md +139 -161
- package/bin/setup.cjs +8 -8
- package/integrations/opencode/commands/huaweicloud-doctor.md +14 -14
- package/integrations/opencode/opencode.json +14 -14
- package/integrations/opencode/skills/huaweicloud-core/SKILL.md +32 -32
- package/package.json +44 -47
- package/plugins/huaweicloud-core/.claude-plugin/plugin.json +44 -44
- package/plugins/huaweicloud-core/.codex-plugin/plugin.json +43 -43
- package/plugins/huaweicloud-core/.cursor-plugin/plugin.json +44 -44
- package/plugins/huaweicloud-core/.mcp.json +15 -15
- package/plugins/huaweicloud-core/.workbuddy-plugin/plugin.json +44 -44
- package/plugins/huaweicloud-core/hooks/hooks.json +26 -26
- package/plugins/huaweicloud-core/hooks/huaweicloud-safety.py +136 -136
- package/plugins/huaweicloud-core/safety/policy.json +99 -99
- package/plugins/huaweicloud-core/safety/rules/cloud-risk-rules.json +199 -199
- package/plugins/huaweicloud-core/skills/huawei-apig/SKILL.md +164 -164
- package/plugins/huaweicloud-core/skills/huawei-billing/SKILL.md +48 -48
- package/plugins/huaweicloud-core/skills/huawei-cbr/SKILL.md +50 -50
- package/plugins/huaweicloud-core/skills/huawei-cce/SKILL.md +101 -101
- package/plugins/huaweicloud-core/skills/huawei-cloud-eye/SKILL.md +90 -90
- package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/SKILL.md +190 -190
- package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/scripts/search-skills.mjs +124 -124
- package/plugins/huaweicloud-core/skills/huawei-cts/SKILL.md +55 -55
- package/plugins/huaweicloud-core/skills/huawei-dds-dcs/SKILL.md +70 -70
- package/plugins/huaweicloud-core/skills/huawei-deployment/SKILL.md +56 -56
- package/plugins/huaweicloud-core/skills/huawei-dew/SKILL.md +97 -97
- package/plugins/huaweicloud-core/skills/huawei-dew/references/csms-usage.md +29 -29
- package/plugins/huaweicloud-core/skills/huawei-dew/references/kms-usage.md +23 -23
- package/plugins/huaweicloud-core/skills/huawei-ecs/SKILL.md +185 -185
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/create-instance.md +133 -133
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/evs.md +31 -31
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/flavors.md +55 -55
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/troubleshooting.md +52 -52
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/SKILL.md +131 -131
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/apig-event-format.md +58 -58
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/create-function.md +71 -71
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/deploy-workflow.md +119 -119
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/triggers.md +142 -142
- package/plugins/huaweicloud-core/skills/huawei-gaussdb/SKILL.md +56 -56
- package/plugins/huaweicloud-core/skills/huawei-getting-started/SKILL.md +65 -65
- package/plugins/huaweicloud-core/skills/huawei-iam/SKILL.md +111 -111
- package/plugins/huaweicloud-core/skills/huawei-iam/references/policy-examples.md +122 -122
- package/plugins/huaweicloud-core/skills/huawei-iam/references/quick-ref.md +56 -56
- package/plugins/huaweicloud-core/skills/huawei-modelarts/SKILL.md +65 -65
- package/plugins/huaweicloud-core/skills/huawei-obs/SKILL.md +127 -133
- package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-create.md +49 -49
- package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-lifecycle.md +26 -26
- package/plugins/huaweicloud-core/skills/huawei-obs/references/common-pitfalls.md +100 -100
- package/plugins/huaweicloud-core/skills/huawei-obs/references/single-file-share.md +40 -40
- package/plugins/huaweicloud-core/skills/huawei-obs/references/static-website.md +56 -56
- package/plugins/huaweicloud-core/skills/huawei-rds/SKILL.md +224 -224
- package/plugins/huaweicloud-core/skills/huawei-sandbox/SKILL.md +134 -139
- package/plugins/huaweicloud-core/skills/huawei-smn-dms/SKILL.md +69 -69
- package/plugins/huaweicloud-core/skills/huawei-vpc/SKILL.md +84 -84
- package/plugins/huaweicloud-core/skills/huawei-vpc/references/network.md +76 -76
- package/plugins/huaweicloud-core/skills/huawei-vpc/references/security-group.md +59 -59
- package/plugins/huaweicloud-core/skills/huawei-vpc/references/subnet.md +50 -50
- package/plugins/huaweicloud-core/skills/huawei-waf-aad/SKILL.md +63 -63
- package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/SKILL.md +56 -56
- package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/agents/openai.yaml +4 -4
- package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/SKILL.md +47 -51
- package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/agents/openai.yaml +4 -4
- package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/SKILL.md +128 -128
- package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/agents/openai.yaml +4 -4
- package/plugins/huaweicloud-core/skills/huaweicloud-core/SKILL.md +95 -110
- package/plugins/huaweicloud-core/skills/huaweicloud-core/agents/openai.yaml +4 -4
- package/plugins/huaweicloud-core/skills/huaweicloud-core/references/report-issue.md +19 -19
- package/plugins/huaweicloud-core/skills/huaweicloud-core/references/select.md +27 -27
- package/plugins/huaweicloud-core/skills/huaweicloud-safety/SKILL.md +60 -60
- package/plugins/huaweicloud-core/skills/huaweicloud-safety/agents/openai.yaml +4 -4
- package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/SKILL.md +83 -83
- package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/agents/openai.yaml +4 -4
- package/plugins/huaweicloud-core/src/auth/agent-registration.mjs +87 -105
- package/plugins/huaweicloud-core/src/auth/credentials.mjs +95 -95
- package/plugins/huaweicloud-core/src/auth/service.mjs +63 -63
- package/plugins/huaweicloud-core/src/hcloud-cli.mjs +265 -265
- package/plugins/huaweicloud-core/src/mcp-server.mjs +129 -129
- package/plugins/huaweicloud-core/src/risk-rule-engine.mjs +137 -137
- package/plugins/huaweicloud-core/src/safety-policy.mjs +302 -302
- package/plugins/huaweicloud-core/src/sandbox/hdkitservice-api.mjs +87 -91
- package/plugins/huaweicloud-core/src/sandbox/hwlink-api.mjs +153 -162
- package/plugins/huaweicloud-core/src/sandbox/session-manager.mjs +105 -112
- package/plugins/huaweicloud-core/src/search-market.mjs +169 -174
- package/plugins/huaweicloud-core/src/setup-cli.mjs +1594 -2017
- package/plugins/huaweicloud-core/src/tools.mjs +993 -1008
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-exec-client.js +427 -427
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-fair-queue.js +132 -132
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-multiplexer.js +227 -227
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-packet.js +202 -202
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-terminal-channel.js +158 -158
- package/plugins/huaweicloud-core/src/ws-exec/index.js +19 -19
- package/plugins/huaweicloud-core/src/ws-exec/ws-exec-client.js +338 -338
- package/plugins/huaweicloud-core/src/proxy/proxy-agent.mjs +0 -155
- package/plugins/huaweicloud-core/src/proxy/proxy-config.mjs +0 -87
|
@@ -1,164 +1,164 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: huawei-apig
|
|
3
|
-
description: "Use when creating or managing API Gateway (APIG). Covers API creation, throttling, auth (IAM/APP/basic), CORS, publishing, instance management. Triggers: APIG, API gateway, throttling, publish API. NOT for: FunctionGraph triggers (use huawei-functiongraph)."
|
|
4
|
-
version: 1
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Huawei Cloud APIG
|
|
8
|
-
|
|
9
|
-
**STOP - Do not answer from general knowledge.** Follow the procedure below.
|
|
10
|
-
|
|
11
|
-
## Overview
|
|
12
|
-
|
|
13
|
-
Domain expertise for Huawei Cloud API Gateway (APIG). Covers instance lifecycle, API group/API creation, publishing, and FunctionGraph trigger integration.
|
|
14
|
-
|
|
15
|
-
Always discover parameters with `hcloud APIG <Operation> --help` before executing.
|
|
16
|
-
|
|
17
|
-
## Critical Warnings
|
|
18
|
-
|
|
19
|
-
| Trap | Why |
|
|
20
|
-
|------|-----|
|
|
21
|
-
| API group region-locked | Cannot move across regions |
|
|
22
|
-
| Throttling per-API default | Use app-level quotas for per-user limits |
|
|
23
|
-
| CORS must be explicit | OPTIONS preflight fails until configured |
|
|
24
|
-
| `BASIC` spec has no public IP | Use `PROFESSIONAL` + `elb` provider for public access |
|
|
25
|
-
| Instance creation takes 5-15min | Long-running async operation. State is **Running** (NOT "SUCCESS"). Poll with `ListInstancesV2`, wait for `status == "Running"` |
|
|
26
|
-
| `sl_domain` is from API **Group** | NOT from Instance. Get it from `CreateApiGroupV2` or `ListApiGroupsV2` response |
|
|
27
|
-
| API name must NOT have hyphens | `[a-zA-Z0-9_]+` only. Hyphens cause regex validation failure |
|
|
28
|
-
| VPC params need prefix | `--vpc.name=<n>` / `--subnet.vpc_id=<id>` / `--security_group.name=<n>` with KooCLI 7.x |
|
|
29
|
-
|
|
30
|
-
## Instance Management
|
|
31
|
-
|
|
32
|
-
### Check Existing Instances
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
hcloud APIG ListInstancesV2 --cli-region=<r>
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### Create Instance
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
hcloud APIG CreateInstanceV2 --help
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Key gotchas when creating:
|
|
45
|
-
|
|
46
|
-
| Param | Note |
|
|
47
|
-
|-------|------|
|
|
48
|
-
| `--spec_id` | `BASIC` (no public access), `PROFESSIONAL` (requires `--loadbalancer_provider`) |
|
|
49
|
-
| `--loadbalancer_provider` | `elb` for public access (supports `AddIngressEipV2`), `lvs` for internal only (supports `AddEipV2`) |
|
|
50
|
-
| `--enterprise_project_id` | **Required** for enterprise accounts. Use `"0"` for default project |
|
|
51
|
-
| `--available_zone_ids` | Use AZ code like `ap-southeast-3a`, NOT UUID from `ListAvailableZonesV2` |
|
|
52
|
-
| `--vpc_id`, `--subnet_id` | Must exist in the target region |
|
|
53
|
-
| `--security_group_id` | **Required**. Create a security group first via `VPC CreateSecurityGroup` (VPC v3 API — no `vpc_id` param needed) |
|
|
54
|
-
|
|
55
|
-
### Add Public Access (ELB Provider Only)
|
|
56
|
-
|
|
57
|
-
`BASIC` instances have no public IP. Use `PROFESSIONAL` + `elb` provider for public access (`lvs` is internal-only).
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
hcloud APIG AddIngressEipV2 \
|
|
61
|
-
--instance_id=<id> \
|
|
62
|
-
--bandwidth_charging_mode=bandwidth \
|
|
63
|
-
--bandwidth_size=<size>
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
To use an existing EIP instead of creating a new one:
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
|
-
hcloud APIG AddIngressEipV2 \
|
|
70
|
-
--instance_id=<id> \
|
|
71
|
-
--eip_id=<existing-eip-id>
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
> `AddIngressEipV2` only works with `elb` provider. `AddEipV2` (without "Ingress") requires `lvs` provider. Bandwidth minimum is 5 Mbps.
|
|
75
|
-
|
|
76
|
-
**Verification** — After binding, poll the instance to confirm EIP is active:
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
hcloud APIG ListInstancesV2 --cli-region=<region> --instance_id=<id> --cli-output=json | jq '.instances[0].eip_address'
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
Wait for `eip_address` to show a valid IP (may take up to 2 minutes). If `eip_address` is still `null` after 2 minutes, the EIP may not have been assigned.
|
|
83
|
-
|
|
84
|
-
> **Trap**: `sl_domain` from `CreateApiGroupV2` is an **internal-only** domain (e.g., `*.apic.cn-north-4.huaweicloudapis.com`). It may resolve to internal IP only (NXDOMAIN from public internet). **For public access, always use the `eip_address` from the instance**, not the `sl_domain` or trigger `invoke_url`.
|
|
85
|
-
|
|
86
|
-
## API Group
|
|
87
|
-
|
|
88
|
-
```bash
|
|
89
|
-
hcloud APIG CreateApiGroupV2 --instance_id=<id> --name=<n>
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
| Param | Note |
|
|
93
|
-
|-------|------|
|
|
94
|
-
| `--name` | Group name (required) |
|
|
95
|
-
| `--remark` | Description (optional) |
|
|
96
|
-
|
|
97
|
-
## API Management
|
|
98
|
-
|
|
99
|
-
```bash
|
|
100
|
-
hcloud APIG CreateApiV2 --help
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
## Publishing
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
hcloud APIG BatchPublishOrOfflineApiV2 \
|
|
107
|
-
--instance_id=<id> \
|
|
108
|
-
--action=online \
|
|
109
|
-
--env_id=<env-id> \
|
|
110
|
-
--apis.1=<api-id>
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
> The operation is `BatchPublishOrOfflineApiV2`, NOT `PublishApiV2`. The parameter is `apis.1` (1-based array), NOT `api_ids`. For multiple APIs, use `--apis.1`, `--apis.2`, etc.
|
|
114
|
-
|
|
115
|
-
## Throttling
|
|
116
|
-
|
|
117
|
-
```bash
|
|
118
|
-
hcloud APIG CreateThrottlingPolicyV2 --name=<n> --api_call_limits=1000
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
## Common Workflows
|
|
122
|
-
|
|
123
|
-
| Task | Operation |
|
|
124
|
-
|------|-----------|
|
|
125
|
-
| List instances | `ListInstancesV2` |
|
|
126
|
-
| Create instance | `CreateInstanceV2` |
|
|
127
|
-
| Delete instance | `DeleteInstancesV2` |
|
|
128
|
-
| Add public EIP | `AddIngressEipV2` |
|
|
129
|
-
| Create API group | `CreateApiGroupV2` |
|
|
130
|
-
| Create API | `CreateApiV2` |
|
|
131
|
-
| Update API | `UpdateApiV2` — change auth mode, path, etc. |
|
|
132
|
-
| List APIs | `ListApisV2` |
|
|
133
|
-
| Publish | `BatchPublishOrOfflineApiV2` |
|
|
134
|
-
| List APIs | `ListApisV2` |
|
|
135
|
-
|
|
136
|
-
## FunctionGraph Integration
|
|
137
|
-
|
|
138
|
-
To expose a FunctionGraph function via HTTP, you need the complete chain:
|
|
139
|
-
|
|
140
|
-
```
|
|
141
|
-
APIG Instance → API Group → DEDICATEDGATEWAY Trigger → Publish
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
After the trigger is created on FunctionGraph side, publish the API in APIG:
|
|
145
|
-
|
|
146
|
-
```bash
|
|
147
|
-
hcloud APIG BatchPublishOrOfflineApiV2 \
|
|
148
|
-
--instance_id=<apig-instance-id> \
|
|
149
|
-
--action=online \
|
|
150
|
-
--env_id=<env-id> \
|
|
151
|
-
--apis.1=<api-id-from-trigger>
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
See `huawei-functiongraph` skill → `references/deploy-workflow.md` for the full end-to-end workflow.
|
|
155
|
-
|
|
156
|
-
## Cross-Skill References
|
|
157
|
-
|
|
158
|
-
- **VPC setup**: See `huawei-vpc` for VPC, subnet, security group creation
|
|
159
|
-
- **EIP setup**: See `huawei-vpc` for EIP creation and binding
|
|
160
|
-
- **FunctionGraph**: See `huawei-functiongraph` for DEDICATEDGATEWAY trigger creation
|
|
161
|
-
|
|
162
|
-
## References
|
|
163
|
-
|
|
164
|
-
- APIG Docs: https://support.huaweicloud.com/apig/
|
|
1
|
+
---
|
|
2
|
+
name: huawei-apig
|
|
3
|
+
description: "Use when creating or managing API Gateway (APIG). Covers API creation, throttling, auth (IAM/APP/basic), CORS, publishing, instance management. Triggers: APIG, API gateway, throttling, publish API. NOT for: FunctionGraph triggers (use huawei-functiongraph)."
|
|
4
|
+
version: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Huawei Cloud APIG
|
|
8
|
+
|
|
9
|
+
**STOP - Do not answer from general knowledge.** Follow the procedure below.
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
Domain expertise for Huawei Cloud API Gateway (APIG). Covers instance lifecycle, API group/API creation, publishing, and FunctionGraph trigger integration.
|
|
14
|
+
|
|
15
|
+
Always discover parameters with `hcloud APIG <Operation> --help` before executing.
|
|
16
|
+
|
|
17
|
+
## Critical Warnings
|
|
18
|
+
|
|
19
|
+
| Trap | Why |
|
|
20
|
+
|------|-----|
|
|
21
|
+
| API group region-locked | Cannot move across regions |
|
|
22
|
+
| Throttling per-API default | Use app-level quotas for per-user limits |
|
|
23
|
+
| CORS must be explicit | OPTIONS preflight fails until configured |
|
|
24
|
+
| `BASIC` spec has no public IP | Use `PROFESSIONAL` + `elb` provider for public access |
|
|
25
|
+
| Instance creation takes 5-15min | Long-running async operation. State is **Running** (NOT "SUCCESS"). Poll with `ListInstancesV2`, wait for `status == "Running"` |
|
|
26
|
+
| `sl_domain` is from API **Group** | NOT from Instance. Get it from `CreateApiGroupV2` or `ListApiGroupsV2` response |
|
|
27
|
+
| API name must NOT have hyphens | `[a-zA-Z0-9_]+` only. Hyphens cause regex validation failure |
|
|
28
|
+
| VPC params need prefix | `--vpc.name=<n>` / `--subnet.vpc_id=<id>` / `--security_group.name=<n>` with KooCLI 7.x |
|
|
29
|
+
|
|
30
|
+
## Instance Management
|
|
31
|
+
|
|
32
|
+
### Check Existing Instances
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
hcloud APIG ListInstancesV2 --cli-region=<r>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Create Instance
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
hcloud APIG CreateInstanceV2 --help
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Key gotchas when creating:
|
|
45
|
+
|
|
46
|
+
| Param | Note |
|
|
47
|
+
|-------|------|
|
|
48
|
+
| `--spec_id` | `BASIC` (no public access), `PROFESSIONAL` (requires `--loadbalancer_provider`) |
|
|
49
|
+
| `--loadbalancer_provider` | `elb` for public access (supports `AddIngressEipV2`), `lvs` for internal only (supports `AddEipV2`) |
|
|
50
|
+
| `--enterprise_project_id` | **Required** for enterprise accounts. Use `"0"` for default project |
|
|
51
|
+
| `--available_zone_ids` | Use AZ code like `ap-southeast-3a`, NOT UUID from `ListAvailableZonesV2` |
|
|
52
|
+
| `--vpc_id`, `--subnet_id` | Must exist in the target region |
|
|
53
|
+
| `--security_group_id` | **Required**. Create a security group first via `VPC CreateSecurityGroup` (VPC v3 API — no `vpc_id` param needed) |
|
|
54
|
+
|
|
55
|
+
### Add Public Access (ELB Provider Only)
|
|
56
|
+
|
|
57
|
+
`BASIC` instances have no public IP. Use `PROFESSIONAL` + `elb` provider for public access (`lvs` is internal-only).
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
hcloud APIG AddIngressEipV2 \
|
|
61
|
+
--instance_id=<id> \
|
|
62
|
+
--bandwidth_charging_mode=bandwidth \
|
|
63
|
+
--bandwidth_size=<size>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
To use an existing EIP instead of creating a new one:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
hcloud APIG AddIngressEipV2 \
|
|
70
|
+
--instance_id=<id> \
|
|
71
|
+
--eip_id=<existing-eip-id>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
> `AddIngressEipV2` only works with `elb` provider. `AddEipV2` (without "Ingress") requires `lvs` provider. Bandwidth minimum is 5 Mbps.
|
|
75
|
+
|
|
76
|
+
**Verification** — After binding, poll the instance to confirm EIP is active:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
hcloud APIG ListInstancesV2 --cli-region=<region> --instance_id=<id> --cli-output=json | jq '.instances[0].eip_address'
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Wait for `eip_address` to show a valid IP (may take up to 2 minutes). If `eip_address` is still `null` after 2 minutes, the EIP may not have been assigned.
|
|
83
|
+
|
|
84
|
+
> **Trap**: `sl_domain` from `CreateApiGroupV2` is an **internal-only** domain (e.g., `*.apic.cn-north-4.huaweicloudapis.com`). It may resolve to internal IP only (NXDOMAIN from public internet). **For public access, always use the `eip_address` from the instance**, not the `sl_domain` or trigger `invoke_url`.
|
|
85
|
+
|
|
86
|
+
## API Group
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
hcloud APIG CreateApiGroupV2 --instance_id=<id> --name=<n>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
| Param | Note |
|
|
93
|
+
|-------|------|
|
|
94
|
+
| `--name` | Group name (required) |
|
|
95
|
+
| `--remark` | Description (optional) |
|
|
96
|
+
|
|
97
|
+
## API Management
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
hcloud APIG CreateApiV2 --help
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Publishing
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
hcloud APIG BatchPublishOrOfflineApiV2 \
|
|
107
|
+
--instance_id=<id> \
|
|
108
|
+
--action=online \
|
|
109
|
+
--env_id=<env-id> \
|
|
110
|
+
--apis.1=<api-id>
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
> The operation is `BatchPublishOrOfflineApiV2`, NOT `PublishApiV2`. The parameter is `apis.1` (1-based array), NOT `api_ids`. For multiple APIs, use `--apis.1`, `--apis.2`, etc.
|
|
114
|
+
|
|
115
|
+
## Throttling
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
hcloud APIG CreateThrottlingPolicyV2 --name=<n> --api_call_limits=1000
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Common Workflows
|
|
122
|
+
|
|
123
|
+
| Task | Operation |
|
|
124
|
+
|------|-----------|
|
|
125
|
+
| List instances | `ListInstancesV2` |
|
|
126
|
+
| Create instance | `CreateInstanceV2` |
|
|
127
|
+
| Delete instance | `DeleteInstancesV2` |
|
|
128
|
+
| Add public EIP | `AddIngressEipV2` |
|
|
129
|
+
| Create API group | `CreateApiGroupV2` |
|
|
130
|
+
| Create API | `CreateApiV2` |
|
|
131
|
+
| Update API | `UpdateApiV2` — change auth mode, path, etc. |
|
|
132
|
+
| List APIs | `ListApisV2` |
|
|
133
|
+
| Publish | `BatchPublishOrOfflineApiV2` |
|
|
134
|
+
| List APIs | `ListApisV2` |
|
|
135
|
+
|
|
136
|
+
## FunctionGraph Integration
|
|
137
|
+
|
|
138
|
+
To expose a FunctionGraph function via HTTP, you need the complete chain:
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
APIG Instance → API Group → DEDICATEDGATEWAY Trigger → Publish
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
After the trigger is created on FunctionGraph side, publish the API in APIG:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
hcloud APIG BatchPublishOrOfflineApiV2 \
|
|
148
|
+
--instance_id=<apig-instance-id> \
|
|
149
|
+
--action=online \
|
|
150
|
+
--env_id=<env-id> \
|
|
151
|
+
--apis.1=<api-id-from-trigger>
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
See `huawei-functiongraph` skill → `references/deploy-workflow.md` for the full end-to-end workflow.
|
|
155
|
+
|
|
156
|
+
## Cross-Skill References
|
|
157
|
+
|
|
158
|
+
- **VPC setup**: See `huawei-vpc` for VPC, subnet, security group creation
|
|
159
|
+
- **EIP setup**: See `huawei-vpc` for EIP creation and binding
|
|
160
|
+
- **FunctionGraph**: See `huawei-functiongraph` for DEDICATEDGATEWAY trigger creation
|
|
161
|
+
|
|
162
|
+
## References
|
|
163
|
+
|
|
164
|
+
- APIG Docs: https://support.huaweicloud.com/apig/
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: huawei-billing
|
|
3
|
-
description: "Use when querying bills, costs, resource usage, or billing details on Huawei Cloud (BSS). Triggers: billing, BSS, cost, bill, expense, usage report, resource usage, budget. NOT for: resource management (use huawei-ecs etc.), creating resources."
|
|
4
|
-
version: 1
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Huawei Cloud Billing (BSS)
|
|
8
|
-
|
|
9
|
-
**STOP - Do not answer from general knowledge.** Follow the procedure below.
|
|
10
|
-
|
|
11
|
-
Always run `hcloud BSS <Operation> --help` before constructing commands to discover exact parameter names and requirements.
|
|
12
|
-
|
|
13
|
-
## Overview
|
|
14
|
-
|
|
15
|
-
Domain expertise for billing queries (BSS). Covers cost tracking, bill details, and budget management. Read-only — no resource modifications.
|
|
16
|
-
|
|
17
|
-
## Critical Warnings
|
|
18
|
-
|
|
19
|
-
| Trap | Why |
|
|
20
|
-
|------|-----|
|
|
21
|
-
| Bills delayed ~24h | Yesterday's costs may not appear until the next day |
|
|
22
|
-
| BSS Admin role needed | IAM user must have BSS Administrator or Finance role |
|
|
23
|
-
| Currency conversion varies | Cross-region costs use daily exchange rates |
|
|
24
|
-
|
|
25
|
-
## Common Workflows
|
|
26
|
-
|
|
27
|
-
| Task | Operation |
|
|
28
|
-
|------|-----------|
|
|
29
|
-
| List costs | `ListCosts --cli-region=<r> --project_id=<p>` |
|
|
30
|
-
| List customer bills | `ListCustomerBills --cli-region=<r> --project_id=<p>` |
|
|
31
|
-
| List resource usage | `ListResourceUsage --cli-region=<r> --project_id=<p>` |
|
|
32
|
-
| List sub-customers | `ListConsumeSubCustomers --cli-region=<r> --project_id=<p>` |
|
|
33
|
-
| Show account balance | `ShowCustomerAccountBalances --cli-region=<r> --project_id=<p>` |
|
|
34
|
-
| List conversions | `ListConversions --cli-region=<r> --project_id=<p>` |
|
|
35
|
-
|
|
36
|
-
Discover exact parameters with `--help` before executing any command. All BSS operations are read-only.
|
|
37
|
-
|
|
38
|
-
## Troubleshooting
|
|
39
|
-
|
|
40
|
-
| Error | Fix |
|
|
41
|
-
|-------|-----|
|
|
42
|
-
| Access denied | User needs BSS Administrator or Finance role |
|
|
43
|
-
| No data returned | Check time range (bills have ~24h delay). Verify project_id |
|
|
44
|
-
| Enterprise account restrictions | Some APIs require enterprise real-name authentication |
|
|
45
|
-
|
|
46
|
-
## Cross-Skill References
|
|
47
|
-
|
|
48
|
-
- **Resource lifecycle**: See `huawei-ecs`, `huawei-obs` for creating billable resources
|
|
1
|
+
---
|
|
2
|
+
name: huawei-billing
|
|
3
|
+
description: "Use when querying bills, costs, resource usage, or billing details on Huawei Cloud (BSS). Triggers: billing, BSS, cost, bill, expense, usage report, resource usage, budget. NOT for: resource management (use huawei-ecs etc.), creating resources."
|
|
4
|
+
version: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Huawei Cloud Billing (BSS)
|
|
8
|
+
|
|
9
|
+
**STOP - Do not answer from general knowledge.** Follow the procedure below.
|
|
10
|
+
|
|
11
|
+
Always run `hcloud BSS <Operation> --help` before constructing commands to discover exact parameter names and requirements.
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
Domain expertise for billing queries (BSS). Covers cost tracking, bill details, and budget management. Read-only — no resource modifications.
|
|
16
|
+
|
|
17
|
+
## Critical Warnings
|
|
18
|
+
|
|
19
|
+
| Trap | Why |
|
|
20
|
+
|------|-----|
|
|
21
|
+
| Bills delayed ~24h | Yesterday's costs may not appear until the next day |
|
|
22
|
+
| BSS Admin role needed | IAM user must have BSS Administrator or Finance role |
|
|
23
|
+
| Currency conversion varies | Cross-region costs use daily exchange rates |
|
|
24
|
+
|
|
25
|
+
## Common Workflows
|
|
26
|
+
|
|
27
|
+
| Task | Operation |
|
|
28
|
+
|------|-----------|
|
|
29
|
+
| List costs | `ListCosts --cli-region=<r> --project_id=<p>` |
|
|
30
|
+
| List customer bills | `ListCustomerBills --cli-region=<r> --project_id=<p>` |
|
|
31
|
+
| List resource usage | `ListResourceUsage --cli-region=<r> --project_id=<p>` |
|
|
32
|
+
| List sub-customers | `ListConsumeSubCustomers --cli-region=<r> --project_id=<p>` |
|
|
33
|
+
| Show account balance | `ShowCustomerAccountBalances --cli-region=<r> --project_id=<p>` |
|
|
34
|
+
| List conversions | `ListConversions --cli-region=<r> --project_id=<p>` |
|
|
35
|
+
|
|
36
|
+
Discover exact parameters with `--help` before executing any command. All BSS operations are read-only.
|
|
37
|
+
|
|
38
|
+
## Troubleshooting
|
|
39
|
+
|
|
40
|
+
| Error | Fix |
|
|
41
|
+
|-------|-----|
|
|
42
|
+
| Access denied | User needs BSS Administrator or Finance role |
|
|
43
|
+
| No data returned | Check time range (bills have ~24h delay). Verify project_id |
|
|
44
|
+
| Enterprise account restrictions | Some APIs require enterprise real-name authentication |
|
|
45
|
+
|
|
46
|
+
## Cross-Skill References
|
|
47
|
+
|
|
48
|
+
- **Resource lifecycle**: See `huawei-ecs`, `huawei-obs` for creating billable resources
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: huawei-cbr
|
|
3
|
-
description: "Use when creating or managing Cloud Backup and Recovery (CBR) vaults, backups, and restore operations on Huawei Cloud. Triggers: CBR, backup, restore, vault, snapshot, disaster recovery. NOT for: OBS object versioning (use huawei-obs), RDS automated backups (use huawei-rds)."
|
|
4
|
-
version: 1
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Huawei Cloud CBR
|
|
8
|
-
|
|
9
|
-
**STOP - Do not answer from general knowledge.** Follow the procedure below.
|
|
10
|
-
|
|
11
|
-
Always run `hcloud CBR <Operation> --help` before constructing commands to discover exact parameter names and requirements.
|
|
12
|
-
|
|
13
|
-
## Overview
|
|
14
|
-
|
|
15
|
-
Domain expertise for Cloud Backup and Recovery. Covers vaults, backups, restore operations, policies, and cross-region replication.
|
|
16
|
-
|
|
17
|
-
## Critical Warnings
|
|
18
|
-
|
|
19
|
-
| Trap | Why |
|
|
20
|
-
|------|-----|
|
|
21
|
-
| Vault binds single resource type | Server vault != disk vault != file system vault |
|
|
22
|
-
| Restore needs instance stop | Most VM restore requires the target instance to be stopped first |
|
|
23
|
-
| Backup storage incurs charges | Retention policies affect storage costs |
|
|
24
|
-
|
|
25
|
-
## Common Workflows
|
|
26
|
-
|
|
27
|
-
| Task | Operation |
|
|
28
|
-
|------|-----------|
|
|
29
|
-
| List vaults | `ListVaults --cli-region=<r> --project_id=<p>` |
|
|
30
|
-
| Create vault | `CreateVault --cli-region=<r> --project_id=<p>` |
|
|
31
|
-
| Create backup policy | `CreatePolicy --cli-region=<r> --project_id=<p>` |
|
|
32
|
-
| Create checkpoint | `CreateCheckpoint --cli-region=<r> --project_id=<p>` |
|
|
33
|
-
| Add resource to vault | `AddVaultResource --cli-region=<r> --project_id=<p>` |
|
|
34
|
-
| Batch update vault | `BatchUpdateVault --cli-region=<r> --project_id=<p>` |
|
|
35
|
-
| Create organization policy | `CreateOrganizationPolicy --cli-region=<r> --project_id=<p>` |
|
|
36
|
-
|
|
37
|
-
Discover exact parameters with `--help` before executing any command.
|
|
38
|
-
|
|
39
|
-
## Troubleshooting
|
|
40
|
-
|
|
41
|
-
| Error | Fix |
|
|
42
|
-
|-------|-----|
|
|
43
|
-
| Backup creation fails | Check instance is running and agent is online |
|
|
44
|
-
| Restore fails | Ensure target instance is stopped before restore |
|
|
45
|
-
| Vault full | Increase vault capacity or adjust retention policy |
|
|
46
|
-
|
|
47
|
-
## Cross-Skill References
|
|
48
|
-
|
|
49
|
-
- **ECS**: See `huawei-ecs` for backing up instances
|
|
50
|
-
- **EVS**: See `huawei-ecs` references/evs.md for disk backup
|
|
1
|
+
---
|
|
2
|
+
name: huawei-cbr
|
|
3
|
+
description: "Use when creating or managing Cloud Backup and Recovery (CBR) vaults, backups, and restore operations on Huawei Cloud. Triggers: CBR, backup, restore, vault, snapshot, disaster recovery. NOT for: OBS object versioning (use huawei-obs), RDS automated backups (use huawei-rds)."
|
|
4
|
+
version: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Huawei Cloud CBR
|
|
8
|
+
|
|
9
|
+
**STOP - Do not answer from general knowledge.** Follow the procedure below.
|
|
10
|
+
|
|
11
|
+
Always run `hcloud CBR <Operation> --help` before constructing commands to discover exact parameter names and requirements.
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
Domain expertise for Cloud Backup and Recovery. Covers vaults, backups, restore operations, policies, and cross-region replication.
|
|
16
|
+
|
|
17
|
+
## Critical Warnings
|
|
18
|
+
|
|
19
|
+
| Trap | Why |
|
|
20
|
+
|------|-----|
|
|
21
|
+
| Vault binds single resource type | Server vault != disk vault != file system vault |
|
|
22
|
+
| Restore needs instance stop | Most VM restore requires the target instance to be stopped first |
|
|
23
|
+
| Backup storage incurs charges | Retention policies affect storage costs |
|
|
24
|
+
|
|
25
|
+
## Common Workflows
|
|
26
|
+
|
|
27
|
+
| Task | Operation |
|
|
28
|
+
|------|-----------|
|
|
29
|
+
| List vaults | `ListVaults --cli-region=<r> --project_id=<p>` |
|
|
30
|
+
| Create vault | `CreateVault --cli-region=<r> --project_id=<p>` |
|
|
31
|
+
| Create backup policy | `CreatePolicy --cli-region=<r> --project_id=<p>` |
|
|
32
|
+
| Create checkpoint | `CreateCheckpoint --cli-region=<r> --project_id=<p>` |
|
|
33
|
+
| Add resource to vault | `AddVaultResource --cli-region=<r> --project_id=<p>` |
|
|
34
|
+
| Batch update vault | `BatchUpdateVault --cli-region=<r> --project_id=<p>` |
|
|
35
|
+
| Create organization policy | `CreateOrganizationPolicy --cli-region=<r> --project_id=<p>` |
|
|
36
|
+
|
|
37
|
+
Discover exact parameters with `--help` before executing any command.
|
|
38
|
+
|
|
39
|
+
## Troubleshooting
|
|
40
|
+
|
|
41
|
+
| Error | Fix |
|
|
42
|
+
|-------|-----|
|
|
43
|
+
| Backup creation fails | Check instance is running and agent is online |
|
|
44
|
+
| Restore fails | Ensure target instance is stopped before restore |
|
|
45
|
+
| Vault full | Increase vault capacity or adjust retention policy |
|
|
46
|
+
|
|
47
|
+
## Cross-Skill References
|
|
48
|
+
|
|
49
|
+
- **ECS**: See `huawei-ecs` for backing up instances
|
|
50
|
+
- **EVS**: See `huawei-ecs` references/evs.md for disk backup
|