DetachFromPolicy
1. API Description
This API is used to remove a protection strategy from a protection target.
2. Input Parameters
The following request parameter list only provides API request parameters.
policyId
Yes
String
Protection strategy ID.
ipv4IdList
No
Array of String
List of protection targets.
3. Output Parameters
requestId
String
The unique request ID, which is returned for each request. RequestId is required for locating a problem.
4. Code Example
Remove a protection strategy from a protection target.
POST /api/v2/zec HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: DetachFromPolicy
<Common Request Params>
Request:
{
"policyId": "<policyId>",
"ipv4IdList": ["eipId1","eipId2"]
}
Response:
{
"requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
"response": {
"requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3"
}
}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_IP_NOT_CONFIG
No IPv4 or IPv6 address is configured for the protection strategy.
404
INVALID_DDOS_POLICY_NOT_FOUND
The protection strategy does not exist.
404
INVALID_EIP_NOT_FOUND
The elastic IP is not found.
404
INVALID_IPV6_NOT_FOUND
The IPv6 address is not found.
403
INVALID_IPV6_STATUS
The IPv6 address is not active.
400
OPERATION_DENIED_EIP_DDOS_POLICY_NOT_FOUND
The elastic IP is not linked to a protection strategy.
500
OPERATION_DENIED_EIP_STATUS_NOT_SUPPORT
The elastic IP state does not support this operation.
400
OPERATION_DENIED_IPV6_DDOS_POLICY_NOT_FOUND
No protection strategy is linked to the IPv6 address.
Last updated