All Products
Search
Document Center

Dynamic Content Delivery Network:DescribeDcdnWafPolicies

Last Updated:Apr 11, 2024

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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
dcdn:DescribeDcdnWafPoliciesRead
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
QueryArgsstringNo

The query conditions. The value is a JSON string. The format is QueryArgs={"PolicyIds":"The IDs of protection policies","RuleIds":"The IDs of protection rules","PolicyNameLike":"The name of the protection policy","DomainNames":"The protected domain names","PolicyType":"default","DefenseScenes":"waf_group","PolicyStatus":"on","OrderBy":"GmtModified","Desc":"false"}

Note If you do not set this parameter, all protection policies are queried.
{"PolicyNameLIike":"test_policy"}
PageNumberintegerNo

The number of the page to return. Valid values: 1 to 100000. Default value: 1.

1
PageSizeintegerNo

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

NameTypeRequiredExampleDescription
PolicyIdsstringNo10000001,10000002The IDs of protection policies. Separate multiple IDs with commas (,). Only exact match is supported.
RuleIdsstringNo20000001,20000055The IDs of protection rules. Separate multiple IDs with commas (,). Only exact match is supported.
PolicyTypestringNodefaultSpecifies whether the protection policy is the default policy. Valid values: default custom
DefenseScenesstringNocustom_aclThe 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
PolicyStatusstringNoonThe status of the policy. on off
OrderBystringNoGmtModifiedThe field that is used to sort query results. Valid values: GmtModified, PolicyId, PolicyName, and PolicyStatus.
DescBooleanNofalseThe sort order. The value true indicates the reverse chronological order. The value false indicates the chronological order. Default value: false.

Response parameters

ParameterTypeDescriptionExample
object
PageSizeinteger

The number of protection policies returned per page. Valid values: an integer from 1 to 500. Default value: 20.

20
RequestIdstring

The ID of the request.

153ca2cd-3c01-44be-2e83-64dbc6c88630
PageNumberinteger

The page number of the returned page. Valid values: 1 to 100000. Default value: 1.

1
TotalCountinteger

The total number of protection policies.

15
Policiesobject []

The information about protection policies.

PolicyStatusstring

The status of the protection policy, which is the same as the PolicyStatus field in the QueryArgs parameter.

on
DefenseScenestring

The type of the protection policy, which is the same as the DefenseScenes field in the QueryArgs parameter.

custom_acl
DomainCountinteger

The number of domain names that use the protection policy.

22
PolicyNamestring

The name of the protection policy.

policy_test
PolicyIdlong

The ID of the protection policy.

100001
RuleCountlong

The number of protection rules in the protection policy.

9
GmtModifiedstring

The time when the protection policy was modified. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2021-12-29T17:08:45Z
PolicyTypestring

Indicates whether this protection policy is the default policy, which is the same as the PolicyType field in the QueryArgs parameter.

default

Examples

Sample success responses

JSONformat

{
  "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.