Glue / Client / search_assets

search_assets

Glue.Client.search_assets(**kwargs)

Searches for assets in Glue Data Catalog using full-text search, filters, sorting, and aggregations. Returns matching assets with relevance-ranked results.

See also: AWS API Documentation

Request Syntax

response = client.search_assets(
    SearchText='string',
    MaxResults=123,
    NextToken='string',
    Sort={
        'Attribute': 'string',
        'Order': 'ASCENDING'|'DESCENDING'
    },
    FilterClause={
        'AndAllFilters': [
            {'... recursive ...'},
        ],
        'OrAnyFilters': [
            {'... recursive ...'},
        ],
        'AttributeFilter': {
            'Attribute': 'string',
            'Operator': 'equals'|'greaterThan'|'greaterThanOrEquals'|'lessThan'|'lessThanOrEquals'|'notExists',
            'Value': {
                'StringValue': 'string',
                'LongValue': 123
            }
        },
        'MapFilter': {
            'Attribute': 'string',
            'Key': 'string',
            'Value': {
                'StringValue': 'string'
            }
        }
    }
)
Parameters:
  • SearchText (string) – The text to search for. At least one of searchText or filterClause must be provided.

  • MaxResults (integer) – The maximum number of results to return in the response.

  • NextToken (string) – A continuation token, if this is a continuation call.

  • Sort (dict) –

    The sort criteria for the search results.

    • Attribute (string) – [REQUIRED]

      The attribute to sort by.

    • Order (string) –

      The sort order. Valid values are ASCENDING and DESCENDING.

  • FilterClause (dict) –

    The filter clause to apply to the search. Supports nested AND/OR logic with attribute-level and map-level filters.

    Note

    This is a Tagged Union structure. Only one of the following top level keys can be set: AndAllFilters, OrAnyFilters, AttributeFilter, MapFilter.

    • AndAllFilters (list) –

      A list of filter clauses that must all match (logical AND).

      • (dict) –

        A filter clause that supports nested boolean logic. Exactly one of andAllFilters, orAnyFilters, attributeFilter, or mapFilter must be specified.

        Note

        This is a Tagged Union structure. Only one of the following top level keys can be set: AndAllFilters, OrAnyFilters, AttributeFilter, MapFilter.

    • OrAnyFilters (list) –

      A list of filter clauses where at least one must match (logical OR).

      • (dict) –

        A filter clause that supports nested boolean logic. Exactly one of andAllFilters, orAnyFilters, attributeFilter, or mapFilter must be specified.

        Note

        This is a Tagged Union structure. Only one of the following top level keys can be set: AndAllFilters, OrAnyFilters, AttributeFilter, MapFilter.

    • AttributeFilter (dict) –

      A filter on a single attribute value.

      • Attribute (string) – [REQUIRED]

        The attribute name to filter on.

      • Operator (string) – [REQUIRED]

        The comparison operator. Valid values are equals, greaterThan, greaterThanOrEquals, lessThan, lessThanOrEquals, and notExists.

      • Value (dict) –

        The value to compare against.

        Note

        This is a Tagged Union structure. Only one of the following top level keys can be set: StringValue, LongValue.

        • StringValue (string) –

          A string filter value.

        • LongValue (integer) –

          A long integer filter value.

    • MapFilter (dict) –

      A filter on a map attribute’s key-value pair.

      • Attribute (string) – [REQUIRED]

        The map attribute name to filter on.

      • Key (string) – [REQUIRED]

        The key within the map attribute to filter on.

      • Value (dict) – [REQUIRED]

        The value to compare against.

        Note

        This is a Tagged Union structure. Only one of the following top level keys can be set: StringValue.

        • StringValue (string) –

          A string filter value.

Return type:

dict

Returns:

Response Syntax

{
    'Items': [
        {
            'Id': 'string',
            'AssetName': 'string',
            'AssetDescription': 'string',
            'UpdatedAt': datetime(2015, 1, 1),
            'AssetTypeId': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • Items (list) –

      The list of assets matching the search criteria.

      • (dict) –

        A single search result item representing a matched asset.

        • Id (string) –

          The unique identifier of the matched asset.

        • AssetName (string) –

          The name of the matched asset.

        • AssetDescription (string) –

          The description of the matched asset.

        • UpdatedAt (datetime) –

          The timestamp at which the matched asset was last updated.

        • AssetTypeId (string) –

          The identifier of the asset type for the matched asset.

    • NextToken (string) –

      A continuation token, present if the current segment is not the last.

Exceptions

  • Glue.Client.exceptions.AccessDeniedException

  • Glue.Client.exceptions.InvalidInputException

  • Glue.Client.exceptions.InternalServiceException

  • Glue.Client.exceptions.ThrottlingException