Queries the details of configured Web Application Firewall (WAF) mitigation policies.
Operation description
A single user can make up to 20 calls per second.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dcdn:DescribeDcdnWafPolicies |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| QueryArgs |
string |
No |
The conditional query, which is a JSON-serialized string.
The format is as follows: Note
If this parameter is not specified, all mitigation policies are queried. |
{"PolicyNameLIike":"test_policy"} |
| PageNumber |
integer |
No |
The page number. Default value: 1. Valid values: 1 to 100000. |
1 |
| PageSize |
integer |
No |
The number of mitigation policies to return on each page. Default value: 20. Valid values: an integer from 1 to 500. |
20 |
QueryArgs parameters
| Name | Type | Required | Example | Description |
| PolicyIds | string | No | 10000001,10000002 | The list of mitigation policy IDs. This is a term query. Separate multiple IDs with a comma (,). |
| RuleIds | string | No | 20000001,20000055 | The list of rule IDs. This is a term query. Separate multiple IDs with a comma (,). |
| PolicyNameLike | string | No | policy_test | The name of the mitigation policy. This is a fuzzy query. The name can contain Chinese characters, letters (case-sensitive), digits (0 to 9), and underscores (_). |
| DomainNames | string | No | example.com | The list of protected domain names. This is a term query. You can specify up to 50 domain names. Separate multiple domain names with a comma (,). |
| PolicyType | string | No | default | Specifies whether the policy is a default mitigation policy. Valid values: `default`: a default mitigation policy. `custom`: a custom mitigation policy. |
| DefenseScenes | string | No | custom_acl | The mitigation scenario. This is a term query. Separate multiple scenarios with a comma (,). The following scenarios are supported: `waf_group`: basic web protection. `custom_acl`: custom mitigation policies. `whitelist`: whitelist. |
| PolicyStatus | string | No | on | The status of the policy. Valid values: `on`: enabled. `off`: disabled. |
| OrderBy | string | No | GmtModified | The field by which to sort the results. Valid values: `GmtModified`, `PolicyId`, `PolicyName`, and `PolicyStatus`. |
| Desc | Boolean | No | false | The sorting order. Valid values: `true`: descending. `false` (default): ascending. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| PageSize |
integer |
The number of mitigation policies displayed on each page. Default value: 20. Valid values: an integer from 1 to 500. |
20 |
| RequestId |
string |
The request ID. |
153ca2cd-3c01-44be-2e83-64dbc6c88630 |
| PageNumber |
integer |
The page number. Valid values: 1 to 100000. Default value: 1. |
1 |
| TotalCount |
integer |
The total number of mitigation policies. |
15 |
| Policies |
array<object> |
The list of mitigation policies. |
|
|
object |
|||
| PolicyStatus |
string |
The status of the mitigation policy. The value is the same as the `PolicyStatus` field in the `QueryArgs` request parameter. |
on |
| DefenseScene |
string |
The mitigation scenario. The value is the same as the `DefenseScenes` field in the `QueryArgs` request parameter. |
custom_acl |
| DomainCount |
integer |
The number of domain names that use the mitigation policy. |
22 |
| PolicyName |
string |
The name of the mitigation policy. |
policy_test |
| PolicyId |
integer |
The ID of the mitigation policy. |
100001 |
| RuleCount |
integer |
The number of rules in the mitigation policy. |
9 |
| GmtModified |
string |
The time when the policy was last modified. The time is in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
2021-12-29T17:08:45Z |
| PolicyType |
string |
Indicates whether the policy is a default mitigation policy. The value is the same as the `PolicyType` field in the `QueryArgs` request parameter. |
default |
Examples
Success response
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
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.