ALIYUN::IOT::DeviceGroup is used to create a group.

You can create a group in the following regions:
  • Shanghai
  • Singapore (Singapore)
  • Japan (Tokyo)
  • Germany (Frankfurt)
  • US (Silicon Valley)
  • US (Virginia)

Syntax

{
  "Type": "ALIYUN::IOT::DeviceGroup",
  "Properties": {
    "SuperGroupId": String,
    "GroupName": String,
    "GroupDesc": String,
    "IotInstanceId": String
  }
}

Properties

Parameter Type Required Editable Description Constraint
SuperGroupId String No Released The ID of the parent group. To create a level -1 group, do not specify this parameter. None
GroupName String Yes Not supported The name of a device group. The name must be 4 to 30 characters in length, and can contain Chinese characters, uppercase letters, lowercase letters, digits, and underscores (_).
Note A Chinese character occupies two characters.
GroupDesc String Not supported Supported The description of the API group. The length cannot exceed 100 characters.
Note A Chinese character occupies two characters.
IotInstanceId String No Released The ID of the instance. This parameter is not required for public instances.

Return value

Fn::GetAtt

  • GroupId: The group ID, which is the globally unique identifier generated by the system for the group.
  • IotInstanceId: The ID of the instance.

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "DeviceGroup": {
      "Type": "ALIYUN::IOT::DeviceGroup",
      "Properties": {
        "IotInstanceId": {
          "Ref": "IotInstanceId"
        },
        "SuperGroupId": {
          "Ref": "SuperGroupId"
        },
        "GroupDesc": {
          "Ref": "GroupDesc"
        },
        "GroupName": {
          "Ref": "GroupName"
        }
      }
    }
  },
  "Parameters": {
    "IotInstanceId": {
      "Type": "String",
      "Description": "Public instance does not pass this parameter; instance that you need to buy the incoming instance ID."
    },
    "SuperGroupId": {
      "Type": "String",
      "Description": "The ID of the parent group.\nIf you want to create a first-level group, do not enter this parameter."
    },
    "GroupDesc": {
      "Type": "String",
      "Description": "The description of the group. You can enter a description with up to 100 characters."
    },
    "GroupName": {
      "Type": "String",
      "Description": "The name of the group. The name can contain Chinese characters, English letters, digits, and underscores (_). The length must be 4 to 30 characters (a Chinese character counts as two characters)."
    }
  },
  "Outputs": {
    "GroupId": {
      "Description": "Packet, ID, System for the globally unique identifier generated packet.",
      "Value": {
        "Fn::GetAtt": [
          "DeviceGroup",
          "GroupId"
        ]
      }
    },
    "IotInstanceId": {
      "Description": "IOT instance ID.",
      "Value": {
        "Fn::GetAtt": [
          "DeviceGroup",
          "IotInstanceId"
        ]
      }
    }
  }
}

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Resources:
  DeviceGroup:
    Type: 'ALIYUN::IOT::DeviceGroup'
    Properties:
      IotInstanceId:
        Ref: IotInstanceId
      SuperGroupId:
        Ref: SuperGroupId
      GroupDesc:
        Ref: GroupDesc
      GroupName:
        Ref: GroupName
Parameters:
  IotInstanceId:
    Type: String
    Description: >-
      Public instance does not pass this parameter; instance that you need to
      buy the incoming instance ID.
  SuperGroupId:
    Type: String
    Description: |-
      The ID of the parent group.
      If you want to create a first-level group, do not enter this parameter.
  GroupDesc:
    Type: String
    Description: >-
      The description of the group. You can enter a description with up to 100
      characters.
  GroupName:
    Type: String
    Description: >-
      The name of the group. The name can contain Chinese characters, English
      letters, digits, and underscores (_). The length must be 4 to 30
      characters (a Chinese character counts as two characters).
Outputs:
  GroupId:
    Description: 'Packet, ID, System for the globally unique identifier generated packet.'
    Value:
      'Fn::GetAtt':
        -DeviceGroup
        -GroupId
  IotInstanceId:
    Description: IOT instance ID.
    Value:
      'Fn::GetAtt':
        -DeviceGroup
        -IotInstanceId