Detaches and deletes tags from a resource.

Request limit

Each Alibaba Cloud account can call this operation up to 10 times per second. If the number of requests that you send to call this operation within one second reaches the request limit, new requests fail. This may interrupt your business. For information about the request limit of each operation, see API request limits.


By default, Alibaba Cloud accounts can call this operation. A Resource Access Management (RAM) user can call this operation only after the RAM user is granted the required permissions. The following table describes the permissions that must be granted to a RAM user to call this operation. For information about how to grant permissions, see Policies.








Request parameters

Parameter Type Required Example Description
Action String Yes UntagResources

The operation that you want to perform. Set the value to UntagResources.

InstanceId String No MQ_INST_111111111111_DOxxxxxx

This parameter is required when you detach tags from a topic or a group.

ResourceType String Yes TOPIC

The type of the resource from which you want to detach tags. Valid values:

All Boolean No false

Specifies whether to delete all tags that are attached to the specified resource. This parameter takes effect only when the TagKey.N parameter is not specified. Default value: false.

ResourceId.N String Yes TopicA

The ID of the resource from which you want to detach tags.

TagKey.N String No CartService

The key of the tag that you want to detach.

  • The value of N can be an integer value from 1 to 20.
  • If you include this parameter in a request, the value of this parameter cannot be an empty string.
  • The value of this parameter can be up to 128 characters in length and cannot start with acs: or aliyun, or contain http:// or https://.

Response parameters

Parameter Type Example Description
RequestId String 19780F2E-7841-4E0F-A5D9-C64A0530****

The ID of the request. The system generates a unique ID for each request. You can troubleshoot issues based on the request ID.


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "RequestId" : "19780F2E-7841-4E0F-A5D9-C64A0530****"

Error codes

For a list of error codes, visit the API Error Center.

Detach tags from a resource in the console

In the Message Queue for Apache RocketMQ console, you can detach and delete tags from a resource. For more information, see Overview.