IoT.Client.
create_thing_group
(**kwargs)¶Create a thing group.
Note
This is a control plane operation. See Authorization for information about authorizing control plane actions.
Requires permission to access the CreateThingGroup action.
See also: AWS API Documentation
Request Syntax
response = client.create_thing_group(
thingGroupName='string',
parentGroupName='string',
thingGroupProperties={
'thingGroupDescription': 'string',
'attributePayload': {
'attributes': {
'string': 'string'
},
'merge': True|False
}
},
tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
[REQUIRED]
The thing group name to create.
The thing group properties.
The thing group description.
The thing group attributes in JSON format.
A JSON string containing up to three key-value pair in JSON format. For example:
{\"attributes\":{\"string1\":\"string2\"}}
Specifies whether the list of attributes provided in the AttributePayload
is merged with the attributes stored in the registry, instead of overwriting them.
To remove an attribute, call UpdateThing
with an empty attribute value.
Note
The merge
attribute is only valid when calling UpdateThing
or UpdateThingGroup
.
Metadata which can be used to manage the thing group.
A set of key/value pairs that are used to manage the resource.
The tag's key.
The tag's value.
dict
Response Syntax
{
'thingGroupName': 'string',
'thingGroupArn': 'string',
'thingGroupId': 'string'
}
Response Structure
(dict) --
thingGroupName (string) --
The thing group name.
thingGroupArn (string) --
The thing group ARN.
thingGroupId (string) --
The thing group ID.
Exceptions
IoT.Client.exceptions.InvalidRequestException
IoT.Client.exceptions.ResourceAlreadyExistsException
IoT.Client.exceptions.ThrottlingException
IoT.Client.exceptions.InternalFailureException