Tag Management

A tag is a key-value pair customized by users and used to identify cloud resources. It helps users to classify and search for cloud resources. Tags are composed of key-value pairs.

CS allows you to add tags to jobs, job templates, and clusters. You can add identifiers to items such as the project name, service type, and background information using tags. If you use tags in other cloud services, you are advised to create the same tag key-value pairs for cloud resources used by the same business to keep consistency.

CS supports the following two types of tags:

  • Resource tags: indicate non-global tags created on CS.
  • Predefined tags created on Tag Management Service (TMS). Predefined tags are global tags. For more information about predefined tags, see the Tag Management Service User Guide.

This section is organized as follows:

Managing Job Tags

CS allows you to add, modify, or delete tags for jobs.

  1. In the navigation tree on the left pane of the CS management console, choose Job Management to switch to the Job Management page.
  2. In the row where the target job resides, click the job name in the Name column to switch to the Job Details page.
  3. Click Tags to display the tag information about the current job.

    Figure 1 Managing job tags

  4. Click Add Tag to switch to the Add Tag dialog box.

  5. Configure the tag parameters in the Add Tag dialog box.

    Figure 2 Adding tags
    Table 1 Tag parameters

    Parameter

    Description

    Tag key

    You can perform the following operations:

    • Click the text box and select a predefined tag key from the drop-down list.
      NOTE:

      To add a predefined tag, you need to create one on TMS and select it from the Tag key drop-down list. You can click View Predefined Tag to enter the Predefined Tag page of TMS. Then, click Create Tag to create a predefined tag. For details, see section Creating Predefined Tags in the Tag Management Service User Guide.

    • Enter a tag key in the text box.
      NOTE:

      A tag key contains a maximum of 36 characters. The first and last characters cannot be spaces. The following characters are not allowed: =*,<>\|/

    Tag value

    You can perform the following operations:

    • Click the text box and select a predefined tag value from the drop-down list.
    • Enter a tag value in the text box.
      NOTE:

      A tag value contains a maximum of 43 characters. The first and last characters cannot be spaces. The following characters are not allowed: =*,<>\|/

    • A maximum of 10 tags can be added.
    • Only one tag value can be added to a tag key.
    • The key name must be unique in the same resource.

  6. Click OK.
  7. (Optional) In the tag list, locate the row where the tag whose value you want to edit resides, click Edit in the Operation column to edit the tag value.
  8. (Optional) In the tag list, locate the row where the tag you want to delete resides, click Delete in the Operation column to delete the tag.

Managing Job Template Tags

CS allows you to add, modify, or delete tags for job templates.

  1. In the left navigation pane of the CS management console, click Template Management, Custom Templates.
  2. In the row where the target job resides, click the job template name in the Name column to switch to the Template Details page.
  3. Click Tags to display the tag information about the current job template.

    Figure 3 Managing job template tags

  4. Click Add Tag to switch to the Add Tag dialog box.

  5. Configure the tag parameters in the Add Tag dialog box.

    Figure 4 Adding tags
    Table 2 Tag parameters

    Parameter

    Description

    Tag key

    You can perform the following operations:

    • Click the text box and select a predefined tag key from the drop-down list.
      NOTE:

      To add a predefined tag, you need to create one on TMS and select it from the Tag key drop-down list. You can click View Predefined Tag to enter the Predefined Tag page of TMS. Then, click Create Tag to create a predefined tag. For details, see section Creating Predefined Tags in the Tag Management Service User Guide.

    • Enter a tag key in the text box.
      NOTE:

      A tag key contains a maximum of 36 characters. The first and last characters cannot be spaces. The following characters are not allowed: =*,<>\|/

    Tag value

    You can perform the following operations:

    • Click the text box and select a predefined tag value from the drop-down list.
    • Enter a tag value in the text box.
      NOTE:

      A tag value contains a maximum of 43 characters. The first and last characters cannot be spaces. The following characters are not allowed: =*,<>\|/

    • A maximum of 10 tags can be added.
    • Only one tag value can be added to a tag key.
    • The key name must be unique in the same resource.

  6. Click OK.
  7. (Optional) In the tag list, locate the row where the tag whose value you want to edit resides, click Edit in the Operation column to edit the tag value.
  8. (Optional) In the tag list, locate the row where the tag you want to delete resides, click Delete in the Operation column to delete the tag.

Managing Cluster Tags

CS allows you to add, modify, or delete tags for clusters.

  1. In the navigation tree on the left pane of the CS management console, click Cluster Management to switch to the Cluster Management page.
  2. In the row where the cluster whose tags you want to manage is located, click the cluster name in the Name column to switch to the Cluster Details page.
  3. Click Tab to display the tag information about the current cluster.

    Figure 5 Managing cluster tags

  4. Click Add Tag to switch to the Add Tag dialog box.

  5. Configure the tag parameters in the Add Tag dialog box.

    Figure 6 Adding tags
    Table 3 Tag parameters

    Parameter

    Description

    Tag key

    You can perform the following operations:

    • Click the text box and select a predefined tag key from the drop-down list.
      NOTE:

      To add a predefined tag, you need to create one on TMS and select it from the Tag key drop-down list. You can click View Predefined Tag to enter the Predefined Tag page of TMS. Then, click Create Tag to create a predefined tag. For details, see section Creating Predefined Tags in the Tag Management Service User Guide.

    • Enter a tag key in the text box.
      NOTE:

      A tag key contains a maximum of 36 characters. The first and last characters cannot be spaces. The following characters are not allowed: =*,<>\|/

    Tag value

    You can perform the following operations:

    • Click the text box and select a predefined tag value from the drop-down list.
    • Enter a tag value in the text box.
      NOTE:

      A tag value contains a maximum of 43 characters. The first and last characters cannot be spaces. The following characters are not allowed: =*,<>\|/

    • A maximum of 10 tags can be added.
    • Only one tag value can be added to a tag key.
    • The key name must be unique in the same resource.

  6. Click OK.
  7. (Optional) In the tag list, locate the row where the tag whose value you want to edit resides, click Edit in the Operation column to edit the tag value.
  8. (Optional) In the tag list, locate the row where the tag you want to delete resides, click Delete in the Operation column to delete the tag.

Searching for Jobs by Tag

If tags have been added to a job, you can search for the job by setting tag filtering conditions to quickly find it.

  1. In the navigation tree on the left pane of the CS management console, choose Job Management to switch to the Job Management page.
  2. Click Search by Tag on the right of the current page to expand the tab page.

    Figure 7 Searching for jobs by tag

  3. In the Search by Tag area, click the Tag key text box to select a tag key from the drop-down list and then click the Tag value text box to select the corresponding tag value.

    You can only enter a tag key or value that exists in the drop-down list. If no tag key or value is available, create a tag for the job. For details, see Managing Job Tags.

  4. Click to add the selected tag to the area under the text boxes.

    • Select another tag in the text boxes and click to generate a tag combination for job search. You can add a maximum of 10 tags to search for jobs. If you specify more than one tag, jobs containing all the specified tags will be displayed.
    • To delete an existing tag, click next to the tag.
    • You can click Reset to clear all the added tags.

  5. Click Search. The target job will be displayed in the job list.

Searching for Job Templates by Tag

If tags have been added to a job template, you can search for the job template by setting tag filtering conditions to quickly find it.

  1. In the left navigation pane of the CS management console, click Template Management, Custom Templates.
  2. Click Search by Tag on the right of the current page to expand the tab page.

    Figure 8 Searching for jobs by tag

  3. In the Search by Tag area, click the Tag key text box to select a tag key from the drop-down list and then click the Tag value text box to select the corresponding tag value.

    You can only enter a tag key or value that exists in the drop-down list. If no tag key or value is available, create a tag for the job template. For details, see Managing Job Template Tags.

  4. Click to add the selected tag to the area under the text boxes.

    • Select another tag in the text boxes and click to generate a tag combination for job search. You can add a maximum of 10 tags to search for jobs. If you specify more than one tag, jobs containing all the specified tags will be displayed.
    • To delete an existing tag, click next to the tag.
    • You can click Reset to clear all the added tags.

  5. Click Search. The target job template will be displayed in the job template list.

Searching for Clusters by Tag

If tags have been added to a cluster, you can search for the cluster by setting tag filtering conditions to quickly find it.

  1. In the navigation tree on the left pane of the CS management console, click Cluster Management to switch to the Cluster Management page.
  2. Click Search by Tag on the right of the current page to expand the tab page.

    Figure 9 Searching for jobs by tag

  3. In the Search by Tag area, click the Tag key text box to select a tag key from the drop-down list and then click the Tag value text box to select the corresponding tag value.

    You can only enter a tag key or value that exists in the drop-down list. If no label key or value is available, create a label for the cluster. For details, see Managing Cluster Tags.

  4. Click to add the selected tag to the area under the text boxes.

    • Select another tag in the text boxes and click to generate a tag combination for job search. You can add a maximum of 10 tags to search for jobs. If you specify more than one tag, jobs containing all the specified tags will be displayed.
    • To delete an existing tag, click next to the tag.
    • You can click Reset to clear all the added tags.

  5. Click Search. The target cluster will be displayed in the cluster list.