IoT.Client.
list_thing_groups_for_thing
(**kwargs)¶List the thing groups to which the specified thing belongs.
Requires permission to access the ListThingGroupsForThing action.
See also: AWS API Documentation
Request Syntax
response = client.list_thing_groups_for_thing(
thingName='string',
nextToken='string',
maxResults=123
)
[REQUIRED]
The thing name.
nextToken
value from a previous response; otherwise null to receive the first set of results.dict
Response Syntax
{
'thingGroups': [
{
'groupName': 'string',
'groupArn': 'string'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
thingGroups (list) --
The thing groups.
(dict) --
The name and ARN of a group.
groupName (string) --
The group name.
groupArn (string) --
The group ARN.
nextToken (string) --
The token to use to get the next set of results, or null if there are no additional results.
Exceptions
IoT.Client.exceptions.InvalidRequestException
IoT.Client.exceptions.InternalFailureException
IoT.Client.exceptions.ResourceNotFoundException
IoT.Client.exceptions.ThrottlingException