You can use tags to manage products, devices, or device groups based on your business requirements. This article describes how to add tags.

Prerequisites

A product, a device, and a device group are created. For more information, see the following articles:

Background information

In IoT scenarios, you need to manage a large number of products and devices. Alibaba Cloud IoT Platform provides tags to identify various products and devices and achieve centralized management. You can attach different tags to products, devices, or device groups and manage these resources based on the tags.

Usage notes

  • The format of a tag is Key:Value.
  • Each product, device, or device group can have up to 100 tags.

Add product tags

A product tag describes the information that is common to all devices of a product, such as the manufacturer, organization, physical size, and operating system of the product.

  1. Log on to the IoT Platform console.
  2. In the left-side navigation pane, choose Devices > Products.
  3. On the Products page, find the product to which you want to add a tag and click View in the Actions column.
  4. Click Edit next to Tag Information.
    Product tag
  5. In the Edit Tag dialog box, set the Tag key and Tag value parameters. Then, click OK.
    Parameter Description
    Tag key The key of the tag. The key must be 1 to 30 characters in length and can contain letters, digits, and periods (.).
    Tag value The value of the tag. The value must be 1 to 128 characters in length and can contain letters, digits, underscores (_), hyphens (-), colons (:), and periods (.).

Add device tags

You can add unique tags to devices based on device features. This allows you to manage your devices with ease. For example, you can add the room:201 tag to a smart meter in Room 201.

  • You can forward device tags in IoT Platform. For more information about data formats, see Device tags.
  • You can also add a device tag to the body of a message that is sent by the device. Then, you can send the message to other Alibaba Cloud services by using the data forwarding feature of the rules engine. For more information about data formats, see Submit device tag changes.
  1. In the left-side navigation pane, choose Devices > Devices.
  2. On the Devices page, find the device to which you want to add a tag and click View in the Actions column.
  3. On the Device Details page, click Edit next to Tag Information.
    Device tag
  4. In the Edit Tag dialog box, click Add Tag and set the Tag key and Tag value parameters.
    Parameter Description
    Tag key The key of the tag. The key must be 1 to 30 characters in length and can contain letters, digits, forward slashes (/), underscores (_), hyphens (-), number signs (#), at signs (@), percent signs (%), ampersands (&), asterisks (*), and periods (.).
    Tag value The value of the tag. The value must be 1 to 128 characters in length and can contain letters, digits, Japanese characters, underscores (_), hyphens (-), number signs (#), at signs (@), percent signs (%), ampersands (&), colons (:), and periods (.).
  5. Click OK.

Add group tags

Device groups are used to manage devices across products. A group tag describes the information that is common to all devices and subgroups of a device group, such as the region and location where the devices reside.

  1. In the left-side navigation pane, choose Devices > Groups.
  2. On the Groups page, find the device group to which you want to add a tag and click View in the Actions column.
  3. Click Edit next to Tag Information.
    Group tag
  4. In the Edit Tag dialog box, set the Tag key and Tag value parameters. Then, click OK.
    Parameter Description
    Tag key The key of the tag. The key must be 1 to 30 characters in length and can contain letters, digits, and periods (.).
    Tag value The value of the tag. The value must be 1 to 128 characters in length and can contain letters, digits, underscores (_), hyphens (-), colons (:), and periods (.).

Manage multiple tags at a time

You can create, edit, and delete tags in the IoT Platform console. You can also call the API operations provided by IoT Platform to manage tags or query products, devices, and groups based on tags. For more information, see List of operations by function.