module Elasticsearch::API::Ingest::Actions

Public Instance Methods

delete_pipeline(arguments = {}) click to toggle source

Deletes a pipeline.

@option arguments [String] :id Pipeline ID @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node @option arguments [Time] :timeout Explicit operation timeout @option arguments [Hash] :headers Custom HTTP headers

@see www.elastic.co/guide/en/elasticsearch/reference/7.15/delete-pipeline-api.html

# File lib/elasticsearch/api/actions/ingest/delete_pipeline.rb, line 31
def delete_pipeline(arguments = {})
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]

  headers = arguments.delete(:headers) || {}

  arguments = arguments.clone

  _id = arguments.delete(:id)

  method = Elasticsearch::API::HTTP_DELETE
  path   = "_ingest/pipeline/#{Utils.__listify(_id)}"
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)

  body = nil
  perform_request(method, path, params, body, headers).body
end
geo_ip_stats(arguments = {}) click to toggle source

Returns statistical information about geoip databases

@option arguments [Hash] :headers Custom HTTP headers

@see www.elastic.co/guide/en/elasticsearch/reference/7.15/geoip-stats-api.html

# File lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb, line 28
def geo_ip_stats(arguments = {})
  headers = arguments.delete(:headers) || {}

  arguments = arguments.clone

  method = Elasticsearch::API::HTTP_GET
  path   = "_ingest/geoip/stats"
  params = {}

  body = nil
  perform_request(method, path, params, body, headers).body
end
get_pipeline(arguments = {}) click to toggle source

Returns a pipeline.

@option arguments [String] :id Comma separated list of pipeline ids. Wildcards supported @option arguments [Boolean] :summary Return pipelines without their definitions (default: false) @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node @option arguments [Hash] :headers Custom HTTP headers

@see www.elastic.co/guide/en/elasticsearch/reference/7.15/get-pipeline-api.html

# File lib/elasticsearch/api/actions/ingest/get_pipeline.rb, line 31
def get_pipeline(arguments = {})
  headers = arguments.delete(:headers) || {}

  arguments = arguments.clone

  _id = arguments.delete(:id)

  method = Elasticsearch::API::HTTP_GET
  path   = if _id
             "_ingest/pipeline/#{Utils.__listify(_id)}"
           else
             "_ingest/pipeline"
           end
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)

  body = nil
  perform_request(method, path, params, body, headers).body
end
processor_grok(arguments = {}) click to toggle source

Returns a list of the built-in patterns.

@option arguments [Hash] :headers Custom HTTP headers

@see www.elastic.co/guide/en/elasticsearch/reference/7.15/grok-processor.html#grok-processor-rest-get

# File lib/elasticsearch/api/actions/ingest/processor_grok.rb, line 28
def processor_grok(arguments = {})
  headers = arguments.delete(:headers) || {}

  arguments = arguments.clone

  method = Elasticsearch::API::HTTP_GET
  path   = "_ingest/processor/grok"
  params = {}

  body = nil
  perform_request(method, path, params, body, headers).body
end
put_pipeline(arguments = {}) click to toggle source

Creates or updates a pipeline.

@option arguments [String] :id Pipeline ID @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node @option arguments [Time] :timeout Explicit operation timeout @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The ingest definition (Required)

@see www.elastic.co/guide/en/elasticsearch/reference/7.15/put-pipeline-api.html

# File lib/elasticsearch/api/actions/ingest/put_pipeline.rb, line 32
def put_pipeline(arguments = {})
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]

  headers = arguments.delete(:headers) || {}

  arguments = arguments.clone

  _id = arguments.delete(:id)

  method = Elasticsearch::API::HTTP_PUT
  path   = "_ingest/pipeline/#{Utils.__listify(_id)}"
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)

  body = arguments[:body]
  perform_request(method, path, params, body, headers).body
end
simulate(arguments = {}) click to toggle source

Allows to simulate a pipeline with example documents.

@option arguments [String] :id Pipeline ID @option arguments [Boolean] :verbose Verbose mode. Display data output for each processor in executed pipeline @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The simulate definition (Required)

@see www.elastic.co/guide/en/elasticsearch/reference/7.15/simulate-pipeline-api.html

# File lib/elasticsearch/api/actions/ingest/simulate.rb, line 31
def simulate(arguments = {})
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

  headers = arguments.delete(:headers) || {}

  arguments = arguments.clone

  _id = arguments.delete(:id)

  method = Elasticsearch::API::HTTP_POST
  path   = if _id
             "_ingest/pipeline/#{Utils.__listify(_id)}/_simulate"
           else
             "_ingest/pipeline/_simulate"
           end
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)

  body = arguments[:body]
  perform_request(method, path, params, body, headers).body
end