Module: OpenSearch::API::Ingest::Actions
- Included in:
- IngestClient
- Defined in:
- lib/opensearch/api/namespace/ingest.rb,
lib/opensearch/api/actions/ingest/simulate.rb,
lib/opensearch/api/actions/ingest/geo_ip_stats.rb,
lib/opensearch/api/actions/ingest/get_pipeline.rb,
lib/opensearch/api/actions/ingest/put_pipeline.rb,
lib/opensearch/api/actions/ingest/processor_grok.rb,
lib/opensearch/api/actions/ingest/delete_pipeline.rb,
lib/opensearch/api/actions/ingest/params_registry.rb
Defined Under Namespace
Modules: ParamsRegistry
Instance Method Summary collapse
-
#delete_pipeline(arguments = {}) ⇒ Object
Deletes a pipeline.
-
#geo_ip_stats(arguments = {}) ⇒ Object
Returns statistical information about geoip databases.
-
#get_pipeline(arguments = {}) ⇒ Object
Returns a pipeline.
-
#processor_grok(arguments = {}) ⇒ Object
Returns a list of the built-in patterns.
-
#put_pipeline(arguments = {}) ⇒ Object
Creates or updates a pipeline.
-
#simulate(arguments = {}) ⇒ Object
Allows to simulate a pipeline with example documents.
Instance Method Details
#delete_pipeline(arguments = {}) ⇒ Object
Deletes a pipeline.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/opensearch/api/actions/ingest/delete_pipeline.rb', line 40 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 = OpenSearch::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 = {}) ⇒ Object
Returns statistical information about geoip databases
36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/opensearch/api/actions/ingest/geo_ip_stats.rb', line 36 def geo_ip_stats(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone method = OpenSearch::API::HTTP_GET path = "_ingest/geoip/stats" params = {} body = nil perform_request(method, path, params, body, headers).body end |
#get_pipeline(arguments = {}) ⇒ Object
Returns a pipeline.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/opensearch/api/actions/ingest/get_pipeline.rb', line 40 def get_pipeline(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _id = arguments.delete(:id) method = OpenSearch::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 = {}) ⇒ Object
Returns a list of the built-in patterns.
36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/opensearch/api/actions/ingest/processor_grok.rb', line 36 def processor_grok(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone method = OpenSearch::API::HTTP_GET path = "_ingest/processor/grok" params = {} body = nil perform_request(method, path, params, body, headers).body end |
#put_pipeline(arguments = {}) ⇒ Object
Creates or updates a pipeline.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/opensearch/api/actions/ingest/put_pipeline.rb', line 41 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 = OpenSearch::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 = {}) ⇒ Object
Allows to simulate a pipeline with example documents.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/opensearch/api/actions/ingest/simulate.rb', line 39 def simulate(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] headers = arguments.delete(:headers) || {} arguments = arguments.clone _id = arguments.delete(:id) method = OpenSearch::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 |