Changes the accelerated domain names that are associated with a protection policy.
Usage notes
- You can call this operation up to 20 times per second.
- Alibaba Cloud Dynamic Route for CDN (DCDN) supports POST requests.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ModifyDcdnWafPolicyDomains | The operation that you want to perform. Set the value to ModifyDcdnWafPolicyDomains. |
PolicyId | Long | Yes | 1000001 | The ID of the protection policy. You can specify only one ID in each request. |
Method | Integer | No | 0 | The association method. Valid values:
Note
|
BindDomains | String | No | example.com,example2.com | The domain names that you want to associate with the protection policy. You can specify up to 50 domain names. Separate multiple domain names with commas (,). Note You can configure only one of the BindDomains and UnbindDomains parameters. |
UnbindDomains | String | No | example3.com | The domain names that you want to disassociate from the protection policy. You can specify up to 50 domain names. Separate multiple domain names with commas (,). Note You can configure only one of the BindDomains and UnbindDomains parameters. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | CB1A380B-09F0-41BB-2B35-72F8FD6DA2FE | The ID of the request. |
Examples
Sample requests
http(s)://dcdn.aliyuncs.com/?Action=ModifyDcdnWafPolicyDomains
&PolicyId=1000001
&Method=0
&BindDomains=example.com,example2.com
&UnbindDomains=example3.com
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ModifyDcdnWafPolicyDomainsResponse>
<RequestId>CB1A380B-09F0-41BB-2B35-72F8FD6DA2FE</RequestId>
</ModifyDcdnWafPolicyDomainsResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "CB1A380B-09F0-41BB-2B35-72F8FD6DA2FE"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParameter | The specified parameter is invalid. | The error message returned because the specified parameter value is invalid. |
400 | Policy.NotExist | The specified policy does not exist. | The error message returned because the specified protection policy does not exist. |
400 | DomainBindAndUnbind.Overlapped | The specified bind and unbind domain names overlap. | The error message returned because the specified domain names that you want to associate and disassociate are the same. |
400 | Domain.Bound.DefaultAndCustom | The specified domain name is bound to both default and custom policies. | The error message returned because the specified domain name is associated with both the default policy and a custom policy. |
400 | DefenseScene.MultiPolicies.NotSupport | The specified defense scene does not support multiple policies bound to the same domain name. | The error message returned because a domain name cannot be associated with multiple policies in the specified protection scenario. |
500 | InternalError | An internal error occurred; please try again later. | The error message returned because an internal error occurred. Try again later. If the error persists, submit a ticket. |
For a list of error codes, see Service error codes.