Help Center/ Cloud Bastion Host/ User Guide/ Resource/ Managing Resource Labels
Updated on 2026-11-09 GMT+08:00

Managing Resource Labels

Scenarios

You can set labels to identify and group host and application resources managed in a bastion host. In this way, you can identify all resources related to a managed host or application resource.

After a label is added to a resource, all resources related to the resource will be labeled. In this way, you can search for resources by label.

As show in Figure 1, each managed resource, such as ECSs and RDS instances, is tagged with two labels. Label 1 is identified by team, and Label 2 and Label 3 are identified by project. You can search for resources by label.

Figure 1 Label example

Notes and Constraints

  • You can define resource labels for your exclusive use as long as you have required permission. Labels cannot be shared among system users.
  • A resource can have up to 10 labels.
  • If a label is not used by any resources, the system will automatically delete it.

Prerequisites

Your role has the management permission for the corresponding resource modules (Host, Application Publish, Host Operations, and App Operations). For details about the permissions of each role, see Role.

Adding a Label to a Resource

The following describes how to add a label to a host resource. The method to add labels for other types of resources is similar. Their entries are listed in Resource Label Operation Entries and Supported Actions.

  1. Log in to your bastion host system.
  2. In the navigation pane on the left, choose Resource > Host to go to the host resource management page.
  3. Add labels to host resources as required.

    • Adding a label to a single resource
      1. Locate the row that contains the target host resource, and click the resource name or Manage in the Operation column to go to the details page.
      2. In the Basic Info area, click Edit on the right.
      3. Enter a custom label in the Label text box.
        • A maximum of 20 characters are allowed. Spaces are not allowed.
        • Press Enter to automatically create the label.
        • If the entered label is incorrect, click to delete it.
      4. Click OK.
    • Adding a label to multiple resources at once
      1. On the host list page, select all the target host resources.
      2. Click Add Label below the list.
      3. Enter a custom label in the Label text box.
        • A maximum of 20 characters are allowed. Spaces are not allowed.
        • Press Enter to automatically create the label.
        • If the entered label is incorrect, click to delete it.
      4. Click OK.

  4. Return to the host list and view the added labels in the Label column.

Querying Resources by Label

The following describes how to query host resources by label. The method to query other types of resources by label is similar. Their entries are listed in Resource Label Operation Entries and Supported Actions.

  1. Log in to your bastion host system.
  2. In the navigation pane on the left, choose Resource > Host to go to the host resource management page.
  3. In the Label column on the host list page, click .
  4. Select a match method.

    • Any match: A host can be filtered out as long as it contains one of the selected labels.
    • Match All: A host can be filtered out only when it contains all the selected labels.

  5. Select the labels for the query. The hosts that meet the query conditions appear in the host list.

Deleting a Resource Label

The following describes how to delete a label from a host resource. The method to delete labels for other types of resources is similar. Their entries are listed in Resource Label Operation Entries and Supported Actions.

  1. Log in to your bastion host system.
  2. In the navigation pane on the left, choose Resource > Host to go to the host resource management page.
  3. Delete host resource labels as required.

    • Deleting a label from a single resource
      1. Locate the row that contains the target host resource, and click the resource name or Manage in the Operation column to go to the details page.
      2. In the Basic Info area, click Edit on the right.
      3. In the Label text box, click on the right of the label to delete it.
      4. Click OK.
    • Deleting labels from multiple resources at once
      1. On the host list page, select all the target host resources.
      2. Click Delete Label below the list.
      3. Click OK.

        All labels on the selected hosts will be deleted.

Resource Label Operation Entries and Supported Actions

Table 1 Label usage description

Operation Entry

Supported Operation

Dashboard > Recently Logged Hosts

Search for resources.

Dashboard > Recently Logged Apps

Search for resources.

Dashboard > My Hosts

Search for resources.

Dashboard > My Apps

Search for resources.

Resource > Host > Host List

Add, delete, or edit labels and search for resources by labels.

Resource > Application > App List

Add, delete, or edit labels and search for resources by labels.

Operation > Host Operations

Add or delete labels and search for resources by label.

Operation > App Operations

Add or delete labels and search for resources by label.