You can call the CreateServiceLinkedRole operation to create a service-linked role.
ApsaraDB RDS supports the following service-linked roles:
- The AliyunServiceRoleForRdsPgsqlOnEcs role is used for ApsaraDB RDS for PostgreSQL instances.
- The AliyunServiceRoleForRDSProxyOnEcs role is used for the database proxy feature of ApsaraDB RDS instances.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | CreateServiceLinkedRole |
The operation that you want to perform. Set the value to CreateServiceLinkedRole. |
| RegionId | String | Yes | cn-hangzhou |
The ID of the region where the instance resides. You can call the DescribeRegions operation to query the most recent region list. |
| ServiceLinkedRole | String | Yes | AliyunServiceRoleForRdsPgsqlOnEcs |
The name of the service-linked role.
|
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | B4CAF581-2AC7-41AD-8940-D56DF7AA**** |
The ID of the request. |
Examples
Sample requests
http(s)://rds.aliyuncs.com/?Action=CreateServiceLinkedRole
&RegionId=cn-hangzhou
&ServiceLinkedRole=AliyunServiceRoleForRdsPgsqlOnEcs
&<Common request parameters>
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateServiceLinkedRoleResponse>
<RequestId>B4CAF581-2AC7-41AD-8940-D56DF7AA****</RequestId>
</CreateServiceLinkedRoleResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "B4CAF581-2AC7-41AD-8940-D56DF7AA****"
}
Error codes
For a list of error codes, visit the API Error Center.