Overview
Tag is a mark provided by Tencent Cloud for identifying cloud resources, and is a key-value pair (Key-Value). Tags help you conveniently classify and manage TDMQ for MQTT resources from various dimensions (such as business, purpose, responsible person, and so on).
Note:
Tencent Cloud does not use the tags you set; tags are only used for your management of TDMQ MQTT resources.
Use Limits
Quantity Limits
A resource can be bound with up to 50 tags.
Naming Limits
|
Tag keys that start with qcs:, project:, or project are reserved in the system and cannot be created. | - |
In UTF-8 format, a tag key must contain 1 to 127 Unicode characters. | In UTF-8 format, a tag value must contain 1 to 255 Unicode characters. |
Tag keys and values can contain characters, spaces, digits, and special characters in UTF-8 format, but cannot start or end with a space. Supported characters in English mode: + - = . _ : / @ ( ) [ ] , ; > < Supported characters in Chinese mode: + - = / @ ( ) [ ] : |
|
Tag keys and values are case-sensitive. |
|
Usage Examples
Case Description
Case: A company has 6 Message Queue for MQTT clusters on Tencent Cloud. The usage departments, business scopes, and responsible personnel information for these 6 clusters are as follows:
|
mqtt-qg40xwvj | E-commerce | Marketing campaigns | Tom |
mqtt-qg41xwvj | E-commerce | Marketing campaigns | Harry |
mqtt-qg42xwvj | Gaming | Game A | Jerry |
mqtt-qg43xwvj | Gaming | Game B | Harry |
mqtt-qg44xwvj | Entertainment | Post-production | Harry |
mqtt-qg45xwvj | Entertainment | Post-production | Tom |
Take mqtt-qg40xwvj as an example, we can add the following three sets of Tags to this instance:
|
dept | ecommerce |
business | mkt |
owner | tom |
Similarly, you can also set appropriate tags for other queue resources based on their departments, business scopes, and owners.
Setting Tags in the TDMQ for MQTT Console
When we take the above scenario as an example, after designing the tag keys and values, you can log in to the TDMQ for MQTT console to set tags.
2. On the Cluster page, select a region, select the clusters for which you want to edit tags, and click Edit Resource Tag at the top of the page.
3. In the Edit Tags pop-up window, set tags.
For example: add three sets of tags to the amqp-qg40xwvj cluster.
Note:
If the existing tags do not meet your requirements, go to the Tag Management page to create tags. 4. Click OK, and the system will display a message indicating that the modification is successful. You can view the bound tags in the Resource Tag column of the cluster.
Filtering Resources by Tag Key
To filter out the clusters bound to specific tags, perform the following steps:
1. Select tag in the search box at the top-right corner of the page.
2. In the window displayed after Tag:, select the tag you want to search for and click OK.
3. For example: select Tag: owner:zhangsan to filter clusters bound to the tag key owner:zhangsan.
Editing Tags
1. On the cluster management list page, select a region and the clusters for which you want to edit tags, and click Edit Resource Tags at the top of the page.
Note:
You can edit tags for up to 20 resources in batches.
2. In the Edit Tags pop-up window, add, modify, or delete tags based on actual needs.
Managing Resource Tags in a Unified Manner
You can also manage resource tags in a unified manner in the Tag console. The detailed steps are as follows:
2. In the left sidebar, select Resource Tag, select query conditions as needed, and in Resource Type, choose TDMQ for MQTT > MQTT Instance.
3. Click Query Resources.
4. Select the required resources in the query result, and click Edit Tag to bind or unbind tags in batches.