Call AttachDdosToAccelerator to attach an Anti-DDoS Pro or Anti-DDoS Premium instance to a Global Accelerator instance. This protects your Global Accelerator applications from large-scale DDoS attacks and ensures service stability and availability.
Operation description
Note:
- AttachDdosToAccelerator is an asynchronous operation. After you send a request, the system returns a request ID, but the operation is still being performed in the background. You can call DescribeAccelerator or ListAccelerators to query the status of the Global Accelerator instance:
If the Global Accelerator instance is in the configuring state, the Anti-DDoS Pro or Anti-DDoS Premium instance is being attached. In this state, you can only perform query operations.
If the Global Accelerator instance is in the active state, the Anti-DDoS Pro or Anti-DDoS Premium instance is attached.
Do not concurrently call the AttachDdosToAccelerator operation for the same Global Accelerator instance.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ga:AttachDdosToAccelerator |
update |
*Accelerator
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| AcceleratorId |
string |
Yes |
The ID of the Global Accelerator instance to which you want to attach an Anti-DDoS Pro or Anti-DDoS Premium instance. |
ga-bp1odcab8tmno0hdq**** |
DdosId
deprecated
|
string |
No |
The ID of the Anti-DDoS Pro or Anti-DDoS Premium instance to attach to the Global Accelerator instance. |
ddoscoo-cn-zz11vq7j**** |
DdosRegionId
deprecated
|
string |
No |
The region where the Anti-DDoS Pro or Anti-DDoS Premium instance resides. Valid values:
|
cn-hangzhou |
| RegionId |
string |
No |
The ID of the region where the Global Accelerator instance is deployed. Set the value to cn-hangzhou. |
cn-hangzhou |
| DdosConfigList |
array<object> |
No |
The list of Anti-DDoS Pro or Anti-DDoS Premium instances to attach to the Global Accelerator instance. |
|
|
object |
No |
The list of Anti-DDoS Pro or Anti-DDoS Premium instances to attach to the Global Accelerator instance. |
||
| DdosRegionId |
string |
No |
The region where the Anti-DDoS Pro or Anti-DDoS Premium instance resides. Valid values:
|
cn-hangzhou |
| DdosId |
string |
No |
The ID of the Anti-DDoS Pro or Anti-DDoS Premium instance to attach to the Global Accelerator instance. |
ddoscoo-cn-zz11vq7j**** |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run. Valid values:
|
true |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
DdosId
deprecated
|
string |
The ID of the Anti-DDoS Pro or Anti-DDoS Premium instance that is attached to the Global Accelerator instance. |
ddoscoo-cn-zz11vq7j**** |
| RequestId |
string |
The request ID. |
DE77A7F3-3B74-41C0-A5BC-CAFD188C28B6 |
| GaId |
string |
The ID of the Global Accelerator instance to which the Anti-DDoS Pro or Anti-DDoS Premium instance is attached. |
ga-bp1odcab8tmno0hdq**** |
Examples
Success response
JSON format
{
"DdosId": "ddoscoo-cn-zz11vq7j****",
"RequestId": "DE77A7F3-3B74-41C0-A5BC-CAFD188C28B6",
"GaId": "ga-bp1odcab8tmno0hdq****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | DdosId.Error | Failed to find the DDoS instance based on the DDoS ID. | Failed to find the DDoS instance based on the DDoS ID. |
| 400 | NoPermission.GaDdosRoleSession | You are not authorized to perform the operation. | The user does not have permissions to create service linked roles. Contact the Alibaba Cloud account owner or the permission administrator to grant the current user AliyunGlobalAccelerationFullAccess or create custom permission policies for service linked role. The following content describes the detailed information about custom permission policies: ServiceName: ddos.ga.aliyuncs.com. Service linked role name: AliyunServiceRoleForGaAntiDDos. Permission: ram:CreateServiceLinkedRole. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.