Help Center/ Auto Scaling/ User Guide/ AS Group and Instance Monitoring/ Adding Tags to AS Groups and Instances
Updated on 2025-10-27 GMT+08:00

Adding Tags to AS Groups and Instances

Scenarios

If you have many resources of the same type, you can use tags to manage resources flexibly. You can identify specified resources quickly using the tags allocated to them.

Using a tag, you can assign custom data to each AS group. You can organize and manage AS groups, for example, classify AS group resources by usage, owner, or environment.

Each tag contains a key and a value. You can specify the key and value for each tag. A key can be a category associated with certain values, such as usage, owner, and environment.

For example, if you want to distinguish between the test environment and production environment, you can allocate a tag with the key environment to each AS group. For the test environment, the key value is test and for the production environment, the key value is production. You are advised to use one or more groups of consistent tags to manage your AS group resources.

After you allocate a tag to an AS group, the system will automatically add the tag to the instances automatically created in the AS group. If you add a tag to an AS group or modify the tag, the new tag will be added to the ECSs automatically created in the AS group. Creating, deleting, or modifying the tag of an AS group will have no impact on the ECSs in the AS group.

Restrictions of Using Tags

You must observe the following rules when using tags:
  • By default, each AS group can have a maximum of 10 tags added to it.
  • Each tag contains a key and a value.
  • You can set the tag value to an empty character string.
  • If you delete an AS group, all tags of it will also be deleted.
  • If you have configured tag policies for AS, add tags to AS groups based on the tag policies. If you add a tag that does not comply with the tag policies, AS groups may fail to be created or the tags may fail to be added or modified. Contact your administrator to learn more about tag policies.

Adding Tags

  1. Log in to the management console.
  2. Under Compute, click Auto Scaling. In the navigation pane on the left, choose Instance Scaling. Then click the AS Groups tab.
  3. Click the AS group name. On the AS group details page, click the Tags tab and then click Add Tag.
  4. Set the parameters listed in Table 1.
    Table 1 Tag naming rules

    Parameter

    Requirement

    Example Value

    Tag Key

    • It cannot be empty.
    • Each key must be unique to the AS group.
    • A key can contain a maximum of 36 characters, including digits, letters, underscores (_), hyphens (-), and Unicode characters from \u4e00 to \u9fff.

    Organization

    Tag Value

    • It can be an empty string.
    • Only one tag value can be added to a tag key.
    • A tag value can contain a maximum of 43 characters, including digits, letters, underscores (_), periods (.), hyphens (-), and Unicode characters from \u4e00 to \u9fff.

    Apache

  5. Click OK.

Modifying or Deleting Tags of an AS Group

  1. Log in to the management console.
  1. Under Compute, click Auto Scaling. In the navigation pane on the left, choose Instance Scaling. Then click the AS Groups tab.
  2. Click the AS group name. On the Overview page, click the Tags tab.
  3. Locate the row that contains the tag and click Edit or Delete in the Operation column.

    After clicking Edit, configure required parameters. For details, see Table 1.

    After you click Delete, the added tag will be deleted.

Searching for AS Groups by Tag

  1. Log in to the management console.
  1. Under Compute, click Auto Scaling. In the navigation pane on the left, choose Instance Scaling. Then click the AS Groups tab.
  2. Click the search box above the AS group list. In the displayed dialog box, select the key and value of the resource tag. The system searches for the target AS group based on the tag key and value.
    1. You can only select existing keys and values from the tag list.
    2. You can select multiple tags to search for AS groups. If you select more than one tag, the AS groups with any of the specified tags will be returned.
    3. You can select tags and other search criteria to search for AS groups. The AS groups that meet any of the selected search criteria will be returned.