All Products
Search
Document Center

Dynamic Content Delivery Network:DescribeDcdnWafPolicy

Last Updated:Apr 11, 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

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:DescribeDcdnWafPolicyRead
  • All Resources
    *
    none
none

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.