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, but SearchThings(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
)
[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
dict
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