module Elasticsearch::XPack::API::Logstash::Actions

Public Instance Methods

delete_pipeline(arguments = {}) click to toggle source

Deletes Logstash Pipelines used by Central Management

@option arguments [String] :id The ID of the Pipeline @option arguments [Hash] :headers Custom HTTP headers

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

# File lib/elasticsearch/xpack/api/actions/logstash/delete_pipeline.rb, line 30
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   = "_logstash/pipeline/#{Elasticsearch::API::Utils.__listify(_id)}"
  params = {}

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

Retrieves Logstash Pipelines used by Central Management

@option arguments [String] :id A comma-separated list of Pipeline IDs @option arguments [Hash] :headers Custom HTTP headers

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

# File lib/elasticsearch/xpack/api/actions/logstash/get_pipeline.rb, line 30
def get_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_GET
  path   = "_logstash/pipeline/#{Elasticsearch::API::Utils.__listify(_id)}"
  params = {}

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

Adds and updates Logstash Pipelines used for Central Management

@option arguments [String] :id The ID of the Pipeline @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The Pipeline to add or update (Required)

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

# File lib/elasticsearch/xpack/api/actions/logstash/put_pipeline.rb, line 31
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   = "_logstash/pipeline/#{Elasticsearch::API::Utils.__listify(_id)}"
  params = {}

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