Associates an Anti-DDoS Pro or Anti-DDoS Premium instance with a Global Accelerator (GA) instance.
Operation description
When you call this operation, take note of the following items:
-
AttachDdosToAccelerator is an asynchronous operation. After you send a request, the system returns a request ID and runs the task in the background. You can call the DescribeAccelerator or ListAccelerators operation to query the status of the GA instance.
- If the GA instance is in the configuring state, the Anti-DDoS Pro or Anti-DDoS Premium instance is being associated with the GA instance. In this case, you can perform only query operations.
- If the GA instance is in the active state, the Anti-DDoS Pro or Anti-DDoS Premium instance is associated with the GA instance.
-
You cannot repeatedly call the AttachDdosToAccelerator operation for the same GA instance within a specific period of time.
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
ga:AttachDdosToAccelerator | update |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
AcceleratorId | string | Yes | The ID of the GA instance with which the Anti-DDoS Pro/Premium instance is associated. | ga-bp1odcab8tmno0hdq**** |
DdosId | string | Yes | The ID of the Anti-DDoS Pro/Premium instance to be associated with the GA instance. | ddoscoo-cn-zz11vq7j**** |
DdosRegionId | string | Yes | The region where the Anti-DDoS Pro/Premium instance is deployed. Valid values:
| cn-hangzhou |
RegionId | string | No | The ID of the region where the GA instance is deployed. Set the value to cn-hangzhou. | cn-hangzhou |
Response parameters
Examples
Sample success responses
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. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|