If you set the billing method for network usage of a Global Accelerator (GA) instance to pay-by-data-transfer, your Alibaba Cloud account must have the service-linked role AliyunServiceRoleForGaCdt. If your Alibaba Cloud account does not have the service-linked role, the system creates the role for your account. Cloud Data Transfer (CDT) charges you for data transferred by the GA instance.
AliyunServiceRoleForGaCdt
Permissions required to create the service-linked role AliyunServiceRoleForGaCdt
{
"Action": "ram:CreateServiceLinkedRole",
"Resource": "*",
"Effect": "Allow",
"Condition": {
"StringEquals": {
"ram:ServiceName": "cdt.ga.aliyuncs.com"
}
}
}
- Attach the administrator permission policy AliyunGlobalAccelerationFullAccess to the RAM user. For more information, see Grant permissions to a RAM role. Note The permissions required to create the service-linked role AliyunServiceRoleForGaCdt are included in the administrator permission policy AliyunGlobalAccelerationFullAccess. After you attach the administrator permission policy to a RAM user, the RAM user can create the service-linked role AliyunServiceRoleForGaCdt.
- Attach a custom permission policy to a RAM user. The following code block shows the content of the custom permission policy:
{ "Action": "ram:CreateServiceLinkedRole", "Resource": "*", "Effect": "Allow", "Condition": { "StringEquals": { "ram:ServiceName": "cdt.ga.aliyuncs.com" } } }
For more information, see Create custom policies and Grant permissions to a RAM role.
Create the service-linked role AliyunServiceRoleForGaCdt
- If GA does not assume the service-linked role AliyunServiceRoleForGaCdt, the system creates the service-linked role and attaches the AliyunServiceRoleForGaCdt policy to the service-linked role. Then, GA obtains the permissions to access CDT by assuming the service linked role. The following code block shows the content of the permission policy:
{ "Version": "1", "Statement": [ { "Effect": "Allow", "Action": [ "cdt:GetCdtCbServiceStatus", "cdt:GetCdtInternetServiceStatus", "cdt:GetCdtServiceStatus", "cdt:OpenCdtCbService", "cdt:OpenCdtInternetService", "cdt:OpenCdtService" ], "Resource": "*" }, { "Action": "ram:DeleteServiceLinkedRole", "Resource": "*", "Effect": "Allow", "Condition": { "StringEquals": { "ram:ServiceName": "cdt.ga.aliyuncs.com" } } } ] }
- If your Alibaba Cloud account already has the service-linked role AliyunServiceRoleForGaCdt, the system does not create the service-linked role again.
Delete the service-linked role AliyunServiceRoleForGaCdt
The system does not delete the service-linked role AliyunServiceRoleForGaCdt. To delete the service-linked role, you must first delete the GA instance whose billing method for network usage is pay-by-data-transfer. Then, you can delete the service-linked role AliyunServiceRoleForGaCdt. For more information, see Delete a service-linked role.