DescribePolicyDetail
1. API Description
This API is used to get details of a protection strategy.
2. Input Parameters
The following request parameter list only provides API request parameters.
policyId
Yes
String
Protection strategy ID.
3. Output Parameters
requestId
String
The unique request ID, which is returned for each request. RequestId is required for locating a problem.
policyId
String
Protection strategy ID.
policyName
String
The name of the protection strategy.
attachmentIps
Array of String
List of linked protection target IPs.
createTime
String
Creation time.
blackIps
Array of String
IP deny list.
whiteIps
Array of String
IP allow list.
blackIpListExpireAt
Integer
IP deny timeout.
blockProtocols
Array of Protocol
Enabled protocol blocking. UDP and TCP cannot be enabled at the same time.
blockRegions
Array of String
Regions blocked.
4. Code Example
Get protection strategy details.
POST /api/v2/zec HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: DescribePolicyDetail
<Common Request Params>
Request:
{
"policyId": "<policyId>"
}
Response:
{
"requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
"response": {
"requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
"policy": "policyId",
"policyName": "xxx",
"attachmentIps": ["10.0.0.1","10.0.0.2"],
"createTime": "2025-07-16T01:26:39Z",
"blackIps": ["10.0.0.1"],
"whiteIps": ["10.0.0.1"],
"blackIpListExpireAt": 10,
"blockProtocols": ["TCP","UDP"],
"ports": [
{
"protocol": "TCP",
"srcPortStart": 1,
"srcPortEnd": 100,
"dstPortStart": 1,
"dstPortEnd": 100,
"action": "Accept"
}
],
"blockRegions": ["AFG"],
"reflectUdpPort": [
{
"port": 10
}
],
"trafficControl": {
"bpsEnabled": false,
"bps": null,
"ppsEnabled": false,
"pps": null,
"synBPSEnabled": false,
"synBPS": null,
"synPPSEnabled": false,
"synPPS": null
},
"fingerPrintRules": [
{
"protocol": "TCP",
"srcPortStart": 1,
"srcPortEnd": 100,
"dstPortStart": 1,
"dstPortEnd": 100,
"minPktLength": 1,
"maxPktLength": 100,
"offset": 1,
"matchBytes": "xxx",
"action": "Accept"
}
]
}
}5. Developer Resources
Zenlayer Cloud API 2.0 SDKs to make it easier for you to call APIs. More programming languages will be supported.
6. Error Codes
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
404
INVALID_DDOS_POLICY_NOT_FOUND
The protection strategy does not exist.
Last updated