# Enrich Policies

class elasticsearch.client.EnrichClient

  To use this client, access `client.enrich` from an `Elasticsearch` client. For example:

      from elasticsearch import Elasticsearch

      # Create the client instance
      client = Elasticsearch(...)
      # Use the enrich client
      client.enrich.<method>(...)

  delete_policy(*, name, error_trace=None, filter_path=None, human=None, master_timeout=None, pretty=None)

    Delete an enrich policy.

    Deletes an existing enrich policy and its enrich index.

    https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-enrich-delete-policy

    Parameters:

      - name (str) – Enrich policy to delete.

      - master_timeout (str | Literal[-1] | ~typing.Literal[0] | None) – Period to wait for a connection to the master node.

      - error_trace (bool | None)

      - filter_path (str | Sequence[str] | None)

      - human (bool | None)

      - pretty (bool | None)

    Return type:

      ObjectApiResponse[Any]

  execute_policy(*, name, error_trace=None, filter_path=None, human=None, master_timeout=None, pretty=None, wait_for_completion=None)

    Run an enrich policy.

    Create the enrich index for an existing enrich policy.

    https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-enrich-execute-policy

    Parameters:

      - name (str) – Enrich policy to execute.

      - master_timeout (str | Literal[-1] | ~typing.Literal[0] | None) – Period to wait for a connection to the master node.

      - wait_for_completion (bool | None) – If true, the request blocks other enrich policy execution requests until complete.

      - error_trace (bool | None)

      - filter_path (str | Sequence[str] | None)

      - human (bool | None)

      - pretty (bool | None)

    Return type:

      ObjectApiResponse[Any]

  get_policy(*, name=None, error_trace=None, filter_path=None, human=None, master_timeout=None, pretty=None)

    Get an enrich policy.

    Returns information about an enrich policy.

    https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-enrich-get-policy

    Parameters:

      - name (str | Sequence[str] | None) – Comma-separated list of enrich policy names used to limit the request. To return information for all enrich policies, omit this parameter.

      - master_timeout (str | Literal[-1] | ~typing.Literal[0] | None) – Period to wait for a connection to the master node.

      - error_trace (bool | None)

      - filter_path (str | Sequence[str] | None)

      - human (bool | None)

      - pretty (bool | None)

    Return type:

      ObjectApiResponse[Any]

  put_policy(*, name, error_trace=None, filter_path=None, geo_match=None, human=None, master_timeout=None, match=None, pretty=None, range=None, body=None)

    Create an enrich policy.

    Creates an enrich policy.

    https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-enrich-put-policy

    Parameters:

      - name (str) – Name of the enrich policy to create or update.

      - geo_match (Mapping[str, Any] | None) – Matches enrich data to incoming documents based on a geo_shape query.

      - master_timeout (str | Literal[-1] | ~typing.Literal[0] | None) – Period to wait for a connection to the master node.

      - match (Mapping[str, Any] | None) – Matches enrich data to incoming documents based on a term query.

      - range (Mapping[str, Any] | None) – Matches a number, date, or IP address in incoming documents to a range in the enrich index based on a term query.

      - error_trace (bool | None)

      - filter_path (str | Sequence[str] | None)

      - human (bool | None)

      - pretty (bool | None)

      - body (Dict[str, Any] | None)

    Return type:

      ObjectApiResponse[Any]

  stats(*, error_trace=None, filter_path=None, human=None, master_timeout=None, pretty=None)

    Get enrich stats.

    Returns enrich coordinator statistics and information about enrich policies that are currently executing.

    https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-enrich-stats

    Parameters:

      - master_timeout (str | Literal[-1] | ~typing.Literal[0] | None) – Period to wait for a connection to the master node.

      - error_trace (bool | None)

      - filter_path (str | Sequence[str] | None)

      - human (bool | None)

      - pretty (bool | None)

    Return type:

      ObjectApiResponse[Any]