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. A tag consists of a tag key and a tag value.

DLI allows you to add tags to Flink jobs. You can add tags to Flink jobs to identify information such as the project name, service type, and background. 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.

DLI supports the following two types of tags:

  • Resource tags: indicate non-global tags created on DLI.
  • 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 includes the following content:

Managing a Job Tag

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

  1. In the left navigation pane of the DLI management console, choose Job Management > Flink Jobs. The Flink Jobs page is displayed.
  2. Click the name of the job to be viewed. The Job Details page is displayed.
  3. Click Tags to display the tag information about the current job.

    Figure 1 Managing a job tag

  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 a tag
    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 tags 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 a Job 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 left navigation pane of the DLI management console, choose Job Management > Flink Jobs. The Flink Jobs page is displayed.
  2. Click Search by Tag in the upper right corner of the page to expand the tag search page.

    Figure 3 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 a Job Tag.

  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 added tags.

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