IoT / Client / list_thing_types

list_thing_types#

IoT.Client.list_thing_types(**kwargs)#

Lists the existing thing types.

Requires permission to access the ListThingTypes action.

See also: AWS API Documentation

Request Syntax

response = client.list_thing_types(
    nextToken='string',
    maxResults=123,
    thingTypeName='string'
)
Parameters:
  • nextToken (string) – To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.

  • maxResults (integer) – The maximum number of results to return in this operation.

  • thingTypeName (string) – The name of the thing type.

Return type:

dict

Returns:

Response Syntax

{
    'thingTypes': [
        {
            'thingTypeName': 'string',
            'thingTypeArn': 'string',
            'thingTypeProperties': {
                'thingTypeDescription': 'string',
                'searchableAttributes': [
                    'string',
                ],
                'mqtt5Configuration': {
                    'propagatingAttributes': [
                        {
                            'userPropertyKey': 'string',
                            'thingAttribute': 'string',
                            'connectionAttribute': 'string'
                        },
                    ]
                }
            },
            'thingTypeMetadata': {
                'deprecated': True|False,
                'deprecationDate': datetime(2015, 1, 1),
                'creationDate': datetime(2015, 1, 1)
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    The output for the ListThingTypes operation.

    • thingTypes (list) –

      The thing types.

      • (dict) –

        The definition of the thing type, including thing type name and description.

        • thingTypeName (string) –

          The name of the thing type.

        • thingTypeArn (string) –

          The thing type ARN.

        • thingTypeProperties (dict) –

          The ThingTypeProperties for the thing type.

          • thingTypeDescription (string) –

            The description of the thing type.

          • searchableAttributes (list) –

            A list of searchable thing attribute names.

            • (string) –

          • mqtt5Configuration (dict) –

            The configuration to add user-defined properties to enrich MQTT 5 messages.

            • propagatingAttributes (list) –

              An object that represents the propagating thing attributes and the connection attributes.

              • (dict) –

                An object that represents the connection attribute, thing attribute, and the user property key.

                • userPropertyKey (string) –

                  The key of the user property key-value pair.

                • thingAttribute (string) –

                  The user-defined thing attribute that is propagating for MQTT 5 message enrichment.

                • connectionAttribute (string) –

                  The attribute associated with the connection between a device and Amazon Web Services IoT Core.

        • thingTypeMetadata (dict) –

          The ThingTypeMetadata contains additional information about the thing type including: creation date and time, a value indicating whether the thing type is deprecated, and a date and time when it was deprecated.

          • deprecated (boolean) –

            Whether the thing type is deprecated. If true, no new things could be associated with this type.

          • deprecationDate (datetime) –

            The date and time when the thing type was deprecated.

          • creationDate (datetime) –

            The date and time when the thing type was created.

    • nextToken (string) –

      The token for the next set of results. Will not be returned if operation has returned all results.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException

  • IoT.Client.exceptions.ThrottlingException

  • IoT.Client.exceptions.UnauthorizedException

  • IoT.Client.exceptions.ServiceUnavailableException

  • IoT.Client.exceptions.InternalFailureException