2021/11/30 - AWS IoT - 3 updated api methods
Changes Added the ability to enable/disable IoT Fleet Indexing for Device Defender and Named Shadow information, and search them through IoT Fleet Indexing APIs.
{'thingIndexingConfiguration': {'deviceDefenderIndexingMode': 'OFF | ' 'VIOLATIONS', 'namedShadowIndexingMode': 'OFF | ON'}}
Gets the indexing configuration.
Requires permission to access the GetIndexingConfiguration action.
See also: AWS API Documentation
Request Syntax
client.get_indexing_configuration()
dict
Response Syntax
{ 'thingIndexingConfiguration': { 'thingIndexingMode': 'OFF'|'REGISTRY'|'REGISTRY_AND_SHADOW', 'thingConnectivityIndexingMode': 'OFF'|'STATUS', 'deviceDefenderIndexingMode': 'OFF'|'VIOLATIONS', 'namedShadowIndexingMode': 'OFF'|'ON', 'managedFields': [ { 'name': 'string', 'type': 'Number'|'String'|'Boolean' }, ], 'customFields': [ { 'name': 'string', 'type': 'Number'|'String'|'Boolean' }, ] }, 'thingGroupIndexingConfiguration': { 'thingGroupIndexingMode': 'OFF'|'ON', 'managedFields': [ { 'name': 'string', 'type': 'Number'|'String'|'Boolean' }, ], 'customFields': [ { 'name': 'string', 'type': 'Number'|'String'|'Boolean' }, ] } }
Response Structure
(dict) --
thingIndexingConfiguration (dict) --
Thing indexing configuration.
thingIndexingMode (string) --
Thing indexing mode. Valid values are:
REGISTRY – Your thing index contains registry data only.
REGISTRY_AND_SHADOW - Your thing index contains registry and shadow data.
OFF - Thing indexing is disabled.
thingConnectivityIndexingMode (string) --
Thing connectivity indexing mode. Valid values are:
STATUS – Your thing index contains connectivity status. To enable thing connectivity indexing, thingIndexMode must not be set to OFF.
OFF - Thing connectivity status indexing is disabled.
deviceDefenderIndexingMode (string) --
Device Defender indexing mode. Valid values are:
VIOLATIONS – Your thing index contains Device Defender violations. To enable Device Defender indexing, deviceDefenderIndexingMode must not be set to OFF.
OFF - Device Defender indexing is disabled.
For more information about Device Defender violations, see Device Defender Detect.
namedShadowIndexingMode (string) --
Named shadow indexing mode. Valid values are:
ON – Your thing index contains named shadow. To enable thing named shadow indexing, namedShadowIndexingMode must not be set to OFF.
OFF - Named shadow indexing is disabled.
For more information about Shadows, see IoT Device Shadow service.
managedFields (list) --
Contains fields that are indexed and whose types are already known by the Fleet Indexing service.
(dict) --
Describes the name and data type at a field.
name (string) --
The name of the field.
type (string) --
The data type of the field.
customFields (list) --
Contains custom field names and their data type.
(dict) --
Describes the name and data type at a field.
name (string) --
The name of the field.
type (string) --
The data type of the field.
thingGroupIndexingConfiguration (dict) --
The index configuration.
thingGroupIndexingMode (string) --
Thing group indexing mode.
managedFields (list) --
Contains fields that are indexed and whose types are already known by the Fleet Indexing service.
(dict) --
Describes the name and data type at a field.
name (string) --
The name of the field.
type (string) --
The data type of the field.
customFields (list) --
A list of thing group fields to index. This list cannot contain any managed fields. Use the GetIndexingConfiguration API to get a list of managed fields.
Contains custom field names and their data type.
(dict) --
Describes the name and data type at a field.
name (string) --
The name of the field.
type (string) --
The data type of the field.
{'things': {'deviceDefender': 'string'}}
The query search index.
Requires permission to access the SearchIndex action.
See also: AWS API Documentation
Request Syntax
client.search_index( indexName='string', queryString='string', nextToken='string', maxResults=123, queryVersion='string' )
string
The search index name.
string
[REQUIRED]
The search query string.
string
The token used to get the next set of results, or null if there are no additional results.
integer
The maximum number of results to return at one time.
string
The query version.
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.
(string) --
attributes (dict) --
The attributes.
(string) --
(string) --
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.
(string) --
(string) --
parentGroupNames (list) --
Parent group names.
(string) --
{'thingIndexingConfiguration': {'deviceDefenderIndexingMode': 'OFF | ' 'VIOLATIONS', 'namedShadowIndexingMode': 'OFF | ON'}}
Updates the search configuration.
Requires permission to access the UpdateIndexingConfiguration action.
See also: AWS API Documentation
Request Syntax
client.update_indexing_configuration( thingIndexingConfiguration={ 'thingIndexingMode': 'OFF'|'REGISTRY'|'REGISTRY_AND_SHADOW', 'thingConnectivityIndexingMode': 'OFF'|'STATUS', 'deviceDefenderIndexingMode': 'OFF'|'VIOLATIONS', 'namedShadowIndexingMode': 'OFF'|'ON', 'managedFields': [ { 'name': 'string', 'type': 'Number'|'String'|'Boolean' }, ], 'customFields': [ { 'name': 'string', 'type': 'Number'|'String'|'Boolean' }, ] }, thingGroupIndexingConfiguration={ 'thingGroupIndexingMode': 'OFF'|'ON', 'managedFields': [ { 'name': 'string', 'type': 'Number'|'String'|'Boolean' }, ], 'customFields': [ { 'name': 'string', 'type': 'Number'|'String'|'Boolean' }, ] } )
dict
Thing indexing configuration.
thingIndexingMode (string) -- [REQUIRED]
Thing indexing mode. Valid values are:
REGISTRY – Your thing index contains registry data only.
REGISTRY_AND_SHADOW - Your thing index contains registry and shadow data.
OFF - Thing indexing is disabled.
thingConnectivityIndexingMode (string) --
Thing connectivity indexing mode. Valid values are:
STATUS – Your thing index contains connectivity status. To enable thing connectivity indexing, thingIndexMode must not be set to OFF.
OFF - Thing connectivity status indexing is disabled.
deviceDefenderIndexingMode (string) --
Device Defender indexing mode. Valid values are:
VIOLATIONS – Your thing index contains Device Defender violations. To enable Device Defender indexing, deviceDefenderIndexingMode must not be set to OFF.
OFF - Device Defender indexing is disabled.
For more information about Device Defender violations, see Device Defender Detect.
namedShadowIndexingMode (string) --
Named shadow indexing mode. Valid values are:
ON – Your thing index contains named shadow. To enable thing named shadow indexing, namedShadowIndexingMode must not be set to OFF.
OFF - Named shadow indexing is disabled.
For more information about Shadows, see IoT Device Shadow service.
managedFields (list) --
Contains fields that are indexed and whose types are already known by the Fleet Indexing service.
(dict) --
Describes the name and data type at a field.
name (string) --
The name of the field.
type (string) --
The data type of the field.
customFields (list) --
Contains custom field names and their data type.
(dict) --
Describes the name and data type at a field.
name (string) --
The name of the field.
type (string) --
The data type of the field.
dict
Thing group indexing configuration.
thingGroupIndexingMode (string) -- [REQUIRED]
Thing group indexing mode.
managedFields (list) --
Contains fields that are indexed and whose types are already known by the Fleet Indexing service.
(dict) --
Describes the name and data type at a field.
name (string) --
The name of the field.
type (string) --
The data type of the field.
customFields (list) --
A list of thing group fields to index. This list cannot contain any managed fields. Use the GetIndexingConfiguration API to get a list of managed fields.
Contains custom field names and their data type.
(dict) --
Describes the name and data type at a field.
name (string) --
The name of the field.
type (string) --
The data type of the field.
dict
Response Syntax
{}
Response Structure
(dict) --