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,16 +22,27 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Indices
|
24
24
|
module Actions
|
25
|
+
# Get data streams.
|
25
26
|
# Retrieves information about one or more data streams.
|
26
27
|
#
|
27
|
-
# @option arguments [String, Array<String>] :name Comma-separated list of data stream names used to limit the request.
|
28
|
-
#
|
28
|
+
# @option arguments [String, Array<String>] :name Comma-separated list of data stream names used to limit the request.
|
29
|
+
# Wildcard (+*+) expressions are supported. If omitted, all data streams are returned.
|
30
|
+
# @option arguments [String, Array<String>] :expand_wildcards Type of data stream that wildcard patterns can match.
|
31
|
+
# Supports comma-separated values, such as +open,hidden+. Server default: open.
|
29
32
|
# @option arguments [Boolean] :include_defaults If true, returns all relevant default configurations for the index template.
|
30
33
|
# @option arguments [Hash] :headers Custom HTTP headers
|
31
34
|
#
|
32
35
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
|
33
36
|
#
|
34
37
|
def get_data_stream(arguments = {})
|
38
|
+
request_opts = { endpoint: arguments[:endpoint] || "indices.get_data_stream" }
|
39
|
+
|
40
|
+
defined_params = [:name].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
|
arguments = arguments.clone
|
36
47
|
headers = arguments.delete(:headers) || {}
|
37
48
|
|
@@ -48,7 +59,7 @@ module ElasticsearchServerless
|
|
48
59
|
params = Utils.process_params(arguments)
|
49
60
|
|
50
61
|
ElasticsearchServerless::API::Response.new(
|
51
|
-
perform_request(method, path, params, body, headers)
|
62
|
+
perform_request(method, path, params, body, headers, request_opts)
|
52
63
|
)
|
53
64
|
end
|
54
65
|
end
|
@@ -35,6 +35,14 @@ module ElasticsearchServerless
|
|
35
35
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-template.html
|
36
36
|
#
|
37
37
|
def get_index_template(arguments = {})
|
38
|
+
request_opts = { endpoint: arguments[:endpoint] || "indices.get_index_template" }
|
39
|
+
|
40
|
+
defined_params = [:name].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
|
|
@@ -51,7 +59,7 @@ module ElasticsearchServerless
|
|
51
59
|
params = Utils.process_params(arguments)
|
52
60
|
|
53
61
|
ElasticsearchServerless::API::Response.new(
|
54
|
-
perform_request(method, path, params, body, headers)
|
62
|
+
perform_request(method, path, params, body, headers, request_opts)
|
55
63
|
)
|
56
64
|
end
|
57
65
|
end
|
@@ -22,20 +22,36 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Indices
|
24
24
|
module Actions
|
25
|
+
# Get mapping definitions.
|
25
26
|
# Retrieves mapping definitions for one or more indices.
|
26
27
|
# For data streams, the API retrieves mappings for the stream’s backing indices.
|
27
28
|
#
|
28
|
-
# @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit the request.
|
29
|
-
#
|
30
|
-
#
|
29
|
+
# @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit the request.
|
30
|
+
# Supports wildcards (+*+).
|
31
|
+
# To target all data streams and indices, omit this parameter or use +*+ or +_all+.
|
32
|
+
# @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.
|
33
|
+
# This behavior applies even if the request targets other open indices. Server default: true.
|
34
|
+
# @option arguments [String, Array<String>] :expand_wildcards Type of index that wildcard patterns can match.
|
35
|
+
# If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
|
36
|
+
# Supports comma-separated values, such as +open,hidden+.
|
37
|
+
# Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open.
|
31
38
|
# @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index.
|
32
39
|
# @option arguments [Boolean] :local If +true+, the request retrieves information from the local node only.
|
33
|
-
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node.
|
40
|
+
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node.
|
41
|
+
# If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
34
42
|
# @option arguments [Hash] :headers Custom HTTP headers
|
35
43
|
#
|
36
44
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html
|
37
45
|
#
|
38
46
|
def get_mapping(arguments = {})
|
47
|
+
request_opts = { endpoint: arguments[:endpoint] || "indices.get_mapping" }
|
48
|
+
|
49
|
+
defined_params = [:index].inject({}) do |set_variables, variable|
|
50
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
51
|
+
set_variables
|
52
|
+
end
|
53
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
54
|
+
|
39
55
|
arguments = arguments.clone
|
40
56
|
headers = arguments.delete(:headers) || {}
|
41
57
|
|
@@ -52,7 +68,7 @@ module ElasticsearchServerless
|
|
52
68
|
params = Utils.process_params(arguments)
|
53
69
|
|
54
70
|
ElasticsearchServerless::API::Response.new(
|
55
|
-
perform_request(method, path, params, body, headers)
|
71
|
+
perform_request(method, path, params, body, headers, request_opts)
|
56
72
|
)
|
57
73
|
end
|
58
74
|
end
|
@@ -22,23 +22,43 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Indices
|
24
24
|
module Actions
|
25
|
+
# Get index settings.
|
25
26
|
# Returns setting information for one or more indices. For data streams,
|
26
27
|
# returns setting information for the stream’s backing indices.
|
27
28
|
#
|
28
|
-
# @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit
|
29
|
+
# @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit
|
30
|
+
# the request. Supports wildcards (+*+). To target all data streams and
|
31
|
+
# indices, omit this parameter or use +*+ or +_all+.
|
29
32
|
# @option arguments [String, Array<String>] :name Comma-separated list or wildcard expression of settings to retrieve.
|
30
|
-
# @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index
|
31
|
-
#
|
33
|
+
# @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index
|
34
|
+
# alias, or +_all+ value targets only missing or closed indices. This
|
35
|
+
# behavior applies even if the request targets other open indices. For
|
36
|
+
# example, a request targeting +foo*,bar*+ returns an error if an index
|
37
|
+
# starts with foo but no index starts with +bar+. Server default: true.
|
38
|
+
# @option arguments [String, Array<String>] :expand_wildcards Type of index that wildcard patterns can match.
|
39
|
+
# If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
|
40
|
+
# Supports comma-separated values, such as +open,hidden+. Server default: open.
|
32
41
|
# @option arguments [Boolean] :flat_settings If +true+, returns settings in flat format.
|
33
42
|
# @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index.
|
34
43
|
# @option arguments [Boolean] :include_defaults If +true+, return all default settings in the response.
|
35
|
-
# @option arguments [Boolean] :local If +true+, the request retrieves information from the local node only. If
|
36
|
-
#
|
44
|
+
# @option arguments [Boolean] :local If +true+, the request retrieves information from the local node only. If
|
45
|
+
# +false+, information is retrieved from the master node.
|
46
|
+
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is
|
47
|
+
# received before the timeout expires, the request fails and returns an
|
48
|
+
# error. Server default: 30s.
|
37
49
|
# @option arguments [Hash] :headers Custom HTTP headers
|
38
50
|
#
|
39
51
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html
|
40
52
|
#
|
41
53
|
def get_settings(arguments = {})
|
54
|
+
request_opts = { endpoint: arguments[:endpoint] || "indices.get_settings" }
|
55
|
+
|
56
|
+
defined_params = [:index, :name].inject({}) do |set_variables, variable|
|
57
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
58
|
+
set_variables
|
59
|
+
end
|
60
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
61
|
+
|
42
62
|
arguments = arguments.clone
|
43
63
|
headers = arguments.delete(:headers) || {}
|
44
64
|
|
@@ -61,7 +81,7 @@ module ElasticsearchServerless
|
|
61
81
|
params = Utils.process_params(arguments)
|
62
82
|
|
63
83
|
ElasticsearchServerless::API::Response.new(
|
64
|
-
perform_request(method, path, params, body, headers)
|
84
|
+
perform_request(method, path, params, body, headers, request_opts)
|
65
85
|
)
|
66
86
|
end
|
67
87
|
end
|
@@ -22,6 +22,7 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Indices
|
24
24
|
module Actions
|
25
|
+
# Convert an index alias to a data stream.
|
25
26
|
# Converts an index alias to a data stream.
|
26
27
|
# You must have a matching index template that is data stream enabled.
|
27
28
|
# The alias must meet the following criteria:
|
@@ -39,6 +40,14 @@ module ElasticsearchServerless
|
|
39
40
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
|
40
41
|
#
|
41
42
|
def migrate_to_data_stream(arguments = {})
|
43
|
+
request_opts = { endpoint: arguments[:endpoint] || "indices.migrate_to_data_stream" }
|
44
|
+
|
45
|
+
defined_params = [:name].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
|
+
|
42
51
|
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
43
52
|
|
44
53
|
arguments = arguments.clone
|
@@ -53,7 +62,7 @@ module ElasticsearchServerless
|
|
53
62
|
params = {}
|
54
63
|
|
55
64
|
ElasticsearchServerless::API::Response.new(
|
56
|
-
perform_request(method, path, params, body, headers)
|
65
|
+
perform_request(method, path, params, body, headers, request_opts)
|
57
66
|
)
|
58
67
|
end
|
59
68
|
end
|
@@ -22,6 +22,7 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Indices
|
24
24
|
module Actions
|
25
|
+
# Update data streams.
|
25
26
|
# Performs one or more data stream modification actions in a single atomic operation.
|
26
27
|
#
|
27
28
|
# @option arguments [Hash] :headers Custom HTTP headers
|
@@ -30,6 +31,8 @@ module ElasticsearchServerless
|
|
30
31
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
|
31
32
|
#
|
32
33
|
def modify_data_stream(arguments = {})
|
34
|
+
request_opts = { endpoint: arguments[:endpoint] || "indices.modify_data_stream" }
|
35
|
+
|
33
36
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
34
37
|
|
35
38
|
arguments = arguments.clone
|
@@ -42,7 +45,7 @@ module ElasticsearchServerless
|
|
42
45
|
params = {}
|
43
46
|
|
44
47
|
ElasticsearchServerless::API::Response.new(
|
45
|
-
perform_request(method, path, params, body, headers)
|
48
|
+
perform_request(method, path, params, body, headers, request_opts)
|
46
49
|
)
|
47
50
|
end
|
48
51
|
end
|
@@ -22,18 +22,33 @@ 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 [String, Array] :index Comma-separated list of data streams or indices to add.
|
28
|
-
#
|
29
|
-
#
|
30
|
-
# @option arguments [
|
28
|
+
# @option arguments [String, Array] :index Comma-separated list of data streams or indices to add.
|
29
|
+
# Supports wildcards (+*+).
|
30
|
+
# Wildcard patterns that match both data streams and indices return an error. (*Required*)
|
31
|
+
# @option arguments [String] :name Alias to update.
|
32
|
+
# If the alias doesn’t exist, the request creates it.
|
33
|
+
# Index alias names support date math. (*Required*)
|
34
|
+
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node.
|
35
|
+
# If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
36
|
+
# @option arguments [Time] :timeout Period to wait for a response.
|
37
|
+
# If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
31
38
|
# @option arguments [Hash] :headers Custom HTTP headers
|
32
39
|
# @option arguments [Hash] :body request body
|
33
40
|
#
|
34
41
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
|
35
42
|
#
|
36
43
|
def put_alias(arguments = {})
|
44
|
+
request_opts = { endpoint: arguments[:endpoint] || "indices.put_alias" }
|
45
|
+
|
46
|
+
defined_params = [:index, :name].inject({}) do |set_variables, variable|
|
47
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
48
|
+
set_variables
|
49
|
+
end
|
50
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
51
|
+
|
37
52
|
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
38
53
|
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
39
54
|
|
@@ -53,7 +68,7 @@ module ElasticsearchServerless
|
|
53
68
|
params = Utils.process_params(arguments)
|
54
69
|
|
55
70
|
ElasticsearchServerless::API::Response.new(
|
56
|
-
perform_request(method, path, params, body, headers)
|
71
|
+
perform_request(method, path, params, body, headers, request_opts)
|
57
72
|
)
|
58
73
|
end
|
59
74
|
end
|
@@ -22,18 +22,34 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Indices
|
24
24
|
module Actions
|
25
|
-
# Update
|
25
|
+
# Update data stream lifecycles.
|
26
|
+
# Update the data stream lifecycle of the specified data streams.
|
26
27
|
#
|
27
|
-
# @option arguments [String, Array<String>] :name Comma-separated list of data streams used to limit the request.
|
28
|
-
#
|
29
|
-
#
|
30
|
-
# @option arguments [
|
28
|
+
# @option arguments [String, Array<String>] :name Comma-separated list of data streams used to limit the request.
|
29
|
+
# Supports wildcards (+*+).
|
30
|
+
# To target all data streams use +*+ or +_all+. (*Required*)
|
31
|
+
# @option arguments [String, Array<String>] :expand_wildcards Type of data stream that wildcard patterns can match.
|
32
|
+
# Supports comma-separated values, such as +open,hidden+.
|
33
|
+
# Valid values are: +all+, +hidden+, +open+, +closed+, +none+. Server default: open.
|
34
|
+
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is
|
35
|
+
# received before the timeout expires, the request fails and returns an
|
36
|
+
# error. Server default: 30s.
|
37
|
+
# @option arguments [Time] :timeout Period to wait for a response.
|
38
|
+
# If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
31
39
|
# @option arguments [Hash] :headers Custom HTTP headers
|
32
40
|
# @option arguments [Hash] :body request body
|
33
41
|
#
|
34
42
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-put-lifecycle.html
|
35
43
|
#
|
36
44
|
def put_data_lifecycle(arguments = {})
|
45
|
+
request_opts = { endpoint: arguments[:endpoint] || "indices.put_data_lifecycle" }
|
46
|
+
|
47
|
+
defined_params = [:name].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
|
+
|
37
53
|
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
38
54
|
|
39
55
|
arguments = arguments.clone
|
@@ -48,7 +64,7 @@ module ElasticsearchServerless
|
|
48
64
|
params = Utils.process_params(arguments)
|
49
65
|
|
50
66
|
ElasticsearchServerless::API::Response.new(
|
51
|
-
perform_request(method, path, params, body, headers)
|
67
|
+
perform_request(method, path, params, body, headers, request_opts)
|
52
68
|
)
|
53
69
|
end
|
54
70
|
end
|
@@ -27,7 +27,8 @@ module ElasticsearchServerless
|
|
27
27
|
#
|
28
28
|
# @option arguments [String] :name Index or template name (*Required*)
|
29
29
|
# @option arguments [Boolean] :create If +true+, this request cannot replace or update existing index templates.
|
30
|
-
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node.
|
30
|
+
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node.
|
31
|
+
# If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
31
32
|
# @option arguments [String] :cause User defined reason for creating/updating the index template
|
32
33
|
# @option arguments [Hash] :headers Custom HTTP headers
|
33
34
|
# @option arguments [Hash] :body request body
|
@@ -35,6 +36,14 @@ module ElasticsearchServerless
|
|
35
36
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-template.html
|
36
37
|
#
|
37
38
|
def put_index_template(arguments = {})
|
39
|
+
request_opts = { endpoint: arguments[:endpoint] || "indices.put_index_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
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
39
48
|
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
40
49
|
|
@@ -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,23 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Indices
|
24
24
|
module Actions
|
25
|
+
# Update field mappings.
|
25
26
|
# Adds new fields to an existing data stream or index.
|
26
27
|
# You can also use this API to change the search settings of existing fields.
|
27
28
|
# For data streams, these changes are applied to all backing indices by default.
|
28
29
|
#
|
29
30
|
# @option arguments [String, Array] :index A comma-separated list of index names the mapping should be added to (supports wildcards); use +_all+ or omit to add the mapping on all indices. (*Required*)
|
30
|
-
# @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.
|
31
|
-
#
|
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.
|
33
|
+
# @option arguments [String, Array<String>] :expand_wildcards Type of index that wildcard patterns can match.
|
34
|
+
# If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
|
35
|
+
# Supports comma-separated values, such as +open,hidden+.
|
36
|
+
# Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open.
|
32
37
|
# @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index.
|
33
|
-
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node.
|
34
|
-
#
|
38
|
+
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node.
|
39
|
+
# If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
40
|
+
# @option arguments [Time] :timeout Period to wait for a response.
|
41
|
+
# If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
35
42
|
# @option arguments [Boolean] :write_index_only If +true+, the mappings are applied only to the current write index for the target.
|
36
43
|
# @option arguments [Hash] :headers Custom HTTP headers
|
37
44
|
# @option arguments [Hash] :body request body
|
@@ -39,6 +46,14 @@ module ElasticsearchServerless
|
|
39
46
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html
|
40
47
|
#
|
41
48
|
def put_mapping(arguments = {})
|
49
|
+
request_opts = { endpoint: arguments[:endpoint] || "indices.put_mapping" }
|
50
|
+
|
51
|
+
defined_params = [:index].inject({}) do |set_variables, variable|
|
52
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
53
|
+
set_variables
|
54
|
+
end
|
55
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
56
|
+
|
42
57
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
43
58
|
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
44
59
|
|
@@ -54,7 +69,7 @@ module ElasticsearchServerless
|
|
54
69
|
params = Utils.process_params(arguments)
|
55
70
|
|
56
71
|
ElasticsearchServerless::API::Response.new(
|
57
|
-
perform_request(method, path, params, body, headers)
|
72
|
+
perform_request(method, path, params, body, headers, request_opts)
|
58
73
|
)
|
59
74
|
end
|
60
75
|
end
|
@@ -22,23 +22,44 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Indices
|
24
24
|
module Actions
|
25
|
-
#
|
25
|
+
# Update index settings.
|
26
|
+
# Changes dynamic index settings in real time. For data streams, index setting
|
26
27
|
# changes are applied to all backing indices by default.
|
27
28
|
#
|
28
|
-
# @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit
|
29
|
-
#
|
30
|
-
#
|
29
|
+
# @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit
|
30
|
+
# the request. Supports wildcards (+*+). To target all data streams and
|
31
|
+
# indices, omit this parameter or use +*+ or +_all+.
|
32
|
+
# @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index
|
33
|
+
# alias, or +_all+ value targets only missing or closed indices. This
|
34
|
+
# behavior applies even if the request targets other open indices. For
|
35
|
+
# example, a request targeting +foo*,bar*+ returns an error if an index
|
36
|
+
# starts with +foo+ but no index starts with +bar+.
|
37
|
+
# @option arguments [String, Array<String>] :expand_wildcards Type of index that wildcard patterns can match. If the request can target
|
38
|
+
# data streams, this argument determines whether wildcard expressions match
|
39
|
+
# hidden data streams. Supports comma-separated values, such as
|
40
|
+
# +open,hidden+. Server default: open.
|
31
41
|
# @option arguments [Boolean] :flat_settings If +true+, returns settings in flat format.
|
32
42
|
# @option arguments [Boolean] :ignore_unavailable If +true+, returns settings in flat format.
|
33
|
-
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is
|
43
|
+
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is
|
44
|
+
# received before the timeout expires, the request fails and returns an
|
45
|
+
# error. Server default: 30s.
|
34
46
|
# @option arguments [Boolean] :preserve_existing If +true+, existing index settings remain unchanged.
|
35
|
-
# @option arguments [Time] :timeout Period to wait for a response. If no response is received before the
|
47
|
+
# @option arguments [Time] :timeout Period to wait for a response. If no response is received before the
|
48
|
+
# timeout expires, the request fails and returns an error. Server default: 30s.
|
36
49
|
# @option arguments [Hash] :headers Custom HTTP headers
|
37
50
|
# @option arguments [Hash] :body settings
|
38
51
|
#
|
39
52
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html
|
40
53
|
#
|
41
54
|
def put_settings(arguments = {})
|
55
|
+
request_opts = { endpoint: arguments[:endpoint] || "indices.put_settings" }
|
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
|
+
|
42
63
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
43
64
|
|
44
65
|
arguments = arguments.clone
|
@@ -57,7 +78,7 @@ module ElasticsearchServerless
|
|
57
78
|
params = Utils.process_params(arguments)
|
58
79
|
|
59
80
|
ElasticsearchServerless::API::Response.new(
|
60
|
-
perform_request(method, path, params, body, headers)
|
81
|
+
perform_request(method, path, params, body, headers, request_opts)
|
61
82
|
)
|
62
83
|
end
|
63
84
|
end
|
@@ -27,8 +27,11 @@ module ElasticsearchServerless
|
|
27
27
|
#
|
28
28
|
# @option arguments [String] :name The name of the template (*Required*)
|
29
29
|
# @option arguments [Boolean] :create If true, this request cannot replace or update existing index templates.
|
30
|
-
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is
|
31
|
-
#
|
30
|
+
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is
|
31
|
+
# received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
32
|
+
# @option arguments [Integer] :order Order in which Elasticsearch applies this template if index
|
33
|
+
# matches multiple templates.Templates with lower 'order' values are merged first. Templates with higher
|
34
|
+
# 'order' values are merged later, overriding templates with lower values.
|
32
35
|
# @option arguments [String] :cause [TODO]
|
33
36
|
# @option arguments [Hash] :headers Custom HTTP headers
|
34
37
|
# @option arguments [Hash] :body request body
|
@@ -36,6 +39,14 @@ module ElasticsearchServerless
|
|
36
39
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates-v1.html
|
37
40
|
#
|
38
41
|
def put_template(arguments = {})
|
42
|
+
request_opts = { endpoint: arguments[:endpoint] || "indices.put_template" }
|
43
|
+
|
44
|
+
defined_params = [:name].inject({}) do |set_variables, variable|
|
45
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
46
|
+
set_variables
|
47
|
+
end
|
48
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
49
|
+
|
39
50
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
40
51
|
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
41
52
|
|
@@ -51,7 +62,7 @@ module ElasticsearchServerless
|
|
51
62
|
params = Utils.process_params(arguments)
|
52
63
|
|
53
64
|
ElasticsearchServerless::API::Response.new(
|
54
|
-
perform_request(method, path, params, body, headers)
|
65
|
+
perform_request(method, path, params, body, headers, request_opts)
|
55
66
|
)
|
56
67
|
end
|
57
68
|
end
|
@@ -22,18 +22,33 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Indices
|
24
24
|
module Actions
|
25
|
+
# Refresh an index.
|
25
26
|
# A refresh makes recent operations performed on one or more indices available for search.
|
26
27
|
# For data streams, the API runs the refresh operation on the stream’s backing indices.
|
27
28
|
#
|
28
|
-
# @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit the request.
|
29
|
-
#
|
30
|
-
#
|
29
|
+
# @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit the request.
|
30
|
+
# Supports wildcards (+*+).
|
31
|
+
# To target all data streams and indices, omit this parameter or use +*+ or +_all+.
|
32
|
+
# @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.
|
33
|
+
# This behavior applies even if the request targets other open indices. Server default: true.
|
34
|
+
# @option arguments [String, Array<String>] :expand_wildcards Type of index that wildcard patterns can match.
|
35
|
+
# If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
|
36
|
+
# Supports comma-separated values, such as +open,hidden+.
|
37
|
+
# Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open.
|
31
38
|
# @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index.
|
32
39
|
# @option arguments [Hash] :headers Custom HTTP headers
|
33
40
|
#
|
34
41
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html
|
35
42
|
#
|
36
43
|
def refresh(arguments = {})
|
44
|
+
request_opts = { endpoint: arguments[:endpoint] || "indices.refresh" }
|
45
|
+
|
46
|
+
defined_params = [:index].inject({}) do |set_variables, variable|
|
47
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
48
|
+
set_variables
|
49
|
+
end
|
50
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
51
|
+
|
37
52
|
arguments = arguments.clone
|
38
53
|
headers = arguments.delete(:headers) || {}
|
39
54
|
|
@@ -50,7 +65,7 @@ module ElasticsearchServerless
|
|
50
65
|
params = Utils.process_params(arguments)
|
51
66
|
|
52
67
|
ElasticsearchServerless::API::Response.new(
|
53
|
-
perform_request(method, path, params, body, headers)
|
68
|
+
perform_request(method, path, params, body, headers, request_opts)
|
54
69
|
)
|
55
70
|
end
|
56
71
|
end
|
@@ -25,13 +25,25 @@ module ElasticsearchServerless
|
|
25
25
|
# Resolves the specified name(s) and/or index patterns for indices, aliases, and data streams.
|
26
26
|
# Multiple patterns and remote clusters are supported.
|
27
27
|
#
|
28
|
-
# @option arguments [String, Array<String>] :name Comma-separated name(s) or index pattern(s) of the indices, aliases, and data streams to resolve.
|
29
|
-
#
|
28
|
+
# @option arguments [String, Array<String>] :name Comma-separated name(s) or index pattern(s) of the indices, aliases, and data streams to resolve.
|
29
|
+
# Resources on remote clusters can be specified using the +<cluster>+:+<name>+ syntax. (*Required*)
|
30
|
+
# @option arguments [String, Array<String>] :expand_wildcards Type of index that wildcard patterns can match.
|
31
|
+
# If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
|
32
|
+
# Supports comma-separated values, such as +open,hidden+.
|
33
|
+
# Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open.
|
30
34
|
# @option arguments [Hash] :headers Custom HTTP headers
|
31
35
|
#
|
32
36
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-index-api.html
|
33
37
|
#
|
34
38
|
def resolve_index(arguments = {})
|
39
|
+
request_opts = { endpoint: arguments[:endpoint] || "indices.resolve_index" }
|
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
|
+
|
35
47
|
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
36
48
|
|
37
49
|
arguments = arguments.clone
|
@@ -46,7 +58,7 @@ module ElasticsearchServerless
|
|
46
58
|
params = Utils.process_params(arguments)
|
47
59
|
|
48
60
|
ElasticsearchServerless::API::Response.new(
|
49
|
-
perform_request(method, path, params, body, headers)
|
61
|
+
perform_request(method, path, params, body, headers, request_opts)
|
50
62
|
)
|
51
63
|
end
|
52
64
|
end
|