Adds tags to a resource.
Operation description
API operations provided by Alibaba Cloud are used to manage and query resources of Alibaba Cloud services. We recommend that you integrate these API operations only in management systems. Do not use these API operations in the core system of messaging services. Otherwise, system risks may occur.
Attaches tags to resources in ApsaraMQ for RocketMQ. You can use tags to classify resources for easier aggregation and search.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mq:TagResources |
update |
*All Resource
|
None |
|
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
No |
The ID of the ApsaraMQ for RocketMQ instance that contains the resource to which you want to attach tags. Note
This parameter is required when you attach tags to a topic or a group. |
MQ_INST_188077086902****_BXSuW61e |
| ResourceType |
string |
Yes |
The type of the resource to which you want to attach tags. Valid values:
|
TOPIC |
| Tag |
array<object> |
Yes |
The tags that you want to attach to the resource. |
|
|
object |
No |
|||
| Key |
string |
Yes |
The tag key. If you set this parameter, you must also set the Value parameter.
|
FinanceDept |
| Value |
string |
Yes |
The tag value. If you set this parameter, you must also set the Key parameter.
|
FinanceJoshua |
| ResourceId |
array |
Yes |
The resource IDs. |
TopicA |
|
string |
No |
The ID of the resource to which you want to attach a tag.
|
TopicA |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID, which is used for troubleshooting. |
301D2CBE-66F8-403D-AEC0-82582478**** |
Examples
Success response
JSON format
{
"RequestId": "301D2CBE-66F8-403D-AEC0-82582478****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.