A tag is a key-value pair provided by Tencent Cloud for identifying cloud resources. Tags help you easily classify and manage TDMQ for CKafka resources from various dimensions, such as business, purpose, and owner.
Note:
Tencent Cloud will not use the tags you set. Tags are only used for you to manage CKafka resources.
Out of consideration for independent permissions and risks, each tag bound to CKafka supports only one tag value.
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
Background
A company has 10 CKafka instances on Tencent Cloud, which are distributed across three departments (e-commerce, gaming, and entertainment) and serve businesses including marketing campaigns, game A, game B, and post-production. The Ops owners of the three departments are Tom, Jerry, and Harry, respectively.
Setting Tags
To facilitate management, the company uses tags to classify and manage corresponding CKafka resources and defines the following tag keys/values.
|
| E-commerce, gaming, and entertainment |
| Marketing campaigns, game A, game B, and post-production |
| |
Bind the tag keys and tag values to CKafka resources. The relationships between the resources and the tag keys/values are shown in the table below:
Take ckafka-1jqwv1 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 CKafka Console
Take the above case as an example. After you design tag keys and tag values, you can log in to the CKafka console to set tags.
2. On the Instance List page, select a region and the clusters for which you want to edit tags, and click Edit Tag at the top of the page.
3. In the Edit Tags pop-up window, set 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 in the upper-right corner of the page.
2. In the window that pops up after Tag:, select the tag you want to search for and click OK to search. For example, if you select Tag: owner:tom, you can obtain the clusters bound to the tag key owner:tom.
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 select specific content in Resource Type.
3. Click Query Resources, select the resources to be edited in the results, click Edit Tags, and bind or unbind tags in batches.