CmdID

CmdID / aws / aws iot

aws iot search-index

Searches the specified index. AWS CLI reference

1 example 5 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To query the thing index

The following search-index example queries the AWS_Things index for things that have a type of LightBulb.

aws iot search-index --index-name "AWS_Things" --query-string "thingTypeName:LightBulb"Identify
--index-nameThe search index name.
--query-stringThe search query string.
Its output, shortened
{
    "things": [
        {
            "thingName": "MyLightBulb",
            "thingId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
            "thingTypeName": "LightBulb",
            "thingGroupNames": [
                "LightBulbs",
                "DeadBulbs"
            ],
            "attributes": {
                "model": "123",
                "wattage": "75"
            },
            "connectivity": {
                "connected": false
            }
        },
        {
            "thingName": "ThirdBulb",
            "thingId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222",
            "thingTypeName": "LightBulb",
            "attributes": {
                "model": "123",
                "wattage": "75"
            },
            "connectivity": {
                "connected": false
            }
        },
… 14 more lines

For more information, see Managing Thing Indexing in the AWS IoT Developer Guide.

Options

5 in the AWS CLI reference
--index-nameThe search index name.
--max-resultsThe maximum number of results to return per page at one time.
--next-tokenThe token used to get the next set of results, or null if there are no additional results.
--query-stringThe search query string.
--query-versionThe query version.