AWS IoT

2018/08/23 - AWS IoT - 3 updated api methods

Changes  This release adds support for IoT Thing Group Indexing and Searching functionality.

GetIndexingConfiguration (updated) Link ¶
Changes (response)
{'thingGroupIndexingConfiguration': {'thingGroupIndexingMode': 'OFF | ON'}}

Gets the search configuration.

See also: AWS API Documentation

Request Syntax

client.get_indexing_configuration()
rtype

dict

returns

Response Syntax

{
    'thingIndexingConfiguration': {
        'thingIndexingMode': 'OFF'|'REGISTRY'|'REGISTRY_AND_SHADOW'
    },
    'thingGroupIndexingConfiguration': {
        'thingGroupIndexingMode': 'OFF'|'ON'
    }
}

Response Structure

  • (dict) --

    • thingIndexingConfiguration (dict) --

      Thing indexing configuration.

      • thingIndexingMode (string) --

        Thing indexing mode. Valid values are:

        • REGISTRY – Your thing index will contain only registry data.

        • REGISTRY_AND_SHADOW - Your thing index will contain registry and shadow data.

        • OFF - Thing indexing is disabled.

    • thingGroupIndexingConfiguration (dict) --

      The index configuration.

      • thingGroupIndexingMode (string) --

        Thing group indexing mode.

SearchIndex (updated) Link ¶
Changes (response)
{'thingGroups': [{'attributes': {'string': 'string'},
                  'parentGroupNames': ['string'],
                  'thingGroupDescription': 'string',
                  'thingGroupId': 'string',
                  'thingGroupName': 'string'}]}

The query search index.

See also: AWS API Documentation

Request Syntax

client.search_index(
    indexName='string',
    queryString='string',
    nextToken='string',
    maxResults=123,
    queryVersion='string'
)
type indexName

string

param indexName

The search index name.

type queryString

string

param queryString

[REQUIRED]

The search query string.

type nextToken

string

param nextToken

The token used to get the next set of results, or null if there are no additional results.

type maxResults

integer

param maxResults

The maximum number of results to return at one time.

type queryVersion

string

param queryVersion

The query version.

rtype

dict

returns

Response Syntax

{
    'nextToken': 'string',
    'things': [
        {
            'thingName': 'string',
            'thingId': 'string',
            'thingTypeName': 'string',
            'thingGroupNames': [
                'string',
            ],
            'attributes': {
                'string': 'string'
            },
            'shadow': '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 shadow.

    • 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) --

UpdateIndexingConfiguration (updated) Link ¶
Changes (request)
{'thingGroupIndexingConfiguration': {'thingGroupIndexingMode': 'OFF | ON'}}

Updates the search configuration.

See also: AWS API Documentation

Request Syntax

client.update_indexing_configuration(
    thingIndexingConfiguration={
        'thingIndexingMode': 'OFF'|'REGISTRY'|'REGISTRY_AND_SHADOW'
    },
    thingGroupIndexingConfiguration={
        'thingGroupIndexingMode': 'OFF'|'ON'
    }
)
type thingIndexingConfiguration

dict

param thingIndexingConfiguration

Thing indexing configuration.

  • thingIndexingMode (string) -- [REQUIRED]

    Thing indexing mode. Valid values are:

    • REGISTRY – Your thing index will contain only registry data.

    • REGISTRY_AND_SHADOW - Your thing index will contain registry and shadow data.

    • OFF - Thing indexing is disabled.

type thingGroupIndexingConfiguration

dict

param thingGroupIndexingConfiguration

Thing group indexing configuration.

  • thingGroupIndexingMode (string) -- [REQUIRED]

    Thing group indexing mode.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --