CmdID / aws / aws iotthingsgraph
aws iotthingsgraph search-things
Searches for things associated with the specified entity. AWS CLI reference
1 example 4 options Its page in the AWS CLI reference
Examples
To search for things associated with devices and device models
The following search-things example searches for all things that are associated with the HCSR501MotionSensor device.
aws iotthingsgraph search-things --entity-id "urn:tdm:aws/examples:Device:HCSR501MotionSensor"Identify--entity-idThe ID of the entity to which the things are associated.Its output
{
"things": [
{
"thingArn": "arn:aws:iot:us-west-2:123456789012:thing/MotionSensor1",
"thingName": "MotionSensor1"
},
{
"thingArn": "arn:aws:iot:us-west-2:123456789012:thing/TG_MS",
"thingName": "TG_MS"
}
]
}Options
--entity-idThe ID of the entity to which the things are associated.--max-resultsThe maximum number of results to return in the response.--namespace-versionThe version of the user's namespace.--next-tokenThe string that specifies the next page of results.