Retrieves WAF rule sets for a specified instance, allowing filtering by phase, name, and other criteria.
Operation description
Request
InstanceIdis a required parameter that specifies the WAF instance to query.The
Phaseparameter filters rule sets by WAF processing phase, such as custom rules and rate limiting rules.Use
NameLikeinQueryArgsto perform a fuzzy search on rule set names.The
PageNumberandPageSizeparameters control pagination and default to 1 and 20, respectively.The response includes the request ID, current plan usage, the total record count, and a list of rule set details.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
esa:ListUserWafRulesets |
none |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID. |
esa-xxxxxxx |
| Phase |
string |
No |
Specifies the execution phase of the WAF rule.
|
http_custom |
| QueryArgs |
object |
No |
Parameters for filtering and sorting the results. |
|
| NameLike |
string |
No |
A string for a fuzzy search of ruleset names. |
example |
| OrderBy |
string |
No |
The field by which to sort results. |
id |
| Desc |
boolean |
No |
Specifies whether to sort results in descending order. |
|
| PageNumber |
integer |
No |
The page number to return. |
1 |
| PageSize |
integer |
No |
The number of entries to return on each page. |
20 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response schema. |
||
| RequestId |
string |
The request ID. |
36af3fcc-43d0-441c-86b1-428951dc8225 |
| InstanceUsage |
integer |
The instance usage. |
10 |
| TotalCount |
integer |
The total number of records after filtering. |
5 |
| Rulesets |
array<object> |
A list of WAF ruleset objects. |
|
|
object |
A WAF ruleset object. |
||
| Id |
integer |
The WAF ruleset ID. |
10000001 |
| Position |
integer |
The WAF ruleset position. |
1 |
| Phase |
string |
The WAF rule execution phase. Possible values:
|
http_custom |
| Name |
string |
The WAF ruleset name. |
example |
| Description |
string |
The WAF ruleset description. |
example |
| Status |
string |
The WAF ruleset status. |
on |
| PageNumber |
integer |
The page number. |
1 |
| PageSize |
integer |
The number of entries returned per page. |
20 |
Examples
Success response
JSON format
{
"RequestId": "36af3fcc-43d0-441c-86b1-428951dc8225",
"InstanceUsage": 10,
"TotalCount": 5,
"Rulesets": [
{
"Id": 10000001,
"Position": 1,
"Phase": "http_custom",
"Name": "example",
"Description": "example",
"Status": "on"
}
],
"PageNumber": 1,
"PageSize": 20
}
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.