You can call the AddTagsToResource operation to bind existing or new tags to an ApsaraDB RDS instance.
Operation Description
The AccessKey ID provided to you by Alibaba Cloud.
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 |
---|---|---|---|---|
rds:AddTagsToResource | WRITE |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ClientToken | string | No | The ID of the proxy pattern. | ETnLKlblzczshOTUbOCzxxxxxxx |
proxyId | string | No | The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list. | API |
RegionId | string | Yes | The ID of the instance. NoteYou can enter up to 30 instance IDs in a single request. If you enter more than one instance ID, you must separate the instance IDs with commas (,). | cn-hagnzhou |
DBInstanceId | string | Yes | The tags that you want to bind. Each tag consists of a TagKey and a TagValue. You can specify up to five tags in a single request. Format: {"key1":"value1","key2":"value2"...}. NoteThe TagKey is required, and the TagValue is optional. | rm-uf6wjk5xxxxxxx |
Tags | string | No | The TagKey of the first tag that you want to bind. Each tag consists of a TagKey and a TagValue. You can specify up to five tags in a single request. The TagKey is required, and the TagValue is optional. | {“key1”:”value1”,“key2”:””} |
Tag.1.key | string | No | The TagKey of the second tag that you want to bind. Each tag consists of a TagKey and a TagValue. You can specify up to five tags in a single request. The TagKey is required, and the TagValue is optional. | key1 |
Tag.2.key | string | No | The TagKey of the third tag that you want to bind. Each tag consists of a TagKey and a TagValue. You can specify up to five tags in a single request. The TagKey is required, and the TagValue is optional. | key2 |
Tag.3.key | string | No | The TagKey of the fourth tag that you want to bind. Each tag consists of a TagKey and a TagValue. You can specify up to five tags in a single request. The TagKey is required, and the TagValue is optional. | key3 |
Tag.4.key | string | No | The TagKey of the fifth tag that you want to bind. Each tag consists of a TagKey and a TagValue. You can specify up to five tags in a single request. The TagKey is required, and the TagValue is optional. | key4 |
Tag.5.key | string | No | The TagValue of the first tag that you want to bind. Each tag consists of a TagKey and a TagValue. You can specify up to five tags in a single request. The TagKey is required, and the TagValue is optional. | key5 |
Tag.1.value | string | No | The TagValue of the second tag that you want to bind. Each tag consists of a TagKey and a TagValue. You can specify up to five tags in a single request. The TagKey is required, and the TagValue is optional. | value1 |
Tag.2.value | string | No | The TagValue of the third tag that you want to bind. Each tag consists of a TagKey and a TagValue. You can specify up to five tags in a single request. The TagKey is required, and the TagValue is optional. | value2 |
Tag.3.value | string | No | The TagValue of the fourth tag that you want to bind. Each tag consists of a TagKey and a TagValue. You can specify up to five tags in a single request. The TagKey is required, and the TagValue is optional. | value3 |
Tag.4.value | string | No | The TagValue of the fifth tag that you want to bind. Each tag consists of a TagKey and a TagValue. You can specify up to five tags in a single request. The TagKey is required, and the TagValue is optional. | value4 |
Tag.5.value | string | No | The ID of the request. | value5 |
Response parameters
Examples
Sample success responses
JSON
format
{
"requestId": "224DB9F7-3100-4899-AB9C-C938BCCB43E7"
}
XML
format
<?xml version="1.0" encoding="UTF-8" ?>
<AddTagsToResourceResponse>
<requestId>224DB9F7-3100-4899-AB9C-C938BCCB43E7</requestId></AddTagsToResourceResponse>
Sample failed responses
JSON
format
{
"RequestId": "7463B73D-35CC-4D19-A010-6B8D65D242EF",
"HostId": "rds.aliyuncs.com",
"Code": "UnsupportedOperation",
"Message": "The specified action is not supported."
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||
---|---|---|---|---|---|---|---|---|
2022-06-23 | API Description Update,The error codes of the API operation change. | |||||||
|