AWS IoT

2022/07/20 - AWS IoT - 2 updated api methods

Changes  GA release the ability to enable/disable IoT Fleet Indexing for Device Defender and Named Shadow information, and search them through IoT Fleet Indexing APIs. This includes Named Shadow Selection as a part of the UpdateIndexingConfiguration API.

GetIndexingConfiguration (updated) Link ¶
Changes (response)
{'thingIndexingConfiguration': {'filter': {'namedShadowNames': ['string']}}}

Gets the indexing configuration.

Requires permission to access the GetIndexingConfiguration action.

See also: AWS API Documentation

Request Syntax

client.get_indexing_configuration()
rtype

dict

returns

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'
            },
        ],
        'filter': {
            'namedShadowNames': [
                'string',
            ]
        }
    },
    '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.

      • filter (dict) --

        Provides additional filters for specific data sources. Named shadow is the only data source that currently supports and requires a filter. To add named shadows to your fleet indexing configuration, set namedShadowIndexingMode to be ON and specify your shadow names in filter .

        • namedShadowNames (list) --

          The shadow names that you select to index. The default maximum number of shadow names for indexing is 10. To increase the limit, see Amazon Web Services IoT Device Management Quotas in the Amazon Web Services General Reference .

          • (string) --

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

UpdateIndexingConfiguration (updated) Link ¶
Changes (request)
{'thingIndexingConfiguration': {'filter': {'namedShadowNames': ['string']}}}

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'
            },
        ],
        'filter': {
            'namedShadowNames': [
                'string',
            ]
        }
    },
    thingGroupIndexingConfiguration={
        'thingGroupIndexingMode': 'OFF'|'ON',
        'managedFields': [
            {
                'name': 'string',
                'type': 'Number'|'String'|'Boolean'
            },
        ],
        'customFields': [
            {
                'name': 'string',
                'type': 'Number'|'String'|'Boolean'
            },
        ]
    }
)
type thingIndexingConfiguration

dict

param thingIndexingConfiguration

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.

  • filter (dict) --

    Provides additional filters for specific data sources. Named shadow is the only data source that currently supports and requires a filter. To add named shadows to your fleet indexing configuration, set namedShadowIndexingMode to be ON and specify your shadow names in filter .

    • namedShadowNames (list) --

      The shadow names that you select to index. The default maximum number of shadow names for indexing is 10. To increase the limit, see Amazon Web Services IoT Device Management Quotas in the Amazon Web Services General Reference .

      • (string) --

type thingGroupIndexingConfiguration

dict

param thingGroupIndexingConfiguration

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.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --