Creates a service-linked role.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ServiceName |
string |
Yes |
The cloud service name associated with the service-linked role. For more information, see the Cloud service identity column in Cloud services that support service-linked roles. |
polardb.aliyuncs.com |
| CustomSuffix |
string |
No |
The suffix of the role name. The total length of the role name (including the suffix) is 1 to 64 characters and can contain letters, digits, periods (.), and hyphens (-). Example: If the suffix is Example, the role name is ServiceLinkedRoleName_Example, and the maximum length cannot exceed 64 characters. |
Example |
| Description |
string |
No |
The description of the service-linked role. You can specify a role description only for service-linked roles that allow custom suffixes. Otherwise, the role description uses a preset value and cannot be modified. The description must be 1 to 1,024 characters in length. |
Service Linked Role for PolarDB. PolarDB will use this role to access your resources in other services. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
FE58D7CF-03BC-432A-B42D-BC3390C8C2E1 |
| Role |
object |
The role information. |
|
| Arn |
string |
The resource descriptor of the role. |
acs:ram::177242285274****:role/aliyunserviceroleforpolardb |
| AssumeRolePolicyDocument |
string |
The trust policy document of the role. |
{\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":[\"polardb.aliyuncs.com\"]}}],\"Version\":\"1\"} |
| CreateDate |
string |
The time when the role was created (UTC). |
2024-06-30T08:14:16Z |
| Description |
string |
The description of the role. |
Service Linked Role for PolarDB. PolarDB will use this role to access your resources in other services. |
| IsServiceLinkedRole |
boolean |
Indicates whether the role is a service-linked role. Valid values:
|
true |
| RoleId |
string |
The role ID. |
32833240981067**** |
| RoleName |
string |
The role name. |
AliyunServiceRoleForPolarDB |
Examples
Success response
JSON format
{
"RequestId": "FE58D7CF-03BC-432A-B42D-BC3390C8C2E1\n",
"Role": {
"Arn": "acs:ram::177242285274****:role/aliyunserviceroleforpolardb\n",
"AssumeRolePolicyDocument": "{\\\"Statement\\\":[{\\\"Action\\\":\\\"sts:AssumeRole\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":[\\\"polardb.aliyuncs.com\\\"]}}],\\\"Version\\\":\\\"1\\\"}\n",
"CreateDate": "2024-06-30T08:14:16Z\n",
"Description": "Service Linked Role for PolarDB. PolarDB will use this role to access your resources in other services.",
"IsServiceLinkedRole": true,
"RoleId": "32833240981067****\n",
"RoleName": "AliyunServiceRoleForPolarDB"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.