search_entities

IoTThingsGraph.Client.search_entities(**kwargs)

Searches for entities of the specified type. You can search for entities in your namespace and the public namespace that you're tracking.

Danger

This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.

See also: AWS API Documentation

Request Syntax

response = client.search_entities(
    entityTypes=[
        'DEVICE'|'SERVICE'|'DEVICE_MODEL'|'CAPABILITY'|'STATE'|'ACTION'|'EVENT'|'PROPERTY'|'MAPPING'|'ENUM',
    ],
    filters=[
        {
            'name': 'NAME'|'NAMESPACE'|'SEMANTIC_TYPE_PATH'|'REFERENCED_ENTITY_ID',
            'value': [
                'string',
            ]
        },
    ],
    nextToken='string',
    maxResults=123,
    namespaceVersion=123
)
Parameters
  • entityTypes (list) --

    [REQUIRED]

    The entity types for which to search.

    • (string) --
  • filters (list) --

    Optional filter to apply to the search. Valid filters are NAME NAMESPACE , SEMANTIC_TYPE_PATH and REFERENCED_ENTITY_ID . REFERENCED_ENTITY_ID filters on entities that are used by the entity in the result set. For example, you can filter on the ID of a property that is used in a state.

    Multiple filters function as OR criteria in the query. Multiple values passed inside the filter function as AND criteria.

    • (dict) --

      An object that filters an entity search. Multiple filters function as OR criteria in the search. For example a search that includes a NAMESPACE and a REFERENCED_ENTITY_ID filter searches for entities in the specified namespace that use the entity specified by the value of REFERENCED_ENTITY_ID .

      • name (string) --

        The name of the entity search filter field. REFERENCED_ENTITY_ID filters on entities that are used by the entity in the result set. For example, you can filter on the ID of a property that is used in a state.

      • value (list) --

        An array of string values for the search filter field. Multiple values function as AND criteria in the search.

        • (string) --
  • nextToken (string) -- The string that specifies the next page of results. Use this when you're paginating results.
  • maxResults (integer) -- The maximum number of results to return in the response.
  • namespaceVersion (integer) -- The version of the user's namespace. Defaults to the latest version of the user's namespace.
Return type

dict

Returns

Response Syntax

{
    'descriptions': [
        {
            'id': 'string',
            'arn': 'string',
            'type': 'DEVICE'|'SERVICE'|'DEVICE_MODEL'|'CAPABILITY'|'STATE'|'ACTION'|'EVENT'|'PROPERTY'|'MAPPING'|'ENUM',
            'createdAt': datetime(2015, 1, 1),
            'definition': {
                'language': 'GRAPHQL',
                'text': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • descriptions (list) --

      An array of descriptions for each entity returned in the search result.

      • (dict) --

        Describes the properties of an entity.

        • id (string) --

          The entity ID.

        • arn (string) --

          The entity ARN.

        • type (string) --

          The entity type.

        • createdAt (datetime) --

          The time at which the entity was created.

        • definition (dict) --

          The definition document of the entity.

          • language (string) --

            The language used to define the entity. GRAPHQL is the only valid value.

          • text (string) --

            The GraphQL text that defines the entity.

    • nextToken (string) --

      The string to specify as nextToken when you request the next page of results.

Exceptions

  • IoTThingsGraph.Client.exceptions.InvalidRequestException
  • IoTThingsGraph.Client.exceptions.InternalFailureException
  • IoTThingsGraph.Client.exceptions.ThrottlingException