Tags let you categorize and manage your AnalyticDB for MySQL clusters — for example, by team, environment, or cost center. This topic explains how to add tags to a cluster, filter clusters by tag, and remove tags.
Limitations
| Constraint | Details |
|---|---|
| Tags per cluster | Up to 20 |
| Tags added or removed at a time | Up to 20 |
| Tag key uniqueness | Tag keys must be unique per cluster. If you add a tag with the same key as an existing tag, the new tag overwrites the earlier one. |
| Tag namespace scope | Clusters in different regions do not share the same tag namespace. |
| Automatic deletion | When you remove a tag from a cluster, AnalyticDB for MySQL checks whether the tag is applied to any other cluster. If not, the tag is deleted. |
Prerequisites
Before you begin, ensure that you have:
An AnalyticDB for MySQL cluster
Access to the AnalyticDB for MySQL console
Create a tag
Log on to the AnalyticDB for MySQL console. In the upper-left corner, select a region.
In the left-side navigation pane, click Clusters. On the Clusters page, click an edition tab, find the cluster you want to manage, and click the cluster ID.
On the Cluster Information page, go to the Cluster Attributes section and click the
icon next to Tag.In the Configure Tags dialog box, enter a Tag Key and a Tag Value.
If you have existing tags, select one from the Resource Tag drop-down list instead of entering values manually.
Click OK. The tag is added to the cluster.
Filter clusters by tag
Log on to the AnalyticDB for MySQL console. In the upper-left corner, select a region.
In the left-side navigation pane, click Clusters.
Click Filter by Tag, then select a tag key and a tag value to filter clusters.
To clear the filter, click Clear.
Delete a tag
Log on to the AnalyticDB for MySQL console. In the upper-left corner, select a region.
In the left-side navigation pane, click Clusters. On the Clusters page, click an edition tab, find the cluster you want to manage, and click the cluster ID.
On the Cluster Information page, go to the Cluster Attributes section and click the
icon next to Tag.In the Configure Tags dialog box, click the
icon next to the tag you want to delete.Click OK.