All Products
Search
Document Center

ApsaraDB for MongoDB:Create a tag

Last Updated:Oct 17, 2025

If you have many instances, you can create tags and attach them to the instances for categorization. You can then filter instances by tag.

Prerequisites

Log on to the MongoDB console using an Alibaba Cloud account. Resource Access Management (RAM) users do not have the permission to manage or use tags.

Limits

  • A tag is a key-value pair. For a specific Alibaba Cloud account, a tag key must be unique within a region. Tag values do not have this restriction.

    Note

    A tag value is optional.

  • You can edit tags for a maximum of 50 instances in a single operation.

  • You can attach a maximum of 20 tags to an instance.

  • You can attach or detach a maximum of 20 tags in a single operation.

Procedure

  1. Log on to the MongoDB console.

  2. In the navigation pane on the left, click Replica Set Instances or Sharded Cluster Instances based on the instance type.

  3. In the upper-left corner of the page, select the resource group and region where the target instance is located.

  4. Perform one of the following operations:

    • Create a tag for a single instance

      Hover over the image icon in the Tag column of the target instance, and click Edit Tag.

    • Create tags for multiple instances

      1. Select the instances to which you want to attach tags.

      2. In the lower-left corner of the instance list, click Edit Tag.

  5. In the Edit Tag dialog box, enter a Tag Key and a Tag Value, and then click OK.

    Note

    After you create a tag, you can attach it to other instances.

  6. After the Tag Edited Successfully. message appears, click Close.

Result

After you create and attach a tag to an instance, the tag is displayed in the instance list.