alibabacloud-waf-billing-backup
Query and back up Alibaba Cloud WAF 3.0 billing data. Use this Skill when a user asks to check WAF bills, export WAF cost details, back up WAF billing data locally, or analyze daily/hourly SeCU and Credit usage. The Skill retrieves instance information, daily bill summaries, and hourly cost breakdowns (function fees, traffic processing fees, Credit usage) via aliyun-cli, then exports the results as JSON and CSV files to the local workspace.
Documentation & Preview
WAF 3.0 Billing Fields and Cost Items Reference
Table of Contents
- 1. Metering Units and Unit Prices
- 2. API Response Field Descriptions
- 3. ChargeData Field Mapping
- 4. CreditChargeData Field Mapping
- 5. Cost Items Quick Reference
---
1. Metering Units and Unit Prices
| Metering Unit | Unit Price | Description | | --- | --- | --- | | SeCU | 0.05 CNY / SeCU | Unified metering unit for WAF 3.0 pay-as-you-go | | Credit | 100 Credit = 1 CNY | Dedicated metering unit for the Agentic API Security module |
Cost conversion:
Cost(CNY) = Cu × 0.05 + Credit × 0.01> Except for the WAF instance fee, SeCU is counted per full hour and rounded up. The WAF instance fee is billed at the actual rate of 0.5 SeCU/hour.
---
2. API Response Field Descriptions
DescribePostpayBills Response Fields
| Field | Type | Description | | --- | --- | --- | | BillDetail | array | Bill detail list | | BillDetail[].StartTime | integer | Bill start time, Unix timestamp in seconds (UTC) | | BillDetail[].EndTime | integer | Bill end time, Unix timestamp in seconds (UTC) | | BillDetail[].Cu | string | Total SeCU | | BillDetail[].TrafficCu | string | SeCU generated by traffic processing | | BillDetail[].FunctionCu | string | SeCU generated by features | | BillDetail[].Credit | number | Total Credit | | BillDetail[].TrafficCredit | number | Credit generated by traffic processing | | BillDetail[].FunctionCredit | number | Credit generated by features | | BillDetail[].ChargeData | string | SeCU usage details as a JSON string | | BillDetail[].CreditChargeData | string | Credit usage details as a JSON string | | MaxResults | integer | Number of records per page | | NextToken | string | Token for the next page |
DescribeElasticBills Response Fields
| Field | Type | Description | | --- | --- | --- | | Bills | array | Daily bills for the last 7 days | | Bills[].StartTime | integer | Bill start time, Unix timestamp in seconds (UTC) | | Bills[].EndTime | integer | Bill end time, Unix timestamp in seconds (UTC) | | Bills[].Cu | number | Total SeCU | | Bills[].TrafficCu | number | Traffic processing SeCU | | Bills[].FunctionCu | number | Feature SeCU | | Bills[].Credit | number | Total Credit | | Bills[].TrafficCredit | number | Traffic processing Credit | | Bills[].FunctionCredit | number | Feature Credit | | TotalCount | integer | Total number of records |
---
3. ChargeData Field Mapping
ChargeData is a JSON string. The parsed fields are described below.
Instance Related
| Field | Console Display | Description | | --- | --- | --- | | instanceFee | WAF Instance | WAF pay-as-you-go instance base fee, 0.5 SeCU/hour |
Traffic Processing Related
| Field | Console Display | Description | | --- | --- | --- | | request | Basic Traffic Fee | Number of business requests, 1 SeCU / 5,000 requests/hour | | qps | QPS Peak | QPS peak exceeding 1,000, 1 SeCU / 5 QPS/hour | | apisecTraffic | API Security: Request Processing Fee | API security traffic | | botTraffic | Bot Management: Request Processing Fee | Bot management traffic | | riskTraffic | Bot Management: Risk Identification | Risk identification hit count | | customAclCaptcha | Custom Rule: Slider Action | Slider challenge invocations |
Resource Access Features
| Field | Console Display | Description | | --- | --- | --- | | domainCount | CNAME Access Domain Count | Number of accessed domains | | exclusiveIpCount | Dedicated IP | Number of domains with dedicated IP enabled | | ipv6 | IPv6 | Whether IPv6 is enabled | | gslb | Intelligent Load Balancing | Whether intelligent load balancing is enabled | | nonPort | Non-standard Port | Whether non-standard ports are enabled | | assetStatus | Asset Center | Asset center enabled status |
Web Core Protection
| Field | Console Display | Description | | --- | --- | --- | | wafBaseTemplateCount | Web Core Protection Rules | Number of web core protection templates | | aiWhiteListTemplateCount | Intelligent Allowlist Engine | Number of intelligent allowlist templates | | ipBlacklistRuleCount | IP Blacklist | Number of IP blacklist rules | | customAclBaseRuleCount | Custom Rule - Basic | Number of basic custom rules | | customAclAdvanceRuleCount | Custom Rule - Advanced | Number of advanced custom rules | | ccRuleCount | CC Protection | Number of CC protection rules | | regionBlockRuleCount | Region Block | Number of region block rules | | antiScanRuleCount | Scan Protection | Number of scan protection rules | | customResponseRuleCount | Custom Response | Number of custom response rules | | tamperproofRuleCount | Web Tamper-proof | Number of web tamper-proof rules | | dlpRuleCount | Data Leakage Prevention | Number of DLP rules | | spikeThrottleRuleCount | Spike Throttling | Number of spike throttling rules | | threatIntelligenceTemplateCount | Threat Intelligence | Number of threat intelligence templates |
Bot Management
| Field | Console Display | Description | | --- | --- | --- | | botWebTemplateCount | Bot-Web | Number of Bot-Web protection templates | | botAppTemplateCount | Bot-App | Number of Bot-App protection templates | | customAclBotRuleCount | Bot Advanced Custom Rule | Number of advanced custom rules in Bot management |
API Security
| Field | Console Display | Description | | --- | --- | --- | | apisecResourceCount | API Security / AI Application Protection Assets | Number of protected objects with API security enabled |
---
4. CreditChargeData Field Mapping
CreditChargeData is a JSON string used by the Agentic API Security module.
| Field | Console Display | Description | | --- | --- | --- | | apisecResourceCount | Agentic API Security | Number of protected objects with API security enabled | | apisecTraffic | Agentic API Security: Request Processing Fee | API security traffic |
---
5. Cost Items Quick Reference
| Cost Item | SeCU Price | Credit Price | Description | | --- | --- | --- | --- | | WAF Instance | 0.5 SeCU/hour | - | Billed from the moment the instance is activated | | Basic Traffic Fee | 1 SeCU / 5,000 requests/hour | - | Business requests rounded up | | QPS Peak | ≤1,000: 0; >1,000: 1 SeCU / 5 QPS/hour | - | Based on hourly peak | | CNAME Access Domain Count | Tiered: 0/5/3/1 SeCU/domain/hour | - | 1→0, 2-10→5, 11-100→3, >100→1 | | Dedicated IP | 15 SeCU/dedicated IP/hour | - | - | | Non-standard Port | Enabled: 25 SeCU/hour | - | Configuring ports other than 80/8080/443/8443 | | Intelligent Load Balancing | Enabled: 50 SeCU/hour | - | - | | IPv6 | Enabled: 50 SeCU/hour | - | - | | Web Core Protection Rules | Default template 3 SeCU/hour; non-default 3 SeCU/template/hour | - | - | | Intelligent Allowlist Engine | Enabled: 10 SeCU/template/hour | - | - | | IP Blacklist | 2 SeCU/rule/hour | - | - | | Custom Rule - Basic | 2 SeCU/rule/hour | - | - | | Custom Rule - Advanced | 5 SeCU/rule/hour | - | - | | CC Protection | 2 SeCU/rule/hour | - | - | | Region Block | 10 SeCU/rule/hour | - | - | | Scan Protection | 10 SeCU/rule/hour | - | Each template contains 3 fixed rules | | Custom Response | 10 SeCU/rule/hour | - | Each template contains 1 fixed rule | | Web Tamper-proof | 5 SeCU/rule/hour | - | - | | Data Leakage Prevention | 5 SeCU/rule/hour | - | - | | Spike Throttling | 150 SeCU/rule/hour | - | - | | Threat Intelligence | 50 SeCU/template/hour | - | - | | Bot-Web Template | 50 SeCU/template/hour | - | - | | Bot-App Template | 80 SeCU/template/hour | - | - | | Bot Advanced Custom Rule | 15 SeCU/rule/hour | - | - | | Bot Management Request Processing Fee | 1 SeCU / 7,500 requests/hour | - | - | | Legacy API Security | 20 SeCU/protected object/hour | - | - | | New Agentic API Security | - | 125 Credit/protected object/hour | - | | New API Security Request Processing Fee | - | 1 Credit / 1,200 requests/hour | - | | Extension Plugin | 100 SeCU/plugin/hour | - | - | | Extension Plugin Request Processing Fee | 1 SeCU / 7,500 requests/hour | - | - |