IoT / Client / list_thing_groups_for_thing
list_thing_groups_for_thing#
- 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 )
- Parameters:
thingName (string) –
[REQUIRED]
The thing name.
nextToken (string) – To retrieve the next set of results, the
nextToken
value from a previous response; otherwise null to receive the first set of results.maxResults (integer) – The maximum number of results to return at one time.
- Return type:
dict
- Returns:
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