# Ingest Pipelines

class elasticsearch.client.IngestClient

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

      from elasticsearch import Elasticsearch

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

  delete_geoip_database(*, id, error_trace=None, filter_path=None, human=None, master_timeout=None, pretty=None, timeout=None)

    Delete GeoIP database configurations.

    Delete one or more IP geolocation database configurations.

    https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-ingest-delete-geoip-database

    Parameters:

      - id (str | Sequence[str]) – A comma-separated list of geoip database configurations to delete

      - master_timeout (str | Literal[-1] | ~typing.Literal[0] | None) – The period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.

      - timeout (str | Literal[-1] | ~typing.Literal[0] | None) – The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

      - error_trace (bool | None)

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

      - human (bool | None)

      - pretty (bool | None)

    Return type:

      ObjectApiResponse[Any]

  delete_ip_location_database(*, id, error_trace=None, filter_path=None, human=None, master_timeout=None, pretty=None, timeout=None)

    Delete IP geolocation database configurations.

    https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-ingest-delete-ip-location-database

    Parameters:

      - id (str | Sequence[str]) – A comma-separated list of IP location database configurations.

      - master_timeout (str | Literal[-1] | ~typing.Literal[0] | None) – The period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. A value of -1 indicates that the request should never time out.

      - timeout (str | Literal[-1] | ~typing.Literal[0] | None) – The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. A value of -1 indicates that the request should never time out.

      - error_trace (bool | None)

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

      - human (bool | None)

      - pretty (bool | None)

    Return type:

      ObjectApiResponse[Any]

  delete_pipeline(*, id, error_trace=None, filter_path=None, human=None, master_timeout=None, pretty=None, timeout=None)

    Delete pipelines.

    Delete one or more ingest pipelines.

    https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-ingest-delete-pipeline

    Parameters:

      - id (str) – Pipeline ID or wildcard expression of pipeline IDs used to limit the request. To delete all ingest pipelines in a cluster, use a value of *.

      - master_timeout (str | Literal[-1] | ~typing.Literal[0] | None) – Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.

      - timeout (str | Literal[-1] | ~typing.Literal[0] | None) – Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

      - error_trace (bool | None)

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

      - human (bool | None)

      - pretty (bool | None)

    Return type:

      ObjectApiResponse[Any]

  geo_ip_stats(*, error_trace=None, filter_path=None, human=None, pretty=None)

    Get GeoIP statistics.

    Get download statistics for GeoIP2 databases that are used with the GeoIP processor.

    https://www.elastic.co/docs/reference/enrich-processor/geoip-processor

    Parameters:

      - error_trace (bool | None)

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

      - human (bool | None)

      - pretty (bool | None)

    Return type:

      ObjectApiResponse[Any]

  get_geoip_database(*, id=None, error_trace=None, filter_path=None, human=None, pretty=None)

    Get GeoIP database configurations.

    Get information about one or more IP geolocation database configurations.

    https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-ingest-get-geoip-database

    Parameters:

      - id (str | Sequence[str] | None) – A comma-separated list of database configuration IDs to retrieve. Wildcard (*) expressions are supported. To get all database configurations, omit this parameter or use *.

      - error_trace (bool | None)

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

      - human (bool | None)

      - pretty (bool | None)

    Return type:

      ObjectApiResponse[Any]

  get_ip_location_database(*, id=None, error_trace=None, filter_path=None, human=None, pretty=None)

    Get IP geolocation database configurations.

    https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-ingest-get-ip-location-database

    Parameters:

      - id (str | Sequence[str] | None) – Comma-separated list of database configuration IDs to retrieve. Wildcard (*) expressions are supported. To get all database configurations, omit this parameter or use *.

      - error_trace (bool | None)

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

      - human (bool | None)

      - pretty (bool | None)

    Return type:

      ObjectApiResponse[Any]

  get_pipeline(*, id=None, error_trace=None, filter_path=None, human=None, master_timeout=None, pretty=None, summary=None)

    Get pipelines.

    Get information about one or more ingest pipelines. This API returns a local reference of the pipeline.

    https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-ingest-get-pipeline

    Parameters:

      - id (str | None) – Comma-separated list of pipeline IDs to retrieve. Wildcard (*) expressions are supported. To get all ingest pipelines, omit this parameter or use *.

      - master_timeout (str | Literal[-1] | ~typing.Literal[0] | None) – Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.

      - summary (bool | None) – Return pipelines without their definitions

      - error_trace (bool | None)

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

      - human (bool | None)

      - pretty (bool | None)

    Return type:

      ObjectApiResponse[Any]

  processor_grok(*, error_trace=None, filter_path=None, human=None, pretty=None)

    Run a grok processor.

    Extract structured fields out of a single text field within a document. You must choose which field to extract matched fields from, as well as the grok pattern you expect will match. A grok pattern is like a regular expression that supports aliased expressions that can be reused.

    https://www.elastic.co/docs/reference/enrich-processor/grok-processor

    Parameters:

      - error_trace (bool | None)

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

      - human (bool | None)

      - pretty (bool | None)

    Return type:

      ObjectApiResponse[Any]

  put_geoip_database(*, id, maxmind=None, name=None, error_trace=None, filter_path=None, human=None, master_timeout=None, pretty=None, timeout=None, body=None)

    Create or update a GeoIP database configuration.

    Refer to the create or update IP geolocation database configuration API.

    https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-ingest-put-geoip-database

    Parameters:

      - id (str) – ID of the database configuration to create or update.

      - maxmind (Mapping[str, Any] | None) – The configuration necessary to identify which IP geolocation provider to use to download the database, as well as any provider-specific configuration necessary for such downloading. At present, the only supported provider is maxmind, and the maxmind provider requires that an account_id (string) is configured.

      - name (str | None) – The provider-assigned name of the IP geolocation database to download.

      - master_timeout (str | Literal[-1] | ~typing.Literal[0] | None) – Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.

      - timeout (str | Literal[-1] | ~typing.Literal[0] | None) – Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

      - 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]

  put_ip_location_database(*, id, configuration=None, body=None, error_trace=None, filter_path=None, human=None, master_timeout=None, pretty=None, timeout=None)

    Create or update an IP geolocation database configuration.

    https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-ingest-put-ip-location-database

    Parameters:

      - id (str) – The database configuration identifier.

      - configuration (Mapping[str, Any] | None)

      - master_timeout (str | Literal[-1] | ~typing.Literal[0] | None) – The period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. A value of -1 indicates that the request should never time out.

      - timeout (str | Literal[-1] | ~typing.Literal[0] | None) – The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. If no response is received before the timeout expires, the cluster metadata update still applies but the response indicates that it was not completely acknowledged. A value of -1 indicates that the request should never time out.

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

      - error_trace (bool | None)

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

      - human (bool | None)

      - pretty (bool | None)

    Return type:

      ObjectApiResponse[Any]

  put_pipeline(*, id, deprecated=None, description=None, error_trace=None, field_access_pattern=None, filter_path=None, human=None, if_version=None, master_timeout=None, meta=None, on_failure=None, pretty=None, processors=None, timeout=None, version=None, body=None)

    Create or update a pipeline.

    Changes made using this API take effect immediately.

    https://www.elastic.co/docs/manage-data/ingest/transform-enrich/ingest-pipelines

    Parameters:

      - id (str) – ID of the ingest pipeline to create or update.

      - deprecated (bool | None) – Marks this ingest pipeline as deprecated. When a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning.

      - description (str | None) – Description of the ingest pipeline.

      - field_access_pattern (str | Literal['classic', 'flexible'] | None) – Controls how processors in this pipeline should read and write data on a document’s source.

      - if_version (int | None) – Required version for optimistic concurrency control for pipeline updates

      - master_timeout (str | Literal[-1] | ~typing.Literal[0] | None) – Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.

      - meta (Mapping[str, Any] | None) – Optional metadata about the ingest pipeline. May have any contents. This map is not automatically generated by Elasticsearch.

      - on_failure (Sequence[Mapping[str, Any]] | None) – Processors to run immediately after a processor failure. Each processor supports a processor-level on_failure value. If a processor without an on_failure value fails, Elasticsearch uses this pipeline-level parameter as a fallback. The processors in this parameter run sequentially in the order specified. Elasticsearch will not attempt to run the pipeline’s remaining processors.

      - processors (Sequence[Mapping[str, Any]] | None) – Processors used to perform transformations on documents before indexing. Processors run sequentially in the order specified.

      - timeout (str | Literal[-1] | ~typing.Literal[0] | None) – Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

      - version (int | None) – Version number used by external systems to track ingest pipelines. This parameter is intended for external systems only. Elasticsearch does not use or validate pipeline version numbers.

      - 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]

  simulate(*, docs=None, id=None, error_trace=None, filter_path=None, human=None, pipeline=None, pretty=None, verbose=None, body=None)

    Simulate a pipeline.

    Run an ingest pipeline against a set of provided documents. You can either specify an existing pipeline to use with the provided documents or supply a pipeline definition in the body of the request.

    https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-ingest-simulate

    Parameters:

      - docs (Sequence[Mapping[str, Any]] | None) – Sample documents to test in the pipeline.

      - id (str | None) – The pipeline to test. If you don’t specify a pipeline in the request body, this parameter is required.

      - pipeline (Mapping[str, Any] | None) – The pipeline to test. If you don’t specify the pipeline request path parameter, this parameter is required. If you specify both this and the request path parameter, the API only uses the request path parameter.

      - verbose (bool | None) – If true, the response includes output data for each processor in the executed pipeline.

      - 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]