All Products
Search
Document Center

ApsaraMQ for RocketMQ:Manage tags

Last Updated:Mar 10, 2026

As your ApsaraMQ for RocketMQ resources grow, identifying specific instances, topics, and groups becomes harder. Tags are key-value pairs that you attach to resources to classify them by purpose, environment, owner, or any dimension you choose. After tagging, you can filter and search resources across any of those dimensions.

Manage tags through the ApsaraMQ for RocketMQ console or programmatically through API operations.

How tags work

Assign one or more tags to a resource to group related resources and locate them quickly.

For example, the following tags organize topics by environment and team ownership:

ResourceTag keyTag value
order-topicEnvironmentProduction
order-topicTeamCommerce
test-order-topicEnvironmentTesting
test-order-topicTeamCommerce
log-topicEnvironmentProduction
log-topicTeamPlatform

This tagging scheme lets you filter all production topics, find all topics owned by a specific team, or combine both filters to narrow results further.

Tag management overview

Tags also support cost allocation. For details, see Cost allocation rules and best practices.

Tag rules and limits

Important

Do not store sensitive information -- such as passwords, API keys, or personally identifiable information -- in tag keys or values. Tags are stored as plain text and may appear in cost reports, API responses, and audit logs.

Each tag key must be unique within a single resource. To change a key's value (for example, from city:shanghai to city:shenzhen), update the existing tag rather than adding a duplicate.

For guidance on designing a tagging strategy, see Tags.

Key constraints

ConstraintDetail
Length1 to 64 Unicode characters
Case sensitivityCase-sensitive
Prohibited prefixesCannot start with aliyun or acs:
Prohibited contentCannot contain http:// or https://
Empty stringNot allowed

Value constraints

ConstraintDetail
Length1 to 64 Unicode characters
Case sensitivityCase-sensitive
Prohibited contentCannot contain http:// or https://
Empty stringAllowed

Resource limits

LimitDetail
Maximum tags per resource20
Tag scopeRegion-specific. Tags created in China (Hangzhou) are not visible in China (Shanghai).

Prerequisites

Before you begin, make sure that you have:

Add, modify, or remove tags

Tag operations for instances, topics, and groups follow the same steps. The following procedure uses an instance as an example.

  1. Log on to the ApsaraMQ for RocketMQ console. In the left-side navigation pane, click Instances.

  2. In the top navigation bar, select the region where your instance is deployed, for example, China (Hangzhou).

  3. On the Instances page, locate your instance. In the Tags column, hover over the tag icon and click Edit.

    Edit tag icon

  4. In the Configure Tags dialog box, perform any of the following actions:

    • Add a tag: Enter a Tag Key and Tag Value, then click OK.

    • Modify a tag: Change the Tag Key or Tag Value of an existing row, or enter a new key-value pair in a new row. Click OK.

    • Remove a tag: Click the delete icon icon next to the key-value pair to delete, then click OK.

Filter resources by tag

Filtering by tag works the same way for instances, topics, and groups. The following steps use instances as an example.

  1. On the Instances page, click Filter by Tag.

    Filter by Tag button

  2. Select a tag key, then select a tag value. The list updates automatically to show only instances with the specified tag.

    Filtered results

Manage tags through API

Use the following API operations to manage tags programmatically -- for example, to tag resources in bulk or integrate tagging into automation workflows:

API operationDescription
TagResourcesAdd tags to resources
ListTagResourcesQuery tags on resources
UntagResourcesRemove tags from resources