Adds, updates, or deletes group tags.


  • Each group can have a maximum of 100 tags.
  • Each Alibaba Cloud account can run a maximum of 50 queries per second (QPS).
    Note Resource Access Management (RAM) users of an Alibaba Cloud account share the quota of the account.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes SetDeviceGroupTags

The operation that you want to perform. Set the value to SetDeviceGroupTags.

GroupId String Yes W16X8Tvdosec****

The ID of the group. The ID is the globally unique identifier (GUID) for the group.

IotInstanceId String No iot_instc_pu****_c*-v64********

The instance ID. This parameter is not required for public instances. However, the parameter is required for the instances that you have purchased.

TagString String No [{"tagKey":"h1","tagValue":"rr"},{"tagKey":"7h","tagValue":"rr"}]

The tag data in the JSON format. The TagString parameter consists of a set of key-value pairs. Each tag consists of a tagKey and tagValue. You must specify the tagKey and tagValue parameters for each tag.

  • tagKey: tag key. The key must be 2 to 30 characters in length, and can contain letters, digits, and periods (.).
  • tagValue: tag value. The value can contain letters, digits, underscores (_), and hyphens (-). The value must be 1 to 128 characters in length.

Separate multiple tags with commas (,), for example, [{"tagKey":"h1","tagValue":"rr"},{"tagKey":"7h","tagValue":"rr"}].

If you need to update an existing tag, specify a new value for the tag. The new value overwrites the previous value.

If you need to delete a tag, do not specify a key or value for the tag.

In addition to the preceding operation-specific request parameters, you must specify common request parameters when you call this API operation. For more information, see Common request parameters.

Response parameters

Parameter Type Example Description
Code String iot.system.SystemException

The error code returned if the call fails. For more information, see Error codes.

ErrorMessage String A system exception occurred.

The error message returned if the call fails.

RequestId String 12CFDAF1-99D9-42E0-8C2F-F281DA5E8953

The ID of the request.

Success Boolean true

Indicates whether the call succeeds.

  • true: The call succeeded.
  • false: The call failed.


Sample requests
&<Common request parameters>

Sample success responses

XML format


JSON format


Error codes

For a list of error codes, visit the API Error Center.