Lists the usage of WAF rules.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
esa:ListWafUsageOfRules |
list |
*Site
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| SiteId |
integer |
No |
The site ID. You can call the ListSites operation to obtain the site ID. |
1 |
| InstanceId |
string |
No |
The WAF instance ID. If this parameter is left empty, the API returns an empty result. We recommend that you always specify this parameter. |
esa-site-b0wdsrlba3nk |
| Phase |
string |
No |
The phase in which the WAF rule runs. This parameter is required. Common values: http_custom, http_ratelimit, http_anti_scan, http_bot, http_managed, http_whitelist, and http_threat_intelligence. Note
Note: This parameter is required on the server side. If this parameter is not specified, the API returns InvalidParameter (400). |
http_custom |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
36af3fcc-43d0-441c-86b1-428951dc8225 |
| Sites |
array<object> |
The list of site usage. |
|
|
object |
The site usage details. |
||
| Id |
integer |
The site ID. |
1 |
| Name |
string |
The site name. |
example.com |
| Usage |
integer |
The number of WAF rules or WAF rule sets that have been used. |
1 |
| BatchConfigUsage |
integer |
The number of rules or rule sets for the specified phase under instance-level batch configuration. |
1 |
| InstanceUsage |
integer |
The total number of rules or rule sets for the instance under the specified phase, including both site-level and instance-level rules. |
2 |
Examples
Success response
JSON format
{
"RequestId": "36af3fcc-43d0-441c-86b1-428951dc8225",
"Sites": [
{
"Id": 1,
"Name": "example.com",
"Usage": 1
}
],
"BatchConfigUsage": 1,
"InstanceUsage": 2
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | The specified parameter is invalid. | The specified parameter is invalid. |
| 400 | InternalException | Failed to call the service. Try again later or contact technical support. | Failed to call the service. Try again later or contact technical support. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.