Comprehensive CDN query reference skill using hcloud CLI. Covers all 44 GET read-only CDN APIs organized by category: domain management, statistics & analytics, refresh/log/export, template/rule/tag/account. Provides command templates, parameter guidance, and validated pitfalls for any CDN query scenario. This is a fallback skill for CDN queries. Use this when other CDN-specific skills (cdn-traffic-anomaly-analysis, cdn-502-troubleshooting, etc.) are not applicable.Do NOT use this skill for: write/modify/delete CDN operations (POST/PUT/DELETE are always refused), non-CDN cloud service queries, or scenarios already covered by a dedicated CDN skill (e.g., cdn-traffic-anomaly-analysis, cdn-502-troubleshooting). Use this skill when the user wants to: (1) query CDN domain configuration, (2) check domain statistics or traffic data, (3) view refresh/preheat task history, (4) download CDN logs or export reports, (5) inspect CDN templates, rules, tags, or account quotas, (6) diagnose DNS, certificates, origin, or domain ownership, (7) look up any CDN hcloud CLI command usage. Triggers include: CDN查询, CDN接口, CDN CLI, 域名查询, 域名配置, 流量统计, 带宽查询, 刷新预热, 日志下载, 证书查询, 回源配置, 缓存规则, 域名归属, CDN query, CDN API reference, CDN CLI usage, domain config, traffic statistics, bandwidth query, refresh preheat, log download, certificate query, origin config
This skill is a comprehensive reference for all 44 GET read-only CDN APIs available via hcloud CLI. It serves as a fallback skill for agents to look up the correct command syntax, required parameters, and known pitfalls when querying any CDN information.
Key Features:
Complete coverage of 44 GET CDN APIs (all validated end-to-end)
"这个 IP 是不是华为云 CDN 的节点" / "Check if this IP belongs to Huawei Cloud CDN"
"查一下账户的 CDN 配额" / "Query the CDN account quota"
Near-miss / Do NOT Use
Fallback skill: this is a read-only CDN query reference — prefer a dedicated
skill when one covers the scenario (cdn-traffic-anomaly-analysis,
cdn-502-troubleshooting, or any other applicable CDN skill).
Near-miss handling: requests that sound like queries but are actually
writes (e.g., "create a refresh task", "update cache rules", "delete a domain")
are prohibited — refuse and inform, never construct or simulate the command.
⛔ Prohibited Operations (Security Constraints)
This skill is strictly read-only. All non-GET operations (POST/PUT/DELETE) are prohibited regardless of user request. The skill must refuse and direct the user to the Huawei Cloud CDN console or manual hcloud CLI for any write/modify/delete operation.
Total: 55 prohibited operations (24 POST + 25 PUT + 6 DELETE).
POST operation; misclassified in earlier versions as GET — now explicitly prohibited
❌ Verify domain ownership
VerifyDomainOwner
POST operation; triggers verification flow
❌ Set statistics config
SetStatsConfig
POST operation; affects account-level stats collection
If a user requests a prohibited operation, you must refuse and inform:
"Per security constraints, this skill does not allow write/delete/modify operations. This skill is read-only for CDN query reference. Please use the Huawei Cloud CDN console (https://console.huaweicloud.com/cdn) or run the hcloud CLI manually for configuration changes. The complete list of 55 prohibited operations is documented in references/prohibited-operations.md."
Verifying Unlisted Operations
If you need to use a CDN CLI command not listed in this skill, you must verify its HTTP method before execution:
bash
hcloud CDN <Operation> --help
Review the help output and locate the Method: field to determine the HTTP method.
GET → Allowed to execute. Document the command for future reference.
POST / PUT / DELETE → Prohibited. Refuse and inform the user.
Note:Method: and its value appear on separate lines in the help output. Check the line after Method: to find the HTTP method value.
KooCLI Command Format Standard
All hcloud CDN commands follow this standard format:
Prerequisite check: Huawei Cloud CLI (hcloud / KooCLI) >= 3.2.0 required
Run hcloud version to verify version >= 3.2.0. If not installed or version is too low,
see references/cli-installation-guide.md for installation guide.
bash
hcloud version
Prerequisite check: hcloud credentials configured
Before performing CDN operations, you must verify hcloud credentials are configured:
bash
hcloud configure list
If no valid credentials exist, stop and guide the user to configure credentials.
⚠️ hcloud parameter format requirements
hcloud (KooCLI) all parameters must use the --param=value format (connected with equals sign); space-separated format is not supported.
CDN APIs only support two regions: cn-north-1 (Beijing) and ap-southeast-1 (Singapore).
Query results are region-independent (CDN is a global service).
Recommended: use cn-north-1.
Prohibited from reading, echoing, or printing AK/SK values
Prohibited from asking the user to input AK/SK directly in the conversation
Prohibited from using hcloud configure set to pass plaintext credential values
Prohibited from accepting AK/SK directly provided by the user in the conversation
Only allowed to read credentials from environment variables or configured CLI config files
⚠️ Important: Handling user-provided credentials
If a user attempts to provide AK/SK directly (e.g., "my AK is xxx, SK is yyy"):
Stop immediately - Do not execute any commands
Politely refuse and return the following message:
text
For account security, please do not provide Huawei Cloud Access Key ID and Access Key Secret directly in the conversation.
Please use one of the following secure methods to configure credentials:
Method 1: Interactive configuration (recommended)
hcloud configure
# Enter AK/SK as prompted, credentials will be securely stored in a local config file
Method 2: Environment variable configuration
export HUAWEICLOUD_SDK_AK=<your-access-key-id>
export HUAWEICLOUD_SDK_SK=<your-secret-key>
After configuration is complete, please retry your request.
Do not continue executing any Huawei Cloud operations until credentials are configured
Check CLI configuration:
bash
hcloud configure list
Check whether the output contains valid configuration (AK/SK, IAM, etc.).
All CDN APIs that accept time range parameters require millisecond-precision UTC timestamps.
Key rules:
Timestamps must be in milliseconds (e.g., <ms>)
When interval=86400, timestamps must be aligned to UTC+8 midnight
Different APIs have different time range limits:
ShowDomainStats (v2): interval=86400 max 31-32 days (33 days+ returns CDN.0203); interval=3600 max 7 days; interval=300 max 2 days
ShowBandwidthCalc: max 31 days
ShowTopDomainNames: max 1 day
ShowUrlTaskInfo (v2): max 24 hours
Use the built-in script to calculate timestamps:
bash
# Past 3 days (default) — outputs JSON with start_time and end_time
python scripts/cdn_timestamp.py --days 3
# Past 7 days
python scripts/cdn_timestamp.py --days 7
# Last full month
python scripts/cdn_timestamp.py --month
# Current month (1st to today)
python scripts/cdn_timestamp.py --cur-month
# Specific date
python scripts/cdn_timestamp.py --date 2026-08-11
Script options: --days N (default 3), --month, --cur-month, --date YYYY-MM-DD
Usage flow: Run the script first to get the timestamp values, then manually fill them into the --start_time and --end_time parameters of the hcloud command.
Initial release: full coverage of 44 GET CDN APIs (4 categories), 14 validated pitfalls, 55 prohibited non-GET operations, 5 query workflows, cdn_timestamp.py timestamp script. Quality revision adds: version metadata, enhanced description with near-miss boundary, Triggers and Near-miss/Do NOT Use sections, FAQ, Failure Modes, and Output Format contract.
Not covered (by design): 13 legacy v1 GET APIs (v2 equivalents documented) and 2 unavailable GET APIs (ListAccessControlTask, ListDomainClientStats) — see Coverage Notes in references/prohibited-operations.md.