Call this operation to create, update, or delete tags of a group.


You can create up to 100 tags for a group.

Request parameters

Parameter Type Required Description
Action String Yes The action that you want to perform. Set the value to SetDeviceGroupTags.
GroupId String Yes The unique identifier of a group.
TagString String Yes Data of tags in JSON format. TagString consists of tag keys and tag values. Separate tags with commas, for example, TagString="[{"tagKey":"hh","tagValue":"rr"}]". See the following table TagString.

If you want to update a tag, enter the target tag key and specify a new tag value. The new tag value will overwrite the previous tag value.

If you want to delete a tag, do not enter the target tag key or tag value in the request.

Common request parameters - Yes See Common parameters.
Table 1. TagString
Parameter Type Required Description
tagKey String Yes The key of the tag. It can contain English letters, numbers, and dots (.) and be 2-30 characters in length.
tagValue String Yes The value of the tag. It can contain Chinese characters, English letters, numbers, underscores (_), and hyphens (-), and cannot exceed 128 characters. A Chinese character is counted as 2 characters.

Response parameters

Parameter Type Description
RequestId String The globally unique ID generated by Alibaba Cloud for the request.
Success Boolean Indicates whether the call is successful. A value of true indicates that the call is successful. A value of false indicates that the call has failed.
ErrorMessage String The error message returned when the call fails.
Code String For error codes, see Error codes.


Request example
&Common request parameters

Response example

  • JSON format
  • XML format
    <? xml version="1.0" encoding="UTF-8" ? >