Queries the WAF rulesets for a specified instance. You can filter the results by phase, name, and other criteria.
Operation description
Request description
InstanceIdis a required parameter that specifies the WAF instance to query.The
Phaseparameter lets you filter rulesets based on different WAF processing phases, such as custom rules and rate limiting rules.You can use
NameLikeinQueryArgsto perform a fuzzy search for ruleset names.Paging is controlled by
PageNumberandPageSize. Their default values are 1 and 20, respectively.The response includes the request ID, current plan usage, total number of records, and a list of ruleset details.
Try it now
Test
RAM authorization
Request parameters
Parameter | Type | Required | Description | Example |
InstanceId | string | Yes | The instance ID. | esa-xxxxxxx |
Phase | string | No | The WAF phase. | ●http_custom ●http_ratelimit ●http_managed ●http_whitelist ●http_anti_scan |
| QueryArgs | object | No | The query parameters. | |
NameLike | string | No | The keyword for a fuzzy search by ruleset name. | example |
OrderBy | string | No | The column to use for sorting. | id |
Desc | boolean | No | Specifies whether to sort the results in descending order. | |
PageNumber | integer | No | The page number. | 1 |
PageSize | integer | No | The number of entries per 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 information. | |
object | The WAF ruleset information. | ||
Id | integer | The WAF ruleset ID. | 10000001 |
Position | integer | The position of the WAF ruleset. | 1 |
Phase | string | The WAF phase. | http_custom |
Name | string | The name of the WAF ruleset. | example |
Description | string | The description of the WAF ruleset. | example |
Status | string | The status of the WAF ruleset. | on |
PageNumber | integer | The page number. | 1 |
PageSize | integer | The number of entries 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.