module Elasticsearch::API::Logstash::Actions
Public Instance Methods
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/8.16/logstash-api-delete-pipeline.html
# File lib/elasticsearch/api/actions/logstash/delete_pipeline.rb, line 32 def delete_pipeline(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'logstash.delete_pipeline' } defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_DELETE path = "_logstash/pipeline/#{Utils.__listify(_id)}" params = {} Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
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/8.16/logstash-api-get-pipeline.html
# File lib/elasticsearch/api/actions/logstash/get_pipeline.rb, line 32 def get_pipeline(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'logstash.get_pipeline' } defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_GET path = if _id "_logstash/pipeline/#{Utils.__listify(_id)}" else '_logstash/pipeline' end params = {} Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
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/8.16/logstash-api-put-pipeline.html
# File lib/elasticsearch/api/actions/logstash/put_pipeline.rb, line 33 def put_pipeline(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'logstash.put_pipeline' } defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_PUT path = "_logstash/pipeline/#{Utils.__listify(_id)}" params = {} Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end