module Elasticsearch::API::Enrich::Actions
Public Instance Methods
Source
# File lib/elasticsearch/api/actions/enrich/delete_policy.rb, line 34 def delete_policy(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'enrich.delete_policy' } defined_params = [:name].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 'name' missing" unless arguments[:name] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE path = "_enrich/policy/#{Utils.listify(_name)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Delete an enrich policy. Deletes an existing enrich policy and its enrich index.
@option arguments [String] :name Enrich
policy to delete. (Required) @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-enrich-delete-policy
Source
# File lib/elasticsearch/api/actions/enrich/execute_policy.rb, line 35 def execute_policy(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'enrich.execute_policy' } defined_params = [:name].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 'name' missing" unless arguments[:name] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT path = "_enrich/policy/#{Utils.listify(_name)}/_execute" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Run an enrich policy. Create the enrich index for an existing enrich policy.
@option arguments [String] :name Enrich
policy to execute. (Required) @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. @option arguments [Boolean] :wait_for_completion If true
, the request blocks other enrich policy execution requests until complete. Server default: true. @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-enrich-execute-policy
Source
# File lib/elasticsearch/api/actions/enrich/get_policy.rb, line 35 def get_policy(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'enrich.get_policy' } defined_params = [:name].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 _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_GET path = if _name "_enrich/policy/#{Utils.listify(_name)}" else '_enrich/policy' end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Get an enrich policy. Returns information about an enrich policy.
@option arguments [String, Array<String>] :name Comma-separated list of enrich policy names used to limit the request.
To return information for all enrich policies, omit this parameter.
@option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-enrich-get-policy
Source
# File lib/elasticsearch/api/actions/enrich/put_policy.rb, line 35 def put_policy(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'enrich.put_policy' } defined_params = [:name].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 'name' missing" unless arguments[:name] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT path = "_enrich/policy/#{Utils.listify(_name)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Create an enrich policy. Creates an enrich policy.
@option arguments [String] :name Name of the enrich policy to create or update. (Required) @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body request body
@see www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-enrich-put-policy
Source
# File lib/elasticsearch/api/actions/enrich/stats.rb, line 33 def stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'enrich.stats' } arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil method = Elasticsearch::API::HTTP_GET path = '_enrich/_stats' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Get enrich stats. Returns enrich coordinator statistics and information about enrich policies that are currently executing.
@option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-enrich-stats