All Products
Search
Document Center

Edge Security Acceleration:DescribeDcdnWafPolicies

最終更新日:Oct 17, 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

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

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
Policiesarray<object>

The information about protection policies.

PolicyItemobject
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.