All Products
Search
Document Center

Edge Security Acceleration:DescribeDcdnWafPolicy

Last Updated:Oct 17, 2024

Queries the details of a protection policy.

Operation description

Note 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
PolicyIdlongYes

The ID of the protection policy. You can specify only one ID in each request.

1000001

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

66A98669-CC6E-4F3E-80A6-3014697B11AE
Policyobject

The information about the protection policy.

PolicyStatusstring

The status of the protection policy. Valid values:

  • on
  • off
on
DefenseScenestring

The type of the protection policy. Valid values:

  • waf_group: basic web protection
  • custom_acl: custom protection
  • whitelist: whitelist
waf_group
DomainCountinteger

The number of domain names that use the protection policy.

22
RuleConfigsstring

The protection rule configurations corresponding to the protection policy. The configurations only support Bot management. For more information, see BatchCreateDcdnWafRules .

{ "type":"target_type", "status":"on", "config":{"target":"app"}, "action":"" }
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 the current policy is the default policy. Valid values:

  • default
  • custom
default

Examples

Sample success responses

JSONformat

{
  "RequestId": "66A98669-CC6E-4F3E-80A6-3014697B11AE",
  "Policy": {
    "PolicyStatus": "on",
    "DefenseScene": "waf_group",
    "DomainCount": 22,
    "RuleConfigs": "{     \"type\":\"target_type\",     \"status\":\"on\",     \"config\":{\"target\":\"app\"},     \"action\":\"\"   }",
    "PolicyName": "policy_test",
    "PolicyId": 100001,
    "RuleCount": 9,
    "GmtModified": "2021-12-29T17:08:45Z",
    "PolicyType": "default"
  }
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParameterThe specified parameter is invalid.A parameter is set to an invalid value.

For a list of error codes, visit the Service error codes.