Ingest 管道
- class elasticsearch.client.IngestClient
To use this client, access
client.ingest
from anElasticsearch
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)
删除 GeoIP 数据库配置。
删除一个或多个 IP 地理位置数据库配置。
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-delete-geoip-database
- delete_ip_location_database(*, id, error_trace=None, filter_path=None, human=None, master_timeout=None, pretty=None, timeout=None)
删除 IP 地理位置数据库配置。
- Parameters:
- Return type:
- delete_pipeline(*, id, error_trace=None, filter_path=None, human=None, master_timeout=None, pretty=None, timeout=None)
删除管道。 删除一个或多个摄取管道。
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-delete-pipeline
- Parameters:
id (str) – 用于限制请求的管道 ID 或管道 ID 的通配符表达式。 要删除集群中的所有摄取管道,请使用 * 值。
master_timeout (str | Literal[-1] | ~typing.Literal[0] | None) – 等待连接到主节点的时间段。如果 在超时到期前未收到响应,请求将失败并 返回错误。
timeout (str | Literal[-1] | ~typing.Literal[0] | None) – 等待响应的时间段。如果在超时到期前 未收到响应,请求将失败并返回错误。
error_trace (bool | None)
human (bool | None)
pretty (bool | None)
- Return type:
- geo_ip_stats(*, error_trace=None, filter_path=None, human=None, pretty=None)
获取 GeoIP 统计信息。 获取与 GeoIP 处理器一起使用的 GeoIP2 数据库的下载统计信息。
https://www.elastic.co/docs/reference/enrich-processor/geoip-processor
- get_geoip_database(*, id=None, error_trace=None, filter_path=None, human=None, pretty=None)
获取 GeoIP 数据库配置。
获取一个或多个 IP 地理位置数据库配置的信息。
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-get-geoip-database
- get_ip_location_database(*, id=None, error_trace=None, filter_path=None, human=None, pretty=None)
获取IP地理位置数据库配置。
- get_pipeline(*, id=None, error_trace=None, filter_path=None, human=None, master_timeout=None, pretty=None, summary=None)
获取管道信息。
获取一个或多个摄取管道的信息。 此API返回管道的本地引用。
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-get-pipeline
- Parameters:
- Return type:
- processor_grok(*, error_trace=None, filter_path=None, human=None, pretty=None)
运行grok处理器。 从文档中的单个文本字段提取结构化字段。 您必须选择从哪个字段提取匹配字段,以及您期望匹配的grok模式。 grok模式类似于支持可重用别名表达式的正则表达式。
https://www.elastic.co/docs/reference/enrich-processor/grok-processor
- 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)
创建或更新GeoIP数据库配置。
参考创建或更新IP地理位置数据库配置API。
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-put-geoip-database
- Parameters:
id (str) – 要创建或更新的数据库配置ID。
maxmind (Mapping[str, Any] | None) – 用于标识下载数据库所使用的IP地理位置 提供程序所需的配置,以及此类下载所需的任何提供程序特定 配置。目前唯一支持的 提供程序是maxmind,maxmind提供程序要求配置account_id (字符串)。
name (str | None) – 提供程序分配的IP地理位置数据库名称。
master_timeout (str | Literal[-1] | ~typing.Literal[0] | None) – 等待连接到主节点的时间段。如果 在超时到期前未收到响应,则请求失败并 返回错误。
timeout (str | Literal[-1] | ~typing.Literal[0] | None) – 等待响应的时间段。如果在超时 到期前未收到响应,则请求失败并返回错误。
error_trace (bool | None)
human (bool | None)
pretty (bool | None)
- Return type:
- put_ip_location_database(*, id, configuration=None, body=None, error_trace=None, filter_path=None, human=None, master_timeout=None, pretty=None, timeout=None)
创建或更新IP地理位置数据库配置。
- Parameters:
id (str) – 数据库配置标识符。
master_timeout (str | Literal[-1] | ~typing.Literal[0] | None) – 等待连接到主节点的时间段。 如果在超时到期前未收到响应,则请求失败 并返回错误。值为`-1`表示请求应永不 超时。
timeout (str | Literal[-1] | ~typing.Literal[0] | None) – 更新集群元数据后等待集群中所有相关节点 响应的时间段。如果在超时 到期前未收到响应,集群元数据更新仍会应用但 响应指示其未被完全确认。值为 `-1`表示请求应永不超时。
error_trace (bool | None)
human (bool | None)
pretty (bool | None)
- Return type:
- put_pipeline(*, id, deprecated=None, description=None, error_trace=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)
创建或更新一个管道。 使用此API所做的更改会立即生效。
https://www.elastic.co/docs/manage-data/ingest/transform-enrich/ingest-pipelines
- Parameters:
id (str) – 要创建或更新的摄取管道的ID。
deprecated (bool | None) – 将此摄取管道标记为已弃用。当创建或更新非弃用索引模板时,如果引用已弃用的摄取管道作为默认或最终管道,Elasticsearch将发出弃用警告。
description (str | None) – 摄取管道的描述。
if_version (int | None) – 用于管道更新乐观并发控制的必需版本号
master_timeout (str | Literal[-1] | ~typing.Literal[0] | None) – 等待连接到主节点的时间。如果在超时到期前未收到响应,则请求失败并返回错误。
meta (Mapping[str, Any] | None) – 关于摄取管道的可选元数据。可以包含任何内容。此映射不是由Elasticsearch自动生成的。
on_failure (Sequence[Mapping[str, Any]] | None) – 处理器失败后立即运行的处理器。每个处理器支持处理器级别的`on_failure`值。如果未设置`on_failure`值的处理器失败,Elasticsearch会使用此管道级参数作为后备。此参数中的处理器按指定顺序依次运行。Elasticsearch不会尝试运行管道的剩余处理器。
processors (Sequence[Mapping[str, Any]] | None) – 用于在索引前对文档执行转换的处理器。处理器按指定顺序依次运行。
timeout (str | Literal[-1] | ~typing.Literal[0] | None) – 等待响应的时间。如果在超时到期前未收到响应,则请求失败并返回错误。
version (int | None) – 外部系统用于跟踪摄取管道的版本号。此参数仅供外部系统使用。Elasticsearch不使用也不验证管道版本号。
error_trace (bool | None)
human (bool | None)
pretty (bool | None)
- Return type:
- simulate(*, docs=None, id=None, error_trace=None, filter_path=None, human=None, pipeline=None, pretty=None, verbose=None, body=None)
模拟管道。
对一组提供的文档运行摄取管道。 您可以在请求体中指定要使用的现有管道,或者提供管道定义。
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-simulate
- Parameters:
- Return type: