IoTThingsGraph / Client / search_things
search_things#
- IoTThingsGraph.Client.search_things(**kwargs)#
Searches for things associated with the specified entity. You can search by both device and device model.
For example, if two different devices, camera1 and camera2, implement the camera device model, the user can associate thing1 to camera1 and thing2 to camera2.
SearchThings(camera2)
will return only thing2, butSearchThings(camera)
will return both thing1 and thing2.This action searches for exact matches and doesn’t perform partial text matching.
Danger
This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.
See also: AWS API Documentation
Request Syntax
response = client.search_things( entityId='string', nextToken='string', maxResults=123, namespaceVersion=123 )
- Parameters:
entityId (string) –
[REQUIRED]
The ID of the entity to which the things are associated.
The IDs should be in the following format.
urn:tdm:REGION/ACCOUNT ID/default:device:DEVICENAME
nextToken (string) – The string that specifies the next page of results. Use this when you’re paginating results.
maxResults (integer) – The maximum number of results to return in the response.
namespaceVersion (integer) – The version of the user’s namespace. Defaults to the latest version of the user’s namespace.
- Return type:
dict
- Returns:
Response Syntax
{ 'things': [ { 'thingArn': 'string', 'thingName': 'string' }, ], 'nextToken': 'string' }
Response Structure
(dict) –
things (list) –
An array of things in the result set.
(dict) –
An AWS IoT thing.
thingArn (string) –
The ARN of the thing.
thingName (string) –
The name of the thing.
nextToken (string) –
The string to specify as
nextToken
when you request the next page of results.
Exceptions
IoTThingsGraph.Client.exceptions.InvalidRequestException
IoTThingsGraph.Client.exceptions.ResourceNotFoundException
IoTThingsGraph.Client.exceptions.InternalFailureException
IoTThingsGraph.Client.exceptions.ThrottlingException