elasticsearch-serverless 0.2.0 → 0.4.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 +19 -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 +11 -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 +17 -3
- data/lib/elasticsearch-serverless/api/indices/get_data_stream.rb +16 -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 +13 -2
- 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/refresh.rb +19 -4
- data/lib/elasticsearch-serverless/api/indices/resolve_index.rb +19 -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 +20 -7
- data/lib/elasticsearch-serverless/api/machine_learning/get_calendar_events.rb +10 -2
- data/lib/elasticsearch-serverless/api/machine_learning/get_calendars.rb +10 -2
- data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics.rb +25 -5
- data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics_stats.rb +22 -4
- data/lib/elasticsearch-serverless/api/machine_learning/get_datafeed_stats.rb +21 -4
- data/lib/elasticsearch-serverless/api/machine_learning/get_datafeeds.rb +24 -5
- data/lib/elasticsearch-serverless/api/machine_learning/get_filters.rb +10 -2
- data/lib/elasticsearch-serverless/api/machine_learning/get_job_stats.rb +22 -4
- data/lib/elasticsearch-serverless/api/machine_learning/get_jobs.rb +24 -5
- data/lib/elasticsearch-serverless/api/machine_learning/get_overall_buckets.rb +32 -8
- data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models.rb +29 -8
- data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models_stats.rb +19 -4
- data/lib/elasticsearch-serverless/api/machine_learning/open_job.rb +12 -5
- data/lib/elasticsearch-serverless/api/machine_learning/post_calendar_events.rb +10 -2
- data/lib/elasticsearch-serverless/api/machine_learning/preview_data_frame_analytics.rb +10 -1
- data/lib/elasticsearch-serverless/api/machine_learning/preview_datafeed.rb +14 -3
- data/lib/elasticsearch-serverless/api/machine_learning/put_calendar.rb +10 -2
- data/lib/elasticsearch-serverless/api/machine_learning/put_calendar_job.rb +10 -2
- data/lib/elasticsearch-serverless/api/machine_learning/put_data_frame_analytics.rb +13 -3
- data/lib/elasticsearch-serverless/api/machine_learning/put_datafeed.rb +18 -6
- data/lib/elasticsearch-serverless/api/machine_learning/put_filter.rb +10 -2
- data/lib/elasticsearch-serverless/api/machine_learning/put_job.rb +11 -2
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model.rb +16 -4
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_alias.rb +15 -4
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_definition_part.rb +12 -3
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_vocabulary.rb +10 -2
- data/lib/elasticsearch-serverless/api/machine_learning/reset_job.rb +15 -4
- data/lib/elasticsearch-serverless/api/machine_learning/start_data_frame_analytics.rb +15 -4
- data/lib/elasticsearch-serverless/api/machine_learning/start_datafeed.rb +28 -9
- data/lib/elasticsearch-serverless/api/machine_learning/start_trained_model_deployment.rb +27 -6
- data/lib/elasticsearch-serverless/api/machine_learning/stop_data_frame_analytics.rb +24 -5
- data/lib/elasticsearch-serverless/api/machine_learning/stop_datafeed.rb +20 -4
- data/lib/elasticsearch-serverless/api/machine_learning/stop_trained_model_deployment.rb +16 -4
- data/lib/elasticsearch-serverless/api/machine_learning/update_data_frame_analytics.rb +13 -3
- data/lib/elasticsearch-serverless/api/machine_learning/update_datafeed.rb +22 -5
- data/lib/elasticsearch-serverless/api/machine_learning/update_filter.rb +10 -1
- data/lib/elasticsearch-serverless/api/machine_learning/update_job.rb +10 -1
- data/lib/elasticsearch-serverless/api/machine_learning/update_trained_model_deployment.rb +16 -3
- data/lib/elasticsearch-serverless/api/mget.rb +17 -4
- data/lib/elasticsearch-serverless/api/msearch.rb +22 -10
- 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 +16 -4
- 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 +11 -2
- data/lib/elasticsearch-serverless/api/search_application/delete_behavioral_analytics.rb +10 -1
- data/lib/elasticsearch-serverless/api/search_application/get.rb +10 -2
- data/lib/elasticsearch-serverless/api/search_application/get_behavioral_analytics.rb +10 -2
- data/lib/elasticsearch-serverless/api/search_application/list.rb +3 -1
- data/lib/elasticsearch-serverless/api/search_application/put.rb +10 -2
- data/lib/elasticsearch-serverless/api/search_application/put_behavioral_analytics.rb +10 -2
- data/lib/elasticsearch-serverless/api/search_application/search.rb +12 -2
- 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/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/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 +37 -9
- data/lib/elasticsearch-serverless/api.rb +3 -3
- data/lib/elasticsearch-serverless/version.rb +1 -1
- data/lib/elasticsearch-serverless.rb +4 -3
- metadata +9 -86
- data/lib/elasticsearch-serverless/api/connector/last_sync.rb +0 -59
- data/lib/elasticsearch-serverless/api/esql/query.rb +0 -57
- data/lib/elasticsearch-serverless/api/indices/data_streams_stats.rb +0 -56
- data/lib/elasticsearch-serverless/api/indices/put_template.rb +0 -60
- data/lib/elasticsearch-serverless/api/machine_learning/infer_trained_model.rb +0 -63
- data/lib/elasticsearch-serverless/api/security/update_api_key.rb +0 -66
- data/lib/elasticsearch-serverless/api/tasks/get.rb +0 -57
@@ -22,16 +22,28 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module MachineLearning
|
24
24
|
module Actions
|
25
|
-
#
|
25
|
+
# Stop a trained model deployment.
|
26
26
|
#
|
27
27
|
# @option arguments [String] :model_id The unique identifier of the trained model. (*Required*)
|
28
|
-
# @option arguments [Boolean] :allow_no_match Specifies what to do when the request: contains wildcard expressions and there are no deployments that match;
|
29
|
-
#
|
28
|
+
# @option arguments [Boolean] :allow_no_match Specifies what to do when the request: contains wildcard expressions and there are no deployments that match;
|
29
|
+
# contains the +_all+ string or no identifiers and there are no matches; or contains wildcard expressions and
|
30
|
+
# there are only partial matches. By default, it returns an empty array when there are no matches and the subset of results when there are partial matches.
|
31
|
+
# If +false+, the request returns a 404 status code when there are no matches or only partial matches. Server default: true.
|
32
|
+
# @option arguments [Boolean] :force Forcefully stops the deployment, even if it is used by ingest pipelines. You can't use these pipelines until you
|
33
|
+
# restart the model deployment.
|
30
34
|
# @option arguments [Hash] :headers Custom HTTP headers
|
31
35
|
#
|
32
36
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/stop-trained-model-deployment.html
|
33
37
|
#
|
34
38
|
def stop_trained_model_deployment(arguments = {})
|
39
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.stop_trained_model_deployment" }
|
40
|
+
|
41
|
+
defined_params = [:model_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
|
+
|
35
47
|
raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id]
|
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
|
@@ -22,15 +22,25 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module MachineLearning
|
24
24
|
module Actions
|
25
|
-
#
|
25
|
+
# Update a data frame analytics job.
|
26
26
|
#
|
27
|
-
# @option arguments [String] :id Identifier for the data frame analytics job. This identifier can contain
|
27
|
+
# @option arguments [String] :id Identifier for the data frame analytics job. This identifier can contain
|
28
|
+
# lowercase alphanumeric characters (a-z and 0-9), hyphens, and
|
29
|
+
# underscores. It must start and end with alphanumeric characters. (*Required*)
|
28
30
|
# @option arguments [Hash] :headers Custom HTTP headers
|
29
31
|
# @option arguments [Hash] :body request body
|
30
32
|
#
|
31
33
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-dfanalytics.html
|
32
34
|
#
|
33
35
|
def update_data_frame_analytics(arguments = {})
|
36
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.update_data_frame_analytics" }
|
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
|
+
|
34
44
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
35
45
|
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
36
46
|
|
@@ -46,7 +56,7 @@ module ElasticsearchServerless
|
|
46
56
|
params = {}
|
47
57
|
|
48
58
|
ElasticsearchServerless::API::Response.new(
|
49
|
-
perform_request(method, path, params, body, headers)
|
59
|
+
perform_request(method, path, params, body, headers, request_opts)
|
50
60
|
)
|
51
61
|
end
|
52
62
|
end
|
@@ -22,15 +22,24 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module MachineLearning
|
24
24
|
module Actions
|
25
|
-
#
|
25
|
+
# Update a datafeed.
|
26
26
|
# You must stop and start the datafeed for the changes to be applied.
|
27
27
|
# When Elasticsearch security features are enabled, your datafeed remembers which roles the user who updated it had at
|
28
28
|
# the time of the update and runs the query using those same roles. If you provide secondary authorization headers,
|
29
29
|
# those credentials are used instead.
|
30
30
|
#
|
31
|
-
# @option arguments [String] :datafeed_id A numerical character string that uniquely identifies the datafeed.
|
32
|
-
#
|
33
|
-
#
|
31
|
+
# @option arguments [String] :datafeed_id A numerical character string that uniquely identifies the datafeed.
|
32
|
+
# This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.
|
33
|
+
# It must start and end with alphanumeric characters. (*Required*)
|
34
|
+
# @option arguments [Boolean] :allow_no_indices If +true+, wildcard indices expressions that resolve into no concrete indices are ignored. This includes the
|
35
|
+
# +_all+ string or when no indices are specified. Server default: true.
|
36
|
+
# @option arguments [String, Array<String>] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines
|
37
|
+
# whether wildcard expressions match hidden data streams. Supports comma-separated values. Valid values are:
|
38
|
+
# - +all+: Match any data stream or index, including hidden ones.
|
39
|
+
# - +closed+: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
|
40
|
+
# - +hidden+: Match hidden data streams and hidden indices. Must be combined with +open+, +closed+, or both.
|
41
|
+
# - +none+: Wildcard patterns are not accepted.
|
42
|
+
# - +open+: Match open, non-hidden indices. Also matches any non-hidden data stream. Server default: open.
|
34
43
|
# @option arguments [Boolean] :ignore_throttled If +true+, concrete, expanded or aliased indices are ignored when frozen. Server default: true.
|
35
44
|
# @option arguments [Boolean] :ignore_unavailable If +true+, unavailable indices (missing or closed) are ignored.
|
36
45
|
# @option arguments [Hash] :headers Custom HTTP headers
|
@@ -39,6 +48,14 @@ module ElasticsearchServerless
|
|
39
48
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html
|
40
49
|
#
|
41
50
|
def update_datafeed(arguments = {})
|
51
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.update_datafeed" }
|
52
|
+
|
53
|
+
defined_params = [:datafeed_id].inject({}) do |set_variables, variable|
|
54
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
55
|
+
set_variables
|
56
|
+
end
|
57
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
58
|
+
|
42
59
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
43
60
|
raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id]
|
44
61
|
|
@@ -54,7 +71,7 @@ module ElasticsearchServerless
|
|
54
71
|
params = Utils.process_params(arguments)
|
55
72
|
|
56
73
|
ElasticsearchServerless::API::Response.new(
|
57
|
-
perform_request(method, path, params, body, headers)
|
74
|
+
perform_request(method, path, params, body, headers, request_opts)
|
58
75
|
)
|
59
76
|
end
|
60
77
|
end
|
@@ -22,6 +22,7 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module MachineLearning
|
24
24
|
module Actions
|
25
|
+
# Update a filter.
|
25
26
|
# Updates the description of a filter, adds items, or removes items from the list.
|
26
27
|
#
|
27
28
|
# @option arguments [String] :filter_id A string that uniquely identifies a filter. (*Required*)
|
@@ -31,6 +32,14 @@ module ElasticsearchServerless
|
|
31
32
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-filter.html
|
32
33
|
#
|
33
34
|
def update_filter(arguments = {})
|
35
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.update_filter" }
|
36
|
+
|
37
|
+
defined_params = [:filter_id].inject({}) do |set_variables, variable|
|
38
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
39
|
+
set_variables
|
40
|
+
end
|
41
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
42
|
+
|
34
43
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
35
44
|
raise ArgumentError, "Required argument 'filter_id' missing" unless arguments[:filter_id]
|
36
45
|
|
@@ -46,7 +55,7 @@ module ElasticsearchServerless
|
|
46
55
|
params = {}
|
47
56
|
|
48
57
|
ElasticsearchServerless::API::Response.new(
|
49
|
-
perform_request(method, path, params, body, headers)
|
58
|
+
perform_request(method, path, params, body, headers, request_opts)
|
50
59
|
)
|
51
60
|
end
|
52
61
|
end
|
@@ -22,6 +22,7 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module MachineLearning
|
24
24
|
module Actions
|
25
|
+
# Update an anomaly detection job.
|
25
26
|
# Updates certain properties of an anomaly detection job.
|
26
27
|
#
|
27
28
|
# @option arguments [String] :job_id Identifier for the job. (*Required*)
|
@@ -31,6 +32,14 @@ module ElasticsearchServerless
|
|
31
32
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html
|
32
33
|
#
|
33
34
|
def update_job(arguments = {})
|
35
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.update_job" }
|
36
|
+
|
37
|
+
defined_params = [:job_id].inject({}) do |set_variables, variable|
|
38
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
39
|
+
set_variables
|
40
|
+
end
|
41
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
42
|
+
|
34
43
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
35
44
|
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
|
36
45
|
|
@@ -46,7 +55,7 @@ module ElasticsearchServerless
|
|
46
55
|
params = {}
|
47
56
|
|
48
57
|
ElasticsearchServerless::API::Response.new(
|
49
|
-
perform_request(method, path, params, body, headers)
|
58
|
+
perform_request(method, path, params, body, headers, request_opts)
|
50
59
|
)
|
51
60
|
end
|
52
61
|
end
|
@@ -22,16 +22,29 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module MachineLearning
|
24
24
|
module Actions
|
25
|
-
#
|
25
|
+
# Update a trained model deployment.
|
26
26
|
#
|
27
27
|
# @option arguments [String] :model_id The unique identifier of the trained model. Currently, only PyTorch models are supported. (*Required*)
|
28
|
-
# @option arguments [Integer] :number_of_allocations The number of model allocations on each node where the model is deployed.
|
28
|
+
# @option arguments [Integer] :number_of_allocations The number of model allocations on each node where the model is deployed.
|
29
|
+
# All allocations on a node share the same copy of the model in memory but use
|
30
|
+
# a separate set of threads to evaluate the model.
|
31
|
+
# Increasing this value generally increases the throughput.
|
32
|
+
# If this setting is greater than the number of hardware threads
|
33
|
+
# it will automatically be changed to a value less than the number of hardware threads. Server default: 1.
|
29
34
|
# @option arguments [Hash] :headers Custom HTTP headers
|
30
35
|
# @option arguments [Hash] :body request body
|
31
36
|
#
|
32
37
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-trained-model-deployment.html
|
33
38
|
#
|
34
39
|
def update_trained_model_deployment(arguments = {})
|
40
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.update_trained_model_deployment" }
|
41
|
+
|
42
|
+
defined_params = [:model_id].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
|
+
|
35
48
|
raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id]
|
36
49
|
|
37
50
|
arguments = arguments.clone
|
@@ -46,7 +59,7 @@ module ElasticsearchServerless
|
|
46
59
|
params = Utils.process_params(arguments)
|
47
60
|
|
48
61
|
ElasticsearchServerless::API::Response.new(
|
49
|
-
perform_request(method, path, params, body, headers)
|
62
|
+
perform_request(method, path, params, body, headers, request_opts)
|
50
63
|
)
|
51
64
|
end
|
52
65
|
end
|
@@ -24,14 +24,19 @@ module ElasticsearchServerless
|
|
24
24
|
# Allows to get multiple documents in one request.
|
25
25
|
#
|
26
26
|
# @option arguments [String] :index Name of the index to retrieve documents from when +ids+ are specified, or when a document in the +docs+ array does not specify an index.
|
27
|
-
# @option arguments [Boolean] :force_synthetic_source Should this request force synthetic _source?
|
27
|
+
# @option arguments [Boolean] :force_synthetic_source Should this request force synthetic _source?
|
28
|
+
# Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance.
|
29
|
+
# Fetches with this enabled will be slower the enabling synthetic source natively in the index.
|
28
30
|
# @option arguments [String] :preference Specifies the node or shard the operation should be performed on. Random by default.
|
29
31
|
# @option arguments [Boolean] :realtime If +true+, the request is real-time as opposed to near-real-time. Server default: true.
|
30
32
|
# @option arguments [Boolean] :refresh If +true+, the request refreshes relevant shards before retrieving documents.
|
31
33
|
# @option arguments [String] :routing Custom value used to route operations to a specific shard.
|
32
34
|
# @option arguments [Boolean, String, Array<String>] :_source True or false to return the +_source+ field or not, or a list of fields to return.
|
33
|
-
# @option arguments [String, Array<String>] :_source_excludes A comma-separated list of source fields to exclude from the response.
|
34
|
-
#
|
35
|
+
# @option arguments [String, Array<String>] :_source_excludes A comma-separated list of source fields to exclude from the response.
|
36
|
+
# You can also use this parameter to exclude fields from the subset specified in +_source_includes+ query parameter.
|
37
|
+
# @option arguments [String, Array<String>] :_source_includes A comma-separated list of source fields to include in the response.
|
38
|
+
# If this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the +_source_excludes+ query parameter.
|
39
|
+
# If the +_source+ parameter is +false+, this parameter is ignored.
|
35
40
|
# @option arguments [String, Array<String>] :stored_fields If +true+, retrieves the document fields stored in the index rather than the document +_source+. Server default: false.
|
36
41
|
# @option arguments [Hash] :headers Custom HTTP headers
|
37
42
|
# @option arguments [Hash] :body request body
|
@@ -39,6 +44,14 @@ module ElasticsearchServerless
|
|
39
44
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html
|
40
45
|
#
|
41
46
|
def mget(arguments = {})
|
47
|
+
request_opts = { endpoint: arguments[:endpoint] || "mget" }
|
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
|
+
|
42
55
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
43
56
|
|
44
57
|
arguments = arguments.clone
|
@@ -57,7 +70,7 @@ module ElasticsearchServerless
|
|
57
70
|
params = Utils.process_params(arguments)
|
58
71
|
|
59
72
|
ElasticsearchServerless::API::Response.new(
|
60
|
-
perform_request(method, path, params, body, headers)
|
73
|
+
perform_request(method, path, params, body, headers, request_opts)
|
61
74
|
)
|
62
75
|
end
|
63
76
|
end
|
@@ -29,6 +29,12 @@ module ElasticsearchServerless
|
|
29
29
|
# @option arguments [String, Array<String>] :expand_wildcards Type of index that wildcard expressions can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
|
30
30
|
# @option arguments [Boolean] :ignore_throttled If true, concrete, expanded or aliased indices are ignored when frozen.
|
31
31
|
# @option arguments [Boolean] :ignore_unavailable If true, missing or closed indices are not included in the response.
|
32
|
+
# @option arguments [Boolean] :include_named_queries_score Indicates whether hit.matched_queries should be rendered as a map that includes
|
33
|
+
# the name of the matched query associated with its score (true)
|
34
|
+
# or as an array containing the name of the matched queries (false)
|
35
|
+
# This functionality reruns each named query on every hit in a search response.
|
36
|
+
# Typically, this adds a small overhead to a request.
|
37
|
+
# However, using computationally expensive named queries on a large number of hits may add significant overhead.
|
32
38
|
# @option arguments [Integer] :max_concurrent_searches Maximum number of concurrent searches the multi search API can execute.
|
33
39
|
# @option arguments [Integer] :max_concurrent_shard_requests Maximum number of concurrent shard requests that each sub-search request executes per node. Server default: 5.
|
34
40
|
# @option arguments [Integer] :pre_filter_shard_size Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method i.e., if date filters are mandatory to match but the shard bounds and the query are disjoint.
|
@@ -42,6 +48,14 @@ module ElasticsearchServerless
|
|
42
48
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html
|
43
49
|
#
|
44
50
|
def msearch(arguments = {})
|
51
|
+
request_opts = { endpoint: arguments[:endpoint] || "msearch" }
|
52
|
+
|
53
|
+
defined_params = [:index].inject({}) do |set_variables, variable|
|
54
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
55
|
+
set_variables
|
56
|
+
end
|
57
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
58
|
+
|
45
59
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
46
60
|
|
47
61
|
arguments = arguments.clone
|
@@ -61,16 +75,14 @@ module ElasticsearchServerless
|
|
61
75
|
|
62
76
|
case
|
63
77
|
when body.is_a?(Array) && body.any? { |d| d.has_key? :search }
|
64
|
-
payload = body
|
65
|
-
|
66
|
-
|
67
|
-
data = meta.delete(:search)
|
78
|
+
payload = body.inject([]) do |sum, item|
|
79
|
+
meta = item
|
80
|
+
data = meta.delete(:search)
|
68
81
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
.map { |item| ElasticsearchServerless::API.serializer.dump(item) }
|
82
|
+
sum << meta
|
83
|
+
sum << data
|
84
|
+
sum
|
85
|
+
end.map { |item| ElasticsearchServerless::API.serializer.dump(item) }
|
74
86
|
payload << "" unless payload.empty?
|
75
87
|
payload = payload.join("\n")
|
76
88
|
when body.is_a?(Array)
|
@@ -83,7 +95,7 @@ module ElasticsearchServerless
|
|
83
95
|
|
84
96
|
headers.merge!("Content-Type" => "application/x-ndjson")
|
85
97
|
ElasticsearchServerless::API::Response.new(
|
86
|
-
perform_request(method, path, params, payload, headers)
|
98
|
+
perform_request(method, path, params, payload, headers, request_opts)
|
87
99
|
)
|
88
100
|
end
|
89
101
|
end
|
@@ -23,11 +23,15 @@ module ElasticsearchServerless
|
|
23
23
|
module Actions
|
24
24
|
# Runs multiple templated searches with a single request.
|
25
25
|
#
|
26
|
-
# @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases to search.
|
26
|
+
# @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases to search.
|
27
|
+
# Supports wildcards (+*+).
|
28
|
+
# To search all data streams and indices, omit this parameter or use +*+.
|
27
29
|
# @option arguments [Boolean] :ccs_minimize_roundtrips If +true+, network round-trips are minimized for cross-cluster search requests. Server default: true.
|
28
30
|
# @option arguments [Integer] :max_concurrent_searches Maximum number of concurrent searches the API can run.
|
29
|
-
# @option arguments [String] :search_type The type of the search operation.
|
30
|
-
#
|
31
|
+
# @option arguments [String] :search_type The type of the search operation.
|
32
|
+
# Available options: +query_then_fetch+, +dfs_query_then_fetch+.
|
33
|
+
# @option arguments [Boolean] :rest_total_hits_as_int If +true+, the response returns +hits.total+ as an integer.
|
34
|
+
# If +false+, it returns +hits.total+ as an object.
|
31
35
|
# @option arguments [Boolean] :typed_keys If +true+, the response prefixes aggregation and suggester names with their respective types.
|
32
36
|
# @option arguments [Hash] :headers Custom HTTP headers
|
33
37
|
# @option arguments [Hash] :body search_templates
|
@@ -35,6 +39,14 @@ module ElasticsearchServerless
|
|
35
39
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html
|
36
40
|
#
|
37
41
|
def msearch_template(arguments = {})
|
42
|
+
request_opts = { endpoint: arguments[:endpoint] || "msearch_template" }
|
43
|
+
|
44
|
+
defined_params = [:index].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
|
+
|
38
50
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
39
51
|
|
40
52
|
arguments = arguments.clone
|
@@ -64,7 +76,7 @@ module ElasticsearchServerless
|
|
64
76
|
|
65
77
|
headers.merge!("Content-Type" => "application/x-ndjson")
|
66
78
|
ElasticsearchServerless::API::Response.new(
|
67
|
-
perform_request(method, path, params, payload, headers)
|
79
|
+
perform_request(method, path, params, payload, headers, request_opts)
|
68
80
|
)
|
69
81
|
end
|
70
82
|
end
|
@@ -25,12 +25,14 @@ module ElasticsearchServerless
|
|
25
25
|
#
|
26
26
|
# @option arguments [String] :index Name of the index that contains the documents.
|
27
27
|
# @option arguments [Array<String>] :ids A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body
|
28
|
-
# @option arguments [String, Array<String>] :fields Comma-separated list or wildcard expressions of fields to include in the statistics.
|
28
|
+
# @option arguments [String, Array<String>] :fields Comma-separated list or wildcard expressions of fields to include in the statistics.
|
29
|
+
# Used as the default list unless a specific field list is provided in the +completion_fields+ or +fielddata_fields+ parameters.
|
29
30
|
# @option arguments [Boolean] :field_statistics If +true+, the response includes the document count, sum of document frequencies, and sum of total term frequencies. Server default: true.
|
30
31
|
# @option arguments [Boolean] :offsets If +true+, the response includes term offsets. Server default: true.
|
31
32
|
# @option arguments [Boolean] :payloads If +true+, the response includes term payloads. Server default: true.
|
32
33
|
# @option arguments [Boolean] :positions If +true+, the response includes term positions. Server default: true.
|
33
|
-
# @option arguments [String] :preference Specifies the node or shard the operation should be performed on.
|
34
|
+
# @option arguments [String] :preference Specifies the node or shard the operation should be performed on.
|
35
|
+
# Random by default.
|
34
36
|
# @option arguments [Boolean] :realtime If true, the request is real-time as opposed to near-real-time. Server default: true.
|
35
37
|
# @option arguments [String] :routing Custom value used to route operations to a specific shard.
|
36
38
|
# @option arguments [Boolean] :term_statistics If true, the response includes term frequency and document frequency.
|
@@ -42,14 +44,18 @@ module ElasticsearchServerless
|
|
42
44
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html
|
43
45
|
#
|
44
46
|
def mtermvectors(arguments = {})
|
47
|
+
request_opts = { endpoint: arguments[:endpoint] || "mtermvectors" }
|
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
|
+
|
45
55
|
arguments = arguments.clone
|
46
56
|
headers = arguments.delete(:headers) || {}
|
47
57
|
|
48
|
-
body =
|
49
|
-
{ :ids => ids }
|
50
|
-
else
|
51
|
-
arguments.delete(:body)
|
52
|
-
end
|
58
|
+
body = arguments.delete(:body)
|
53
59
|
|
54
60
|
_index = arguments.delete(:index)
|
55
61
|
|
@@ -67,7 +73,7 @@ module ElasticsearchServerless
|
|
67
73
|
params = Utils.process_params(arguments)
|
68
74
|
|
69
75
|
ElasticsearchServerless::API::Response.new(
|
70
|
-
perform_request(method, path, params, body, headers)
|
76
|
+
perform_request(method, path, params, body, headers, request_opts)
|
71
77
|
)
|
72
78
|
end
|
73
79
|
end
|
@@ -31,20 +31,32 @@ module ElasticsearchServerless
|
|
31
31
|
# @option arguments [String, Array] :index A comma-separated list of index names to open point in time; use +_all+ or empty string to perform the operation on all indices (*Required*)
|
32
32
|
# @option arguments [Time] :keep_alive Extends the time to live of the corresponding point in time. (*Required*)
|
33
33
|
# @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index.
|
34
|
-
# @option arguments [String] :preference Specifies the node or shard the operation should be performed on.
|
34
|
+
# @option arguments [String] :preference Specifies the node or shard the operation should be performed on.
|
35
|
+
# Random by default.
|
35
36
|
# @option arguments [String] :routing Custom value used to route operations to a specific shard.
|
36
|
-
# @option arguments [String, Array<String>] :expand_wildcards Type of index that wildcard patterns can match.
|
37
|
+
# @option arguments [String, Array<String>] :expand_wildcards Type of index that wildcard patterns can match.
|
38
|
+
# If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
|
39
|
+
# Supports comma-separated values, such as +open,hidden+. Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open.
|
37
40
|
# @option arguments [Hash] :headers Custom HTTP headers
|
41
|
+
# @option arguments [Hash] :body request body
|
38
42
|
#
|
39
43
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html
|
40
44
|
#
|
41
45
|
def open_point_in_time(arguments = {})
|
46
|
+
request_opts = { endpoint: arguments[:endpoint] || "open_point_in_time" }
|
47
|
+
|
48
|
+
defined_params = [:index].inject({}) do |set_variables, variable|
|
49
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
50
|
+
set_variables
|
51
|
+
end
|
52
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
53
|
+
|
42
54
|
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
43
55
|
|
44
56
|
arguments = arguments.clone
|
45
57
|
headers = arguments.delete(:headers) || {}
|
46
58
|
|
47
|
-
body =
|
59
|
+
body = arguments.delete(:body)
|
48
60
|
|
49
61
|
_index = arguments.delete(:index)
|
50
62
|
|
@@ -53,7 +65,7 @@ module ElasticsearchServerless
|
|
53
65
|
params = Utils.process_params(arguments)
|
54
66
|
|
55
67
|
ElasticsearchServerless::API::Response.new(
|
56
|
-
perform_request(method, path, params, body, headers)
|
68
|
+
perform_request(method, path, params, body, headers, request_opts)
|
57
69
|
)
|
58
70
|
end
|
59
71
|
end
|
@@ -21,6 +21,7 @@
|
|
21
21
|
module ElasticsearchServerless
|
22
22
|
module API
|
23
23
|
module Actions
|
24
|
+
# Ping the cluster.
|
24
25
|
# Returns whether the cluster is running.
|
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 ping(arguments = {})
|
32
|
+
request_opts = { endpoint: arguments[:endpoint] || "ping" }
|
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
|
begin
|
41
|
-
perform_request(method, path, params, body, headers).status == 200 ? true : false
|
44
|
+
perform_request(method, path, params, body, headers, request_opts).status == 200 ? true : false
|
42
45
|
rescue Exception => e
|
43
46
|
if e.class.to_s =~ /NotFound|ConnectionFailed/ || e.message =~ /Not *Found|404|ConnectionFailed/i
|
44
47
|
false
|
@@ -21,18 +21,31 @@
|
|
21
21
|
module ElasticsearchServerless
|
22
22
|
module API
|
23
23
|
module Actions
|
24
|
+
# Create or update a script or search template.
|
24
25
|
# Creates or updates a stored script or search template.
|
25
26
|
#
|
26
|
-
# @option arguments [String] :id Identifier for the stored script or search template.
|
27
|
-
#
|
28
|
-
# @option arguments [
|
29
|
-
#
|
27
|
+
# @option arguments [String] :id Identifier for the stored script or search template.
|
28
|
+
# Must be unique within the cluster. (*Required*)
|
29
|
+
# @option arguments [String] :context Context in which the script or search template should run.
|
30
|
+
# To prevent errors, the API immediately compiles the script or template in this context.
|
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.
|
33
|
+
# @option arguments [Time] :timeout Period to wait for a response.
|
34
|
+
# If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
30
35
|
# @option arguments [Hash] :headers Custom HTTP headers
|
31
36
|
# @option arguments [Hash] :body request body
|
32
37
|
#
|
33
38
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
|
34
39
|
#
|
35
40
|
def put_script(arguments = {})
|
41
|
+
request_opts = { endpoint: arguments[:endpoint] || "put_script" }
|
42
|
+
|
43
|
+
defined_params = [:id, :context].inject({}) do |set_variables, variable|
|
44
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
45
|
+
set_variables
|
46
|
+
end
|
47
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
48
|
+
|
36
49
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
37
50
|
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
38
51
|
|
@@ -54,7 +67,7 @@ module ElasticsearchServerless
|
|
54
67
|
params = Utils.process_params(arguments)
|
55
68
|
|
56
69
|
ElasticsearchServerless::API::Response.new(
|
57
|
-
perform_request(method, path, params, body, headers)
|
70
|
+
perform_request(method, path, params, body, headers, request_opts)
|
58
71
|
)
|
59
72
|
end
|
60
73
|
end
|
@@ -31,6 +31,14 @@ module ElasticsearchServerless
|
|
31
31
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-query-rule.html
|
32
32
|
#
|
33
33
|
def delete_rule(arguments = {})
|
34
|
+
request_opts = { endpoint: arguments[:endpoint] || "query_rules.delete_rule" }
|
35
|
+
|
36
|
+
defined_params = [:ruleset_id, :rule_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 'ruleset_id' missing" unless arguments[:ruleset_id]
|
35
43
|
raise ArgumentError, "Required argument 'rule_id' missing" unless arguments[:rule_id]
|
36
44
|
|
@@ -48,7 +56,7 @@ module ElasticsearchServerless
|
|
48
56
|
params = {}
|
49
57
|
|
50
58
|
ElasticsearchServerless::API::Response.new(
|
51
|
-
perform_request(method, path, params, body, headers)
|
59
|
+
perform_request(method, path, params, body, headers, request_opts)
|
52
60
|
)
|
53
61
|
end
|
54
62
|
end
|
@@ -30,6 +30,14 @@ module ElasticsearchServerless
|
|
30
30
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-query-ruleset.html
|
31
31
|
#
|
32
32
|
def delete_ruleset(arguments = {})
|
33
|
+
request_opts = { endpoint: arguments[:endpoint] || "query_rules.delete_ruleset" }
|
34
|
+
|
35
|
+
defined_params = [:ruleset_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 'ruleset_id' missing" unless arguments[:ruleset_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
|
@@ -31,6 +31,14 @@ module ElasticsearchServerless
|
|
31
31
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-query-rule.html
|
32
32
|
#
|
33
33
|
def get_rule(arguments = {})
|
34
|
+
request_opts = { endpoint: arguments[:endpoint] || "query_rules.get_rule" }
|
35
|
+
|
36
|
+
defined_params = [:ruleset_id, :rule_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 'ruleset_id' missing" unless arguments[:ruleset_id]
|
35
43
|
raise ArgumentError, "Required argument 'rule_id' missing" unless arguments[:rule_id]
|
36
44
|
|
@@ -48,7 +56,7 @@ module ElasticsearchServerless
|
|
48
56
|
params = {}
|
49
57
|
|
50
58
|
ElasticsearchServerless::API::Response.new(
|
51
|
-
perform_request(method, path, params, body, headers)
|
59
|
+
perform_request(method, path, params, body, headers, request_opts)
|
52
60
|
)
|
53
61
|
end
|
54
62
|
end
|