All Products
Search
Document Center

Edge Security Acceleration:DescribeDcdnWafPolicies

Last Updated:Sep 11, 2025

Queries the details of configured Web Application Firewall (WAF) mitigation policies.

Operation description

Note

A single user can make up to 20 calls per second.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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: QueryArgs={"PolicyIds":"mitigation policy ID","RuleIds":"mitigation rule ID range","PolicyNameLike":"mitigation policy name","DomainNames":"protected domain name","PolicyType":"default","DefenseScenes":"waf_group","PolicyStatus":"on","OrderBy":"GmtModified","Desc":"false"}

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

NameTypeRequiredExampleDescription
PolicyIdsstringNo10000001,10000002The list of mitigation policy IDs. This is a term query. Separate multiple IDs with a comma (,).
RuleIdsstringNo20000001,20000055The list of rule IDs. This is a term query. Separate multiple IDs with a comma (,).
PolicyNameLikestringNopolicy_testThe 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 (_).
DomainNamesstringNoexample.comThe 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 (,).
PolicyTypestringNodefaultSpecifies whether the policy is a default mitigation policy. Valid values: `default`: a default mitigation policy. `custom`: a custom mitigation policy.
DefenseScenesstringNocustom_aclThe 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.
PolicyStatusstringNoonThe status of the policy. Valid values: `on`: enabled. `off`: disabled.
OrderBystringNoGmtModifiedThe field by which to sort the results. Valid values: `GmtModified`, `PolicyId`, `PolicyName`, and `PolicyStatus`.
DescBooleanNofalseThe 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.