elasticsearch-serverless 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/elasticsearch-serverless/api/async_search/delete.rb +9 -1
- data/lib/elasticsearch-serverless/api/async_search/get.rb +17 -3
- data/lib/elasticsearch-serverless/api/async_search/status.rb +9 -1
- data/lib/elasticsearch-serverless/api/async_search/submit.rb +15 -4
- data/lib/elasticsearch-serverless/api/bulk.rb +17 -4
- data/lib/elasticsearch-serverless/api/cat/aliases.rb +22 -6
- data/lib/elasticsearch-serverless/api/cat/component_templates.rb +22 -6
- data/lib/elasticsearch-serverless/api/cat/count.rb +25 -8
- data/lib/elasticsearch-serverless/api/cat/help.rb +16 -6
- data/lib/elasticsearch-serverless/api/cat/indices.rb +31 -9
- data/lib/elasticsearch-serverless/api/cat/ml_data_frame_analytics.rb +24 -8
- data/lib/elasticsearch-serverless/api/cat/ml_datafeeds.rb +29 -8
- data/lib/elasticsearch-serverless/api/cat/ml_jobs.rb +29 -8
- data/lib/elasticsearch-serverless/api/cat/ml_trained_models.rb +25 -8
- data/lib/elasticsearch-serverless/api/cat/transforms.rb +27 -9
- data/lib/elasticsearch-serverless/api/clear_scroll.rb +12 -3
- data/lib/elasticsearch-serverless/api/close_point_in_time.rb +3 -1
- data/lib/elasticsearch-serverless/api/cluster/delete_component_template.rb +14 -3
- data/lib/elasticsearch-serverless/api/cluster/exists_component_template.rb +18 -5
- data/lib/elasticsearch-serverless/api/cluster/get_component_template.rb +16 -4
- data/lib/elasticsearch-serverless/api/cluster/info.rb +11 -2
- data/lib/elasticsearch-serverless/api/cluster/put_component_template.rb +17 -7
- data/lib/elasticsearch-serverless/api/connector/check_in.rb +9 -1
- data/lib/elasticsearch-serverless/api/connector/delete.rb +14 -6
- data/lib/elasticsearch-serverless/api/connector/get.rb +13 -5
- data/lib/elasticsearch-serverless/api/connector/list.rb +7 -5
- data/lib/elasticsearch-serverless/api/connector/post.rb +7 -5
- data/lib/elasticsearch-serverless/api/connector/put.rb +14 -6
- data/lib/elasticsearch-serverless/api/connector/sync_job_cancel.rb +13 -5
- data/lib/elasticsearch-serverless/api/connector/sync_job_delete.rb +13 -5
- data/lib/elasticsearch-serverless/api/connector/sync_job_get.rb +13 -5
- data/lib/elasticsearch-serverless/api/connector/sync_job_list.rb +8 -6
- data/lib/elasticsearch-serverless/api/connector/sync_job_post.rb +7 -5
- data/lib/elasticsearch-serverless/api/connector/update_active_filtering.rb +9 -1
- data/lib/elasticsearch-serverless/api/connector/update_api_key_id.rb +13 -5
- data/lib/elasticsearch-serverless/api/connector/update_configuration.rb +13 -5
- data/lib/elasticsearch-serverless/api/connector/update_error.rb +9 -1
- data/lib/elasticsearch-serverless/api/connector/update_filtering.rb +13 -5
- data/lib/elasticsearch-serverless/api/connector/update_filtering_validation.rb +9 -1
- data/lib/elasticsearch-serverless/api/connector/update_index_name.rb +13 -5
- data/lib/elasticsearch-serverless/api/connector/update_name.rb +13 -5
- data/lib/elasticsearch-serverless/api/connector/update_native.rb +13 -5
- data/lib/elasticsearch-serverless/api/connector/update_pipeline.rb +13 -5
- data/lib/elasticsearch-serverless/api/connector/update_scheduling.rb +13 -5
- data/lib/elasticsearch-serverless/api/connector/update_service_type.rb +13 -5
- data/lib/elasticsearch-serverless/api/connector/update_status.rb +9 -1
- data/lib/elasticsearch-serverless/api/count.rb +30 -10
- data/lib/elasticsearch-serverless/api/create.rb +21 -5
- data/lib/elasticsearch-serverless/api/delete.rb +17 -5
- data/lib/elasticsearch-serverless/api/delete_by_query.rb +38 -11
- data/lib/elasticsearch-serverless/api/delete_script.rb +14 -3
- data/lib/elasticsearch-serverless/api/enrich/delete_policy.rb +10 -1
- data/lib/elasticsearch-serverless/api/enrich/execute_policy.rb +9 -1
- data/lib/elasticsearch-serverless/api/enrich/get_policy.rb +12 -2
- data/lib/elasticsearch-serverless/api/enrich/put_policy.rb +10 -1
- data/lib/elasticsearch-serverless/api/enrich/stats.rb +4 -1
- data/lib/elasticsearch-serverless/api/eql/delete.rb +12 -2
- data/lib/elasticsearch-serverless/api/eql/get.rb +13 -3
- data/lib/elasticsearch-serverless/api/eql/get_status.rb +9 -1
- data/lib/elasticsearch-serverless/api/eql/search.rb +9 -1
- data/lib/elasticsearch-serverless/api/exists.rb +20 -6
- data/lib/elasticsearch-serverless/api/exists_source.rb +16 -4
- data/lib/elasticsearch-serverless/api/explain.rb +17 -5
- data/lib/elasticsearch-serverless/api/field_caps.rb +12 -2
- data/lib/elasticsearch-serverless/api/get.rb +18 -5
- data/lib/elasticsearch-serverless/api/get_script.rb +10 -1
- data/lib/elasticsearch-serverless/api/get_source.rb +10 -1
- data/lib/elasticsearch-serverless/api/graph/explore.rb +12 -2
- data/lib/elasticsearch-serverless/api/index.rb +25 -6
- data/lib/elasticsearch-serverless/api/indices/add_block.rb +11 -2
- data/lib/elasticsearch-serverless/api/indices/analyze.rb +12 -2
- data/lib/elasticsearch-serverless/api/indices/create.rb +16 -4
- data/lib/elasticsearch-serverless/api/indices/create_data_stream.rb +16 -2
- data/lib/elasticsearch-serverless/api/indices/data_streams_stats.rb +15 -3
- data/lib/elasticsearch-serverless/api/indices/delete.rb +25 -7
- data/lib/elasticsearch-serverless/api/indices/delete_alias.rb +18 -5
- data/lib/elasticsearch-serverless/api/indices/delete_data_lifecycle.rb +11 -2
- data/lib/elasticsearch-serverless/api/indices/delete_data_stream.rb +10 -1
- data/lib/elasticsearch-serverless/api/indices/delete_index_template.rb +9 -1
- data/lib/elasticsearch-serverless/api/indices/exists.rb +17 -4
- data/lib/elasticsearch-serverless/api/indices/exists_alias.rb +19 -5
- data/lib/elasticsearch-serverless/api/indices/exists_index_template.rb +9 -1
- data/lib/elasticsearch-serverless/api/indices/explain_data_lifecycle.rb +11 -2
- data/lib/elasticsearch-serverless/api/indices/get.rb +18 -4
- data/lib/elasticsearch-serverless/api/indices/get_alias.rb +23 -6
- data/lib/elasticsearch-serverless/api/indices/get_data_lifecycle.rb +16 -3
- data/lib/elasticsearch-serverless/api/indices/get_data_stream.rb +14 -3
- data/lib/elasticsearch-serverless/api/indices/get_index_template.rb +9 -1
- data/lib/elasticsearch-serverless/api/indices/get_mapping.rb +21 -5
- data/lib/elasticsearch-serverless/api/indices/get_settings.rb +26 -6
- data/lib/elasticsearch-serverless/api/indices/migrate_to_data_stream.rb +10 -1
- data/lib/elasticsearch-serverless/api/indices/modify_data_stream.rb +4 -1
- data/lib/elasticsearch-serverless/api/indices/put_alias.rb +20 -5
- data/lib/elasticsearch-serverless/api/indices/put_data_lifecycle.rb +22 -6
- data/lib/elasticsearch-serverless/api/indices/put_index_template.rb +11 -2
- data/lib/elasticsearch-serverless/api/indices/put_mapping.rb +20 -5
- data/lib/elasticsearch-serverless/api/indices/put_settings.rb +28 -7
- data/lib/elasticsearch-serverless/api/indices/put_template.rb +14 -3
- data/lib/elasticsearch-serverless/api/indices/refresh.rb +19 -4
- data/lib/elasticsearch-serverless/api/indices/resolve_index.rb +15 -3
- data/lib/elasticsearch-serverless/api/indices/rollover.rb +19 -5
- data/lib/elasticsearch-serverless/api/indices/simulate_index_template.rb +9 -1
- data/lib/elasticsearch-serverless/api/indices/simulate_template.rb +11 -2
- data/lib/elasticsearch-serverless/api/indices/update_aliases.rb +8 -3
- data/lib/elasticsearch-serverless/api/indices/validate_query.rb +24 -7
- data/lib/elasticsearch-serverless/api/inference/delete.rb +9 -1
- data/lib/elasticsearch-serverless/api/inference/get.rb +9 -1
- data/lib/elasticsearch-serverless/api/inference/inference.rb +9 -1
- data/lib/elasticsearch-serverless/api/inference/put.rb +9 -1
- data/lib/elasticsearch-serverless/api/info.rb +4 -1
- data/lib/elasticsearch-serverless/api/ingest/delete_pipeline.rb +15 -4
- data/lib/elasticsearch-serverless/api/ingest/get_pipeline.rb +14 -3
- data/lib/elasticsearch-serverless/api/ingest/processor_grok.rb +3 -1
- data/lib/elasticsearch-serverless/api/ingest/put_pipeline.rb +9 -1
- data/lib/elasticsearch-serverless/api/ingest/simulate.rb +11 -2
- data/lib/elasticsearch-serverless/api/license/get.rb +8 -4
- data/lib/elasticsearch-serverless/api/logstash/delete_pipeline.rb +9 -1
- data/lib/elasticsearch-serverless/api/logstash/get_pipeline.rb +9 -1
- data/lib/elasticsearch-serverless/api/logstash/put_pipeline.rb +9 -1
- data/lib/elasticsearch-serverless/api/machine_learning/close_job.rb +14 -4
- data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar.rb +10 -1
- data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_event.rb +12 -3
- data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_job.rb +12 -3
- data/lib/elasticsearch-serverless/api/machine_learning/delete_data_frame_analytics.rb +10 -2
- data/lib/elasticsearch-serverless/api/machine_learning/delete_datafeed.rb +16 -4
- data/lib/elasticsearch-serverless/api/machine_learning/delete_filter.rb +10 -2
- data/lib/elasticsearch-serverless/api/machine_learning/delete_job.rb +17 -6
- data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model.rb +11 -3
- data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model_alias.rb +10 -2
- data/lib/elasticsearch-serverless/api/machine_learning/estimate_model_memory.rb +4 -1
- data/lib/elasticsearch-serverless/api/machine_learning/evaluate_data_frame.rb +4 -2
- data/lib/elasticsearch-serverless/api/machine_learning/flush_job.rb +19 -6
- data/lib/elasticsearch-serverless/api/machine_learning/get_calendar_events.rb +9 -1
- data/lib/elasticsearch-serverless/api/machine_learning/get_calendars.rb +9 -1
- data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics.rb +24 -4
- data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics_stats.rb +21 -3
- data/lib/elasticsearch-serverless/api/machine_learning/get_datafeed_stats.rb +20 -3
- data/lib/elasticsearch-serverless/api/machine_learning/get_datafeeds.rb +23 -4
- data/lib/elasticsearch-serverless/api/machine_learning/get_filters.rb +9 -1
- data/lib/elasticsearch-serverless/api/machine_learning/get_job_stats.rb +21 -3
- data/lib/elasticsearch-serverless/api/machine_learning/get_jobs.rb +23 -4
- data/lib/elasticsearch-serverless/api/machine_learning/get_overall_buckets.rb +30 -7
- data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models.rb +28 -7
- data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models_stats.rb +17 -3
- data/lib/elasticsearch-serverless/api/machine_learning/infer_trained_model.rb +9 -1
- data/lib/elasticsearch-serverless/api/machine_learning/open_job.rb +10 -2
- data/lib/elasticsearch-serverless/api/machine_learning/post_calendar_events.rb +9 -1
- data/lib/elasticsearch-serverless/api/machine_learning/preview_data_frame_analytics.rb +9 -1
- data/lib/elasticsearch-serverless/api/machine_learning/preview_datafeed.rb +13 -2
- data/lib/elasticsearch-serverless/api/machine_learning/put_calendar.rb +9 -1
- data/lib/elasticsearch-serverless/api/machine_learning/put_calendar_job.rb +9 -1
- data/lib/elasticsearch-serverless/api/machine_learning/put_data_frame_analytics.rb +12 -2
- data/lib/elasticsearch-serverless/api/machine_learning/put_datafeed.rb +17 -5
- data/lib/elasticsearch-serverless/api/machine_learning/put_filter.rb +9 -1
- data/lib/elasticsearch-serverless/api/machine_learning/put_job.rb +11 -2
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model.rb +14 -3
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_alias.rb +12 -2
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_definition_part.rb +11 -2
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_vocabulary.rb +9 -1
- data/lib/elasticsearch-serverless/api/machine_learning/reset_job.rb +14 -3
- data/lib/elasticsearch-serverless/api/machine_learning/start_data_frame_analytics.rb +14 -3
- data/lib/elasticsearch-serverless/api/machine_learning/start_datafeed.rb +27 -8
- data/lib/elasticsearch-serverless/api/machine_learning/start_trained_model_deployment.rb +25 -5
- data/lib/elasticsearch-serverless/api/machine_learning/stop_data_frame_analytics.rb +23 -4
- data/lib/elasticsearch-serverless/api/machine_learning/stop_datafeed.rb +19 -3
- data/lib/elasticsearch-serverless/api/machine_learning/stop_trained_model_deployment.rb +15 -3
- data/lib/elasticsearch-serverless/api/machine_learning/update_data_frame_analytics.rb +12 -2
- data/lib/elasticsearch-serverless/api/machine_learning/update_datafeed.rb +21 -4
- data/lib/elasticsearch-serverless/api/machine_learning/update_filter.rb +9 -1
- data/lib/elasticsearch-serverless/api/machine_learning/update_job.rb +9 -1
- data/lib/elasticsearch-serverless/api/machine_learning/update_trained_model_deployment.rb +15 -2
- data/lib/elasticsearch-serverless/api/mget.rb +17 -4
- data/lib/elasticsearch-serverless/api/msearch.rb +15 -1
- data/lib/elasticsearch-serverless/api/msearch_template.rb +16 -4
- data/lib/elasticsearch-serverless/api/mtermvectors.rb +14 -8
- data/lib/elasticsearch-serverless/api/open_point_in_time.rb +14 -3
- data/lib/elasticsearch-serverless/api/ping.rb +4 -1
- data/lib/elasticsearch-serverless/api/put_script.rb +18 -5
- data/lib/elasticsearch-serverless/api/query_rules/delete_rule.rb +9 -1
- data/lib/elasticsearch-serverless/api/query_rules/delete_ruleset.rb +9 -1
- data/lib/elasticsearch-serverless/api/query_rules/get_rule.rb +9 -1
- data/lib/elasticsearch-serverless/api/query_rules/get_ruleset.rb +9 -1
- data/lib/elasticsearch-serverless/api/query_rules/list_rulesets.rb +3 -1
- data/lib/elasticsearch-serverless/api/query_rules/put_rule.rb +9 -1
- data/lib/elasticsearch-serverless/api/query_rules/put_ruleset.rb +9 -1
- data/lib/elasticsearch-serverless/api/rank_eval.rb +11 -2
- data/lib/elasticsearch-serverless/api/reindex.rb +11 -7
- data/lib/elasticsearch-serverless/api/render_search_template.rb +11 -2
- data/lib/elasticsearch-serverless/api/scripts_painless_execute.rb +4 -1
- data/lib/elasticsearch-serverless/api/scroll.rb +9 -1
- data/lib/elasticsearch-serverless/api/search.rb +107 -30
- data/lib/elasticsearch-serverless/api/search_application/delete.rb +9 -1
- data/lib/elasticsearch-serverless/api/search_application/delete_behavioral_analytics.rb +9 -1
- data/lib/elasticsearch-serverless/api/search_application/get.rb +9 -1
- data/lib/elasticsearch-serverless/api/search_application/get_behavioral_analytics.rb +9 -1
- data/lib/elasticsearch-serverless/api/search_application/list.rb +3 -1
- data/lib/elasticsearch-serverless/api/search_application/put.rb +9 -1
- data/lib/elasticsearch-serverless/api/search_application/put_behavioral_analytics.rb +9 -1
- data/lib/elasticsearch-serverless/api/search_application/search.rb +9 -1
- data/lib/elasticsearch-serverless/api/search_mvt.rb +27 -7
- data/lib/elasticsearch-serverless/api/search_template.rb +22 -6
- data/lib/elasticsearch-serverless/api/security/authenticate.rb +6 -2
- data/lib/elasticsearch-serverless/api/security/create_api_key.rb +4 -1
- data/lib/elasticsearch-serverless/api/security/get_api_key.rb +19 -7
- data/lib/elasticsearch-serverless/api/security/has_privileges.rb +10 -1
- data/lib/elasticsearch-serverless/api/security/invalidate_api_key.rb +4 -1
- data/lib/elasticsearch-serverless/api/security/query_api_keys.rb +7 -3
- data/lib/elasticsearch-serverless/api/security/update_api_key.rb +10 -1
- data/lib/elasticsearch-serverless/api/sql/clear_cursor.rb +3 -1
- data/lib/elasticsearch-serverless/api/sql/delete_async.rb +9 -1
- data/lib/elasticsearch-serverless/api/sql/get_async.rb +15 -4
- data/lib/elasticsearch-serverless/api/sql/get_async_status.rb +9 -1
- data/lib/elasticsearch-serverless/api/sql/query.rb +3 -1
- data/lib/elasticsearch-serverless/api/sql/translate.rb +3 -1
- data/lib/elasticsearch-serverless/api/synonyms/delete_synonym.rb +9 -1
- data/lib/elasticsearch-serverless/api/synonyms/delete_synonym_rule.rb +9 -1
- data/lib/elasticsearch-serverless/api/synonyms/get_synonym.rb +9 -1
- data/lib/elasticsearch-serverless/api/synonyms/get_synonym_rule.rb +9 -1
- data/lib/elasticsearch-serverless/api/synonyms/get_synonyms_sets.rb +3 -1
- data/lib/elasticsearch-serverless/api/synonyms/put_synonym.rb +9 -1
- data/lib/elasticsearch-serverless/api/synonyms/put_synonym_rule.rb +9 -1
- data/lib/elasticsearch-serverless/api/tasks/get.rb +13 -3
- data/lib/elasticsearch-serverless/api/terms_enum.rb +9 -1
- data/lib/elasticsearch-serverless/api/termvectors.rb +21 -9
- data/lib/elasticsearch-serverless/api/transform/delete_transform.rb +14 -3
- data/lib/elasticsearch-serverless/api/transform/get_transform.rb +23 -4
- data/lib/elasticsearch-serverless/api/transform/get_transform_stats.rb +20 -3
- data/lib/elasticsearch-serverless/api/transform/preview_transform.rb +15 -5
- data/lib/elasticsearch-serverless/api/transform/put_transform.rb +17 -7
- data/lib/elasticsearch-serverless/api/transform/reset_transform.rb +14 -3
- data/lib/elasticsearch-serverless/api/transform/schedule_now_transform.rb +11 -3
- data/lib/elasticsearch-serverless/api/transform/start_transform.rb +10 -3
- data/lib/elasticsearch-serverless/api/transform/stop_transform.rb +23 -6
- data/lib/elasticsearch-serverless/api/transform/update_transform.rb +15 -4
- data/lib/elasticsearch-serverless/api/update.rb +23 -7
- data/lib/elasticsearch-serverless/api/update_by_query.rb +36 -9
- data/lib/elasticsearch-serverless/api.rb +3 -2
- data/lib/elasticsearch-serverless/version.rb +1 -1
- data/lib/elasticsearch-serverless.rb +4 -3
- metadata +5 -76
- data/lib/elasticsearch-serverless/api/connector/last_sync.rb +0 -59
@@ -22,20 +22,34 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Indices
|
24
24
|
module Actions
|
25
|
+
# Roll over to a new index.
|
25
26
|
# Creates a new index for a data stream or index alias.
|
26
27
|
#
|
27
28
|
# @option arguments [String] :alias Name of the data stream or index alias to roll over. (*Required*)
|
28
|
-
# @option arguments [String] :new_index Name of the index to create.
|
29
|
+
# @option arguments [String] :new_index Name of the index to create.
|
30
|
+
# Supports date math.
|
31
|
+
# Data streams do not support this parameter.
|
29
32
|
# @option arguments [Boolean] :dry_run If +true+, checks whether the current index satisfies the specified conditions but does not perform a rollover.
|
30
|
-
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node.
|
31
|
-
#
|
32
|
-
# @option arguments [
|
33
|
+
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node.
|
34
|
+
# If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
35
|
+
# @option arguments [Time] :timeout Period to wait for a response.
|
36
|
+
# If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
37
|
+
# @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation.
|
38
|
+
# Set to all or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). Server default: 1.
|
33
39
|
# @option arguments [Hash] :headers Custom HTTP headers
|
34
40
|
# @option arguments [Hash] :body request body
|
35
41
|
#
|
36
42
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-rollover-index.html
|
37
43
|
#
|
38
44
|
def rollover(arguments = {})
|
45
|
+
request_opts = { endpoint: arguments[:endpoint] || "indices.rollover" }
|
46
|
+
|
47
|
+
defined_params = [:alias, :new_index].inject({}) do |set_variables, variable|
|
48
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
49
|
+
set_variables
|
50
|
+
end
|
51
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
52
|
+
|
39
53
|
raise ArgumentError, "Required argument 'alias' missing" unless arguments[:alias]
|
40
54
|
|
41
55
|
arguments = arguments.clone
|
@@ -56,7 +70,7 @@ module ElasticsearchServerless
|
|
56
70
|
params = Utils.process_params(arguments)
|
57
71
|
|
58
72
|
ElasticsearchServerless::API::Response.new(
|
59
|
-
perform_request(method, path, params, body, headers)
|
73
|
+
perform_request(method, path, params, body, headers, request_opts)
|
60
74
|
)
|
61
75
|
end
|
62
76
|
end
|
@@ -33,6 +33,14 @@ module ElasticsearchServerless
|
|
33
33
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-index.html
|
34
34
|
#
|
35
35
|
def simulate_index_template(arguments = {})
|
36
|
+
request_opts = { endpoint: arguments[:endpoint] || "indices.simulate_index_template" }
|
37
|
+
|
38
|
+
defined_params = [:name].inject({}) do |set_variables, variable|
|
39
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
40
|
+
set_variables
|
41
|
+
end
|
42
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
43
|
+
|
36
44
|
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
37
45
|
|
38
46
|
arguments = arguments.clone
|
@@ -47,7 +55,7 @@ module ElasticsearchServerless
|
|
47
55
|
params = Utils.process_params(arguments)
|
48
56
|
|
49
57
|
ElasticsearchServerless::API::Response.new(
|
50
|
-
perform_request(method, path, params, body, headers)
|
58
|
+
perform_request(method, path, params, body, headers, request_opts)
|
51
59
|
)
|
52
60
|
end
|
53
61
|
end
|
@@ -25,7 +25,8 @@ module ElasticsearchServerless
|
|
25
25
|
# Simulate an index template.
|
26
26
|
# Returns the index configuration that would be applied by a particular index template.
|
27
27
|
#
|
28
|
-
# @option arguments [String] :name Name of the index template to simulate. To test a template configuration before you add it to the cluster, omit
|
28
|
+
# @option arguments [String] :name Name of the index template to simulate. To test a template configuration before you add it to the cluster, omit
|
29
|
+
# this parameter and specify the template configuration in the request body.
|
29
30
|
# @option arguments [Boolean] :create If true, the template passed in the body is only used if no existing templates match the same index patterns. If false, the simulation uses the template with the highest priority. Note that the template is not permanently added or updated in either case; it is only used for the simulation.
|
30
31
|
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
31
32
|
# @option arguments [Boolean] :include_defaults If true, returns all relevant default configurations for the index template.
|
@@ -35,6 +36,14 @@ module ElasticsearchServerless
|
|
35
36
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-template.html
|
36
37
|
#
|
37
38
|
def simulate_template(arguments = {})
|
39
|
+
request_opts = { endpoint: arguments[:endpoint] || "indices.simulate_template" }
|
40
|
+
|
41
|
+
defined_params = [:name].inject({}) do |set_variables, variable|
|
42
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
43
|
+
set_variables
|
44
|
+
end
|
45
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
46
|
+
|
38
47
|
arguments = arguments.clone
|
39
48
|
headers = arguments.delete(:headers) || {}
|
40
49
|
|
@@ -51,7 +60,7 @@ module ElasticsearchServerless
|
|
51
60
|
params = Utils.process_params(arguments)
|
52
61
|
|
53
62
|
ElasticsearchServerless::API::Response.new(
|
54
|
-
perform_request(method, path, params, body, headers)
|
63
|
+
perform_request(method, path, params, body, headers, request_opts)
|
55
64
|
)
|
56
65
|
end
|
57
66
|
end
|
@@ -22,16 +22,21 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Indices
|
24
24
|
module Actions
|
25
|
+
# Create or update an alias.
|
25
26
|
# Adds a data stream or index to an alias.
|
26
27
|
#
|
27
|
-
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node.
|
28
|
-
#
|
28
|
+
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node.
|
29
|
+
# If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
30
|
+
# @option arguments [Time] :timeout Period to wait for a response.
|
31
|
+
# If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
29
32
|
# @option arguments [Hash] :headers Custom HTTP headers
|
30
33
|
# @option arguments [Hash] :body request body
|
31
34
|
#
|
32
35
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
|
33
36
|
#
|
34
37
|
def update_aliases(arguments = {})
|
38
|
+
request_opts = { endpoint: arguments[:endpoint] || "indices.update_aliases" }
|
39
|
+
|
35
40
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
36
41
|
|
37
42
|
arguments = arguments.clone
|
@@ -44,7 +49,7 @@ module ElasticsearchServerless
|
|
44
49
|
params = Utils.process_params(arguments)
|
45
50
|
|
46
51
|
ElasticsearchServerless::API::Response.new(
|
47
|
-
perform_request(method, path, params, body, headers)
|
52
|
+
perform_request(method, path, params, body, headers, request_opts)
|
48
53
|
)
|
49
54
|
end
|
50
55
|
end
|
@@ -22,16 +22,25 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Indices
|
24
24
|
module Actions
|
25
|
-
#
|
25
|
+
# Validate a query.
|
26
|
+
# Validates a query without running it.
|
26
27
|
#
|
27
|
-
# @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases to search.
|
28
|
-
#
|
28
|
+
# @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases to search.
|
29
|
+
# Supports wildcards (+*+).
|
30
|
+
# To search all data streams or indices, omit this parameter or use +*+ or +_all+.
|
31
|
+
# @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices.
|
32
|
+
# This behavior applies even if the request targets other open indices. Server default: true.
|
29
33
|
# @option arguments [Boolean] :all_shards If +true+, the validation is executed on all shards instead of one random shard per index.
|
30
|
-
# @option arguments [String] :analyzer Analyzer to use for the query string.
|
34
|
+
# @option arguments [String] :analyzer Analyzer to use for the query string.
|
35
|
+
# This parameter can only be used when the +q+ query string parameter is specified.
|
31
36
|
# @option arguments [Boolean] :analyze_wildcard If +true+, wildcard and prefix queries are analyzed.
|
32
37
|
# @option arguments [String] :default_operator The default operator for query string query: +AND+ or +OR+. Server default: OR.
|
33
|
-
# @option arguments [String] :df Field to use as default where no field prefix is given in the query string.
|
34
|
-
#
|
38
|
+
# @option arguments [String] :df Field to use as default where no field prefix is given in the query string.
|
39
|
+
# This parameter can only be used when the +q+ query string parameter is specified.
|
40
|
+
# @option arguments [String, Array<String>] :expand_wildcards Type of index that wildcard patterns can match.
|
41
|
+
# If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
|
42
|
+
# Supports comma-separated values, such as +open,hidden+.
|
43
|
+
# Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open.
|
35
44
|
# @option arguments [Boolean] :explain If +true+, the response returns detailed information if an error has occurred.
|
36
45
|
# @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index.
|
37
46
|
# @option arguments [Boolean] :lenient If +true+, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.
|
@@ -43,6 +52,14 @@ module ElasticsearchServerless
|
|
43
52
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html
|
44
53
|
#
|
45
54
|
def validate_query(arguments = {})
|
55
|
+
request_opts = { endpoint: arguments[:endpoint] || "indices.validate_query" }
|
56
|
+
|
57
|
+
defined_params = [:index].inject({}) do |set_variables, variable|
|
58
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
59
|
+
set_variables
|
60
|
+
end
|
61
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
62
|
+
|
46
63
|
arguments = arguments.clone
|
47
64
|
headers = arguments.delete(:headers) || {}
|
48
65
|
|
@@ -64,7 +81,7 @@ module ElasticsearchServerless
|
|
64
81
|
params = Utils.process_params(arguments)
|
65
82
|
|
66
83
|
ElasticsearchServerless::API::Response.new(
|
67
|
-
perform_request(method, path, params, body, headers)
|
84
|
+
perform_request(method, path, params, body, headers, request_opts)
|
68
85
|
)
|
69
86
|
end
|
70
87
|
end
|
@@ -37,6 +37,14 @@ module ElasticsearchServerless
|
|
37
37
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-inference-api.html
|
38
38
|
#
|
39
39
|
def delete(arguments = {})
|
40
|
+
request_opts = { endpoint: arguments[:endpoint] || "inference.delete" }
|
41
|
+
|
42
|
+
defined_params = [:inference_id, :task_type].inject({}) do |set_variables, variable|
|
43
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
44
|
+
set_variables
|
45
|
+
end
|
46
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
47
|
+
|
40
48
|
raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id]
|
41
49
|
|
42
50
|
arguments = arguments.clone
|
@@ -57,7 +65,7 @@ module ElasticsearchServerless
|
|
57
65
|
params = Utils.process_params(arguments)
|
58
66
|
|
59
67
|
ElasticsearchServerless::API::Response.new(
|
60
|
-
perform_request(method, path, params, body, headers)
|
68
|
+
perform_request(method, path, params, body, headers, request_opts)
|
61
69
|
)
|
62
70
|
end
|
63
71
|
end
|
@@ -35,6 +35,14 @@ module ElasticsearchServerless
|
|
35
35
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-inference-api.html
|
36
36
|
#
|
37
37
|
def get(arguments = {})
|
38
|
+
request_opts = { endpoint: arguments[:endpoint] || "inference.get" }
|
39
|
+
|
40
|
+
defined_params = [:inference_id, :task_type].inject({}) do |set_variables, variable|
|
41
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
42
|
+
set_variables
|
43
|
+
end
|
44
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
45
|
+
|
38
46
|
arguments = arguments.clone
|
39
47
|
headers = arguments.delete(:headers) || {}
|
40
48
|
|
@@ -55,7 +63,7 @@ module ElasticsearchServerless
|
|
55
63
|
params = {}
|
56
64
|
|
57
65
|
ElasticsearchServerless::API::Response.new(
|
58
|
-
perform_request(method, path, params, body, headers)
|
66
|
+
perform_request(method, path, params, body, headers, request_opts)
|
59
67
|
)
|
60
68
|
end
|
61
69
|
end
|
@@ -37,6 +37,14 @@ module ElasticsearchServerless
|
|
37
37
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html
|
38
38
|
#
|
39
39
|
def inference(arguments = {})
|
40
|
+
request_opts = { endpoint: arguments[:endpoint] || "inference.inference" }
|
41
|
+
|
42
|
+
defined_params = [:inference_id, :task_type].inject({}) do |set_variables, variable|
|
43
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
44
|
+
set_variables
|
45
|
+
end
|
46
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
47
|
+
|
40
48
|
raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id]
|
41
49
|
|
42
50
|
arguments = arguments.clone
|
@@ -57,7 +65,7 @@ module ElasticsearchServerless
|
|
57
65
|
params = Utils.process_params(arguments)
|
58
66
|
|
59
67
|
ElasticsearchServerless::API::Response.new(
|
60
|
-
perform_request(method, path, params, body, headers)
|
68
|
+
perform_request(method, path, params, body, headers, request_opts)
|
61
69
|
)
|
62
70
|
end
|
63
71
|
end
|
@@ -36,6 +36,14 @@ module ElasticsearchServerless
|
|
36
36
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-inference-api.html
|
37
37
|
#
|
38
38
|
def put(arguments = {})
|
39
|
+
request_opts = { endpoint: arguments[:endpoint] || "inference.put" }
|
40
|
+
|
41
|
+
defined_params = [:inference_id, :task_type].inject({}) do |set_variables, variable|
|
42
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
43
|
+
set_variables
|
44
|
+
end
|
45
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
46
|
+
|
39
47
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
40
48
|
raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id]
|
41
49
|
|
@@ -57,7 +65,7 @@ module ElasticsearchServerless
|
|
57
65
|
params = {}
|
58
66
|
|
59
67
|
ElasticsearchServerless::API::Response.new(
|
60
|
-
perform_request(method, path, params, body, headers)
|
68
|
+
perform_request(method, path, params, body, headers, request_opts)
|
61
69
|
)
|
62
70
|
end
|
63
71
|
end
|
@@ -21,6 +21,7 @@
|
|
21
21
|
module ElasticsearchServerless
|
22
22
|
module API
|
23
23
|
module Actions
|
24
|
+
# Get cluster info.
|
24
25
|
# Returns basic information about the cluster.
|
25
26
|
#
|
26
27
|
# @option arguments [Hash] :headers Custom HTTP headers
|
@@ -28,6 +29,8 @@ module ElasticsearchServerless
|
|
28
29
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html
|
29
30
|
#
|
30
31
|
def info(arguments = {})
|
32
|
+
request_opts = { endpoint: arguments[:endpoint] || "info" }
|
33
|
+
|
31
34
|
arguments = arguments.clone
|
32
35
|
headers = arguments.delete(:headers) || {}
|
33
36
|
|
@@ -38,7 +41,7 @@ module ElasticsearchServerless
|
|
38
41
|
params = {}
|
39
42
|
|
40
43
|
ElasticsearchServerless::API::Response.new(
|
41
|
-
perform_request(method, path, params, body, headers)
|
44
|
+
perform_request(method, path, params, body, headers, request_opts)
|
42
45
|
)
|
43
46
|
end
|
44
47
|
end
|
@@ -24,14 +24,25 @@ module ElasticsearchServerless
|
|
24
24
|
module Actions
|
25
25
|
# Deletes one or more existing ingest pipeline.
|
26
26
|
#
|
27
|
-
# @option arguments [String] :id Pipeline ID or wildcard expression of pipeline IDs used to limit the request.
|
28
|
-
#
|
29
|
-
# @option arguments [Time] :
|
27
|
+
# @option arguments [String] :id Pipeline ID or wildcard expression of pipeline IDs used to limit the request.
|
28
|
+
# To delete all ingest pipelines in a cluster, use a value of +*+. (*Required*)
|
29
|
+
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node.
|
30
|
+
# If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
31
|
+
# @option arguments [Time] :timeout Period to wait for a response.
|
32
|
+
# If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
30
33
|
# @option arguments [Hash] :headers Custom HTTP headers
|
31
34
|
#
|
32
35
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-pipeline-api.html
|
33
36
|
#
|
34
37
|
def delete_pipeline(arguments = {})
|
38
|
+
request_opts = { endpoint: arguments[:endpoint] || "ingest.delete_pipeline" }
|
39
|
+
|
40
|
+
defined_params = [:id].inject({}) do |set_variables, variable|
|
41
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
42
|
+
set_variables
|
43
|
+
end
|
44
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
45
|
+
|
35
46
|
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
36
47
|
|
37
48
|
arguments = arguments.clone
|
@@ -46,7 +57,7 @@ module ElasticsearchServerless
|
|
46
57
|
params = Utils.process_params(arguments)
|
47
58
|
|
48
59
|
ElasticsearchServerless::API::Response.new(
|
49
|
-
perform_request(method, path, params, body, headers)
|
60
|
+
perform_request(method, path, params, body, headers, request_opts)
|
50
61
|
)
|
51
62
|
end
|
52
63
|
end
|
@@ -25,14 +25,25 @@ module ElasticsearchServerless
|
|
25
25
|
# Returns information about one or more ingest pipelines.
|
26
26
|
# This API returns a local reference of the pipeline.
|
27
27
|
#
|
28
|
-
# @option arguments [String] :id Comma-separated list of pipeline IDs to retrieve.
|
29
|
-
#
|
28
|
+
# @option arguments [String] :id Comma-separated list of pipeline IDs to retrieve.
|
29
|
+
# Wildcard (+*+) expressions are supported.
|
30
|
+
# To get all ingest pipelines, omit this parameter or use +*+.
|
31
|
+
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node.
|
32
|
+
# If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
30
33
|
# @option arguments [Boolean] :summary Return pipelines without their definitions (default: false)
|
31
34
|
# @option arguments [Hash] :headers Custom HTTP headers
|
32
35
|
#
|
33
36
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-pipeline-api.html
|
34
37
|
#
|
35
38
|
def get_pipeline(arguments = {})
|
39
|
+
request_opts = { endpoint: arguments[:endpoint] || "ingest.get_pipeline" }
|
40
|
+
|
41
|
+
defined_params = [:id].inject({}) do |set_variables, variable|
|
42
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
43
|
+
set_variables
|
44
|
+
end
|
45
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
46
|
+
|
36
47
|
arguments = arguments.clone
|
37
48
|
headers = arguments.delete(:headers) || {}
|
38
49
|
|
@@ -49,7 +60,7 @@ module ElasticsearchServerless
|
|
49
60
|
params = Utils.process_params(arguments)
|
50
61
|
|
51
62
|
ElasticsearchServerless::API::Response.new(
|
52
|
-
perform_request(method, path, params, body, headers)
|
63
|
+
perform_request(method, path, params, body, headers, request_opts)
|
53
64
|
)
|
54
65
|
end
|
55
66
|
end
|
@@ -31,6 +31,8 @@ module ElasticsearchServerless
|
|
31
31
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/grok-processor.html
|
32
32
|
#
|
33
33
|
def processor_grok(arguments = {})
|
34
|
+
request_opts = { endpoint: arguments[:endpoint] || "ingest.processor_grok" }
|
35
|
+
|
34
36
|
arguments = arguments.clone
|
35
37
|
headers = arguments.delete(:headers) || {}
|
36
38
|
|
@@ -41,7 +43,7 @@ module ElasticsearchServerless
|
|
41
43
|
params = {}
|
42
44
|
|
43
45
|
ElasticsearchServerless::API::Response.new(
|
44
|
-
perform_request(method, path, params, body, headers)
|
46
|
+
perform_request(method, path, params, body, headers, request_opts)
|
45
47
|
)
|
46
48
|
end
|
47
49
|
end
|
@@ -35,6 +35,14 @@ module ElasticsearchServerless
|
|
35
35
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest.html
|
36
36
|
#
|
37
37
|
def put_pipeline(arguments = {})
|
38
|
+
request_opts = { endpoint: arguments[:endpoint] || "ingest.put_pipeline" }
|
39
|
+
|
40
|
+
defined_params = [:id].inject({}) do |set_variables, variable|
|
41
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
42
|
+
set_variables
|
43
|
+
end
|
44
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
45
|
+
|
38
46
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
39
47
|
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
40
48
|
|
@@ -50,7 +58,7 @@ module ElasticsearchServerless
|
|
50
58
|
params = Utils.process_params(arguments)
|
51
59
|
|
52
60
|
ElasticsearchServerless::API::Response.new(
|
53
|
-
perform_request(method, path, params, body, headers)
|
61
|
+
perform_request(method, path, params, body, headers, request_opts)
|
54
62
|
)
|
55
63
|
end
|
56
64
|
end
|
@@ -24,7 +24,8 @@ module ElasticsearchServerless
|
|
24
24
|
module Actions
|
25
25
|
# Executes an ingest pipeline against a set of provided documents.
|
26
26
|
#
|
27
|
-
# @option arguments [String] :id Pipeline to test.
|
27
|
+
# @option arguments [String] :id Pipeline to test.
|
28
|
+
# If you don’t specify a +pipeline+ in the request body, this parameter is required.
|
28
29
|
# @option arguments [Boolean] :verbose If +true+, the response includes output data for each processor in the executed pipeline.
|
29
30
|
# @option arguments [Hash] :headers Custom HTTP headers
|
30
31
|
# @option arguments [Hash] :body request body
|
@@ -32,6 +33,14 @@ module ElasticsearchServerless
|
|
32
33
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/simulate-pipeline-api.html
|
33
34
|
#
|
34
35
|
def simulate(arguments = {})
|
36
|
+
request_opts = { endpoint: arguments[:endpoint] || "ingest.simulate" }
|
37
|
+
|
38
|
+
defined_params = [:id].inject({}) do |set_variables, variable|
|
39
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
40
|
+
set_variables
|
41
|
+
end
|
42
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
43
|
+
|
35
44
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
36
45
|
|
37
46
|
arguments = arguments.clone
|
@@ -50,7 +59,7 @@ module ElasticsearchServerless
|
|
50
59
|
params = Utils.process_params(arguments)
|
51
60
|
|
52
61
|
ElasticsearchServerless::API::Response.new(
|
53
|
-
perform_request(method, path, params, body, headers)
|
62
|
+
perform_request(method, path, params, body, headers, request_opts)
|
54
63
|
)
|
55
64
|
end
|
56
65
|
end
|
@@ -22,16 +22,20 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module License
|
24
24
|
module Actions
|
25
|
-
#
|
26
|
-
#
|
25
|
+
# Get license information.
|
26
|
+
# Returns information about your Elastic license, including its type, its status, when it was issued, and when it expires.
|
27
|
+
# For more information about the different types of licenses, refer to {https://www.elastic.co/subscriptions Elastic Stack subscriptions}.
|
27
28
|
#
|
28
|
-
# @option arguments [Boolean] :accept_enterprise If +true+, this parameter returns enterprise for Enterprise license types. If +false+, this parameter returns platinum for both platinum and enterprise license types. This behavior is maintained for backwards compatibility.
|
29
|
+
# @option arguments [Boolean] :accept_enterprise If +true+, this parameter returns enterprise for Enterprise license types. If +false+, this parameter returns platinum for both platinum and enterprise license types. This behavior is maintained for backwards compatibility.
|
30
|
+
# This parameter is deprecated and will always be set to true in 8.x. Server default: true.
|
29
31
|
# @option arguments [Boolean] :local Specifies whether to retrieve local information. The default value is +false+, which means the information is retrieved from the master node.
|
30
32
|
# @option arguments [Hash] :headers Custom HTTP headers
|
31
33
|
#
|
32
34
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-license.html
|
33
35
|
#
|
34
36
|
def get(arguments = {})
|
37
|
+
request_opts = { endpoint: arguments[:endpoint] || "license.get" }
|
38
|
+
|
35
39
|
arguments = arguments.clone
|
36
40
|
headers = arguments.delete(:headers) || {}
|
37
41
|
|
@@ -42,7 +46,7 @@ module ElasticsearchServerless
|
|
42
46
|
params = Utils.process_params(arguments)
|
43
47
|
|
44
48
|
ElasticsearchServerless::API::Response.new(
|
45
|
-
perform_request(method, path, params, body, headers)
|
49
|
+
perform_request(method, path, params, body, headers, request_opts)
|
46
50
|
)
|
47
51
|
end
|
48
52
|
end
|
@@ -30,6 +30,14 @@ module ElasticsearchServerless
|
|
30
30
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-delete-pipeline.html
|
31
31
|
#
|
32
32
|
def delete_pipeline(arguments = {})
|
33
|
+
request_opts = { endpoint: arguments[:endpoint] || "logstash.delete_pipeline" }
|
34
|
+
|
35
|
+
defined_params = [:id].inject({}) do |set_variables, variable|
|
36
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
37
|
+
set_variables
|
38
|
+
end
|
39
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
40
|
+
|
33
41
|
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
34
42
|
|
35
43
|
arguments = arguments.clone
|
@@ -44,7 +52,7 @@ module ElasticsearchServerless
|
|
44
52
|
params = {}
|
45
53
|
|
46
54
|
ElasticsearchServerless::API::Response.new(
|
47
|
-
perform_request(method, path, params, body, headers)
|
55
|
+
perform_request(method, path, params, body, headers, request_opts)
|
48
56
|
)
|
49
57
|
end
|
50
58
|
end
|
@@ -30,6 +30,14 @@ module ElasticsearchServerless
|
|
30
30
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-get-pipeline.html
|
31
31
|
#
|
32
32
|
def get_pipeline(arguments = {})
|
33
|
+
request_opts = { endpoint: arguments[:endpoint] || "logstash.get_pipeline" }
|
34
|
+
|
35
|
+
defined_params = [:id].inject({}) do |set_variables, variable|
|
36
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
37
|
+
set_variables
|
38
|
+
end
|
39
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
40
|
+
|
33
41
|
arguments = arguments.clone
|
34
42
|
headers = arguments.delete(:headers) || {}
|
35
43
|
|
@@ -46,7 +54,7 @@ module ElasticsearchServerless
|
|
46
54
|
params = {}
|
47
55
|
|
48
56
|
ElasticsearchServerless::API::Response.new(
|
49
|
-
perform_request(method, path, params, body, headers)
|
57
|
+
perform_request(method, path, params, body, headers, request_opts)
|
50
58
|
)
|
51
59
|
end
|
52
60
|
end
|
@@ -31,6 +31,14 @@ module ElasticsearchServerless
|
|
31
31
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-put-pipeline.html
|
32
32
|
#
|
33
33
|
def put_pipeline(arguments = {})
|
34
|
+
request_opts = { endpoint: arguments[:endpoint] || "logstash.put_pipeline" }
|
35
|
+
|
36
|
+
defined_params = [:id].inject({}) do |set_variables, variable|
|
37
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
38
|
+
set_variables
|
39
|
+
end
|
40
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
41
|
+
|
34
42
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
35
43
|
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
36
44
|
|
@@ -46,7 +54,7 @@ module ElasticsearchServerless
|
|
46
54
|
params = {}
|
47
55
|
|
48
56
|
ElasticsearchServerless::API::Response.new(
|
49
|
-
perform_request(method, path, params, body, headers)
|
57
|
+
perform_request(method, path, params, body, headers, request_opts)
|
50
58
|
)
|
51
59
|
end
|
52
60
|
end
|
@@ -22,15 +22,17 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module MachineLearning
|
24
24
|
module Actions
|
25
|
-
# Close anomaly detection jobs
|
25
|
+
# Close anomaly detection jobs.
|
26
26
|
# A job can be opened and closed multiple times throughout its lifecycle. A closed job cannot receive data or perform analysis operations, but you can still explore and navigate results.
|
27
27
|
# When you close a job, it runs housekeeping tasks such as pruning the model history, flushing buffers, calculating final results and persisting the model snapshots. Depending upon the size of the job, it could take several minutes to close and the equivalent time to re-open. After it is closed, the job has a minimal overhead on the cluster except for maintaining its meta data. Therefore it is a best practice to close jobs that are no longer required to process data.
|
28
28
|
# If you close an anomaly detection job whose datafeed is running, the request first tries to stop the datafeed. This behavior is equivalent to calling stop datafeed API with the same timeout and force parameters as the close job request.
|
29
29
|
# When a datafeed that has a specified end date stops, it automatically closes its associated job.
|
30
30
|
#
|
31
31
|
# @option arguments [String] :job_id Identifier for the anomaly detection job. It can be a job identifier, a group name, or a wildcard expression. You can close multiple anomaly detection jobs in a single API request by using a group name, a comma-separated list of jobs, or a wildcard expression. You can close all jobs by using +_all+ or by specifying +*+ as the job identifier. (*Required*)
|
32
|
-
# @option arguments [Boolean] :allow_no_match Specifies what to do when the request: contains wildcard expressions and there are no jobs that match; contains the +_all+ string or no identifiers and there are no matches; or contains wildcard expressions and there are only partial matches. By default, it returns an empty jobs array when there are no matches and the subset of results when there are partial matches.
|
33
|
-
#
|
32
|
+
# @option arguments [Boolean] :allow_no_match Specifies what to do when the request: contains wildcard expressions and there are no jobs that match; contains the +_all+ string or no identifiers and there are no matches; or contains wildcard expressions and there are only partial matches. By default, it returns an empty jobs array when there are no matches and the subset of results when there are partial matches.
|
33
|
+
# If +false+, the request returns a 404 status code when there are no matches or only partial matches. Server default: true.
|
34
|
+
# @option arguments [Boolean] :force Use to close a failed job, or to forcefully close a job which has not responded to its initial close request; the request returns without performing the associated actions such as flushing buffers and persisting the model snapshots.
|
35
|
+
# If you want the job to be in a consistent state after the close job API returns, do not set to +true+. This parameter should be used only in situations where the job has already failed or where you are not interested in results the job might have recently produced or might produce in the future.
|
34
36
|
# @option arguments [Time] :timeout Controls the time to wait until a job has closed. Server default: 30m.
|
35
37
|
# @option arguments [Hash] :headers Custom HTTP headers
|
36
38
|
# @option arguments [Hash] :body request body
|
@@ -38,6 +40,14 @@ module ElasticsearchServerless
|
|
38
40
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-close-job.html
|
39
41
|
#
|
40
42
|
def close_job(arguments = {})
|
43
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.close_job" }
|
44
|
+
|
45
|
+
defined_params = [:job_id].inject({}) do |set_variables, variable|
|
46
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
47
|
+
set_variables
|
48
|
+
end
|
49
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
50
|
+
|
41
51
|
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
|
42
52
|
|
43
53
|
arguments = arguments.clone
|
@@ -52,7 +62,7 @@ module ElasticsearchServerless
|
|
52
62
|
params = Utils.process_params(arguments)
|
53
63
|
|
54
64
|
ElasticsearchServerless::API::Response.new(
|
55
|
-
perform_request(method, path, params, body, headers)
|
65
|
+
perform_request(method, path, params, body, headers, request_opts)
|
56
66
|
)
|
57
67
|
end
|
58
68
|
end
|