Queries the details of the Web Application Firewall (WAF) protection policies that you configured.
Operation description
You can call this operation up to 20 times per second per account.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
QueryArgs | string | No | The query conditions. The value is a JSON string. The format is Note
If you do not set this parameter, all protection policies are queried.
| {"PolicyNameLIike":"test_policy"} |
PageNumber | integer | No | The number of the page to return. Valid values: 1 to 100000. Default value: 1. | 1 |
PageSize | integer | No | The number of protection policies to return on each page. Valid values: an integer from 1 to 500. Default value: 20. | 20 |
Fields in the QueryArgs parameter
Name | Type | Required | Example | Description |
---|---|---|---|---|
PolicyIds | string | No | 10000001,10000002 | The IDs of protection policies. Separate multiple IDs with commas (,). Only exact match is supported. |
RuleIds | string | No | 20000001,20000055 | The IDs of protection rules. Separate multiple IDs with commas (,). Only exact match is supported. |
PolicyType | string | No | default | Specifies whether the protection policy is the default policy. Valid values: default custom |
DefenseScenes | string | No | custom_acl | The types of protection policies. Separate multiple types with commas (,). Only exact search is supported. Valid values: waf_group: basic web protection custom_acl: custom protection whitelist: whitelist |
PolicyStatus | string | No | on | The status of the policy. on off |
OrderBy | string | No | GmtModified | The field that is used to sort query results. Valid values: GmtModified, PolicyId, PolicyName, and PolicyStatus. |
Desc | Boolean | No | false | The sort order. The value true indicates the reverse chronological order. The value false indicates the chronological order. Default value: false. |
Response parameters
Examples
Sample success responses
JSON
format
{
"PageSize": 20,
"RequestId": "153ca2cd-3c01-44be-2e83-64dbc6c88630",
"PageNumber": 1,
"TotalCount": 15,
"Policies": [
{
"PolicyStatus": "on",
"DefenseScene": "custom_acl",
"DomainCount": 22,
"PolicyName": "policy_test",
"PolicyId": 100001,
"RuleCount": 9,
"GmtModified": "2021-12-29T17:08:45Z",
"PolicyType": "default"
}
]
}
Error codes
For a list of error codes, visit the Service error codes.