search_index
(**kwargs)¶The query search index.
Requires permission to access the SearchIndex action.
See also: AWS API Documentation
Request Syntax
response = client.search_index(
indexName='string',
queryString='string',
nextToken='string',
maxResults=123,
queryVersion='string'
)
[REQUIRED]
The search query string. For more information about the search query syntax, see Query syntax.
null
if there are no additional results.dict
Response Syntax
{
'nextToken': 'string',
'things': [
{
'thingName': 'string',
'thingId': 'string',
'thingTypeName': 'string',
'thingGroupNames': [
'string',
],
'attributes': {
'string': 'string'
},
'shadow': 'string',
'deviceDefender': 'string',
'connectivity': {
'connected': True|False,
'timestamp': 123,
'disconnectReason': 'string'
}
},
],
'thingGroups': [
{
'thingGroupName': 'string',
'thingGroupId': 'string',
'thingGroupDescription': 'string',
'attributes': {
'string': 'string'
},
'parentGroupNames': [
'string',
]
},
]
}
Response Structure
(dict) --
nextToken (string) --
The token used to get the next set of results, or null
if there are no additional results.
things (list) --
The things that match the search query.
(dict) --
The thing search index document.
thingName (string) --
The thing name.
thingId (string) --
The thing ID.
thingTypeName (string) --
The thing type name.
thingGroupNames (list) --
Thing group names.
attributes (dict) --
The attributes.
shadow (string) --
The unnamed shadow and named shadow.
For more information about shadows, see IoT Device Shadow service.
deviceDefender (string) --
Contains Device Defender data.
For more information about Device Defender, see Device Defender.
connectivity (dict) --
Indicates whether the thing is connected to the Amazon Web Services IoT Core service.
connected (boolean) --
True if the thing is connected to the Amazon Web Services IoT Core service; false if it is not connected.
timestamp (integer) --
The epoch time (in milliseconds) when the thing last connected or disconnected. If the thing has been disconnected for approximately an hour, the time value might be missing.
disconnectReason (string) --
The reason why the client is disconnected. If the thing has been disconnected for approximately an hour, the disconnectReason
value might be missing.
thingGroups (list) --
The thing groups that match the search query.
(dict) --
The thing group search index document.
thingGroupName (string) --
The thing group name.
thingGroupId (string) --
The thing group ID.
thingGroupDescription (string) --
The thing group description.
attributes (dict) --
The thing group attributes.
parentGroupNames (list) --
Parent group names.
Exceptions
IoT.Client.exceptions.InvalidRequestException
IoT.Client.exceptions.ThrottlingException
IoT.Client.exceptions.UnauthorizedException
IoT.Client.exceptions.ServiceUnavailableException
IoT.Client.exceptions.InternalFailureException
IoT.Client.exceptions.ResourceNotFoundException
IoT.Client.exceptions.InvalidQueryException
IoT.Client.exceptions.IndexNotReadyException