O recurso ALIYUN::IOT::DeviceGroup cria um grupo.
Crie grupos nas seguintes regiões:
Shanghai
Singapura (Singapura)
Japão (Tóquio)
Alemanha (Frankfurt)
EUA (Vale do Silício)
EUA (Virgínia)
Sintaxe
{
"Type": "ALIYUN::IOT::DeviceGroup",
"Properties": {
"SuperGroupId": String,
"GroupName": String,
"GroupDesc": String,
"IotInstanceId": String
}
}
Propriedades
| Parâmetro | Tipo | Obrigatório | Editável | Descrição | Restrição |
| SuperGroupId | String | Não | Descontinuado | ID do grupo pai. Para criar um grupo de nível -1, não especifique este parâmetro. | Nenhuma |
| GroupName | String | Sim | Não compatível | Nome do grupo de dispositivos. | O nome deve ter de 4 a 30 caracteres e pode conter caracteres chineses, letras maiúsculas, letras minúsculas, dígitos e sublinhados (_).
Nota Um caractere chinês ocupa dois caracteres. |
| GroupDesc | String | Não compatível | Compatível | Descrição do grupo de API. | O comprimento não pode exceder 100 caracteres.
Nota Um caractere chinês ocupa dois caracteres. |
| IotInstanceId | String | Não | Descontinuado | ID da instância. | Este parâmetro não é necessário para instâncias públicas. |
Valor de retorno
Fn::GetAtt
GroupId: ID do grupo. Corresponde ao identificador globalmente único gerado pelo sistema para o grupo.
IotInstanceId: ID da instância.
Exemplos
Formato JSON
{
"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"
]
}
}
}
}
Formato YAML
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