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,7 +22,7 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module MachineLearning
|
24
24
|
module Actions
|
25
|
-
#
|
25
|
+
# Create a datafeed.
|
26
26
|
# Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job.
|
27
27
|
# You can associate only one datafeed with each anomaly detection job.
|
28
28
|
# The datafeed contains a query that runs at a defined interval (+frequency+).
|
@@ -31,11 +31,15 @@ module ElasticsearchServerless
|
|
31
31
|
# at the time of creation and runs the query using those same roles. If you provide secondary authorization headers,
|
32
32
|
# those credentials are used instead.
|
33
33
|
# You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed
|
34
|
-
# directly to the
|
34
|
+
# directly to the+.ml-config+index. Do not give users+write+privileges on the+.ml-config` index.
|
35
35
|
#
|
36
|
-
# @option arguments [String] :datafeed_id A numerical character string that uniquely identifies the datafeed.
|
37
|
-
#
|
38
|
-
#
|
36
|
+
# @option arguments [String] :datafeed_id A numerical character string that uniquely identifies the datafeed.
|
37
|
+
# This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.
|
38
|
+
# It must start and end with alphanumeric characters. (*Required*)
|
39
|
+
# @option arguments [Boolean] :allow_no_indices If true, wildcard indices expressions that resolve into no concrete indices are ignored. This includes the +_all+
|
40
|
+
# string or when no indices are specified. Server default: true.
|
41
|
+
# @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
|
42
|
+
# whether wildcard expressions match hidden data streams. Supports comma-separated values. Server default: open.
|
39
43
|
# @option arguments [Boolean] :ignore_throttled If true, concrete, expanded, or aliased indices are ignored when frozen. Server default: true.
|
40
44
|
# @option arguments [Boolean] :ignore_unavailable If true, unavailable indices (missing or closed) are ignored.
|
41
45
|
# @option arguments [Hash] :headers Custom HTTP headers
|
@@ -44,6 +48,14 @@ module ElasticsearchServerless
|
|
44
48
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html
|
45
49
|
#
|
46
50
|
def put_datafeed(arguments = {})
|
51
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.put_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
|
+
|
47
59
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
48
60
|
raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id]
|
49
61
|
|
@@ -59,7 +71,7 @@ module ElasticsearchServerless
|
|
59
71
|
params = Utils.process_params(arguments)
|
60
72
|
|
61
73
|
ElasticsearchServerless::API::Response.new(
|
62
|
-
perform_request(method, path, params, body, headers)
|
74
|
+
perform_request(method, path, params, body, headers, request_opts)
|
63
75
|
)
|
64
76
|
end
|
65
77
|
end
|
@@ -22,7 +22,7 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module MachineLearning
|
24
24
|
module Actions
|
25
|
-
#
|
25
|
+
# Create a filter.
|
26
26
|
# A filter contains a list of strings. It can be used by one or more anomaly detection jobs.
|
27
27
|
# Specifically, filters are referenced in the +custom_rules+ property of detector configuration objects.
|
28
28
|
#
|
@@ -33,6 +33,14 @@ module ElasticsearchServerless
|
|
33
33
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-filter.html
|
34
34
|
#
|
35
35
|
def put_filter(arguments = {})
|
36
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.put_filter" }
|
37
|
+
|
38
|
+
defined_params = [:filter_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
|
+
|
36
44
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
37
45
|
raise ArgumentError, "Required argument 'filter_id' missing" unless arguments[:filter_id]
|
38
46
|
|
@@ -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
|
@@ -22,7 +22,8 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module MachineLearning
|
24
24
|
module Actions
|
25
|
-
#
|
25
|
+
# Create an anomaly detection job.
|
26
|
+
# If you include a +datafeed_config+, you must have read index privileges on the source index.
|
26
27
|
#
|
27
28
|
# @option arguments [String] :job_id The identifier for the anomaly detection job. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. (*Required*)
|
28
29
|
# @option arguments [Hash] :headers Custom HTTP headers
|
@@ -31,6 +32,14 @@ module ElasticsearchServerless
|
|
31
32
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html
|
32
33
|
#
|
33
34
|
def put_job(arguments = {})
|
35
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.put_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,17 +22,29 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module MachineLearning
|
24
24
|
module Actions
|
25
|
-
#
|
25
|
+
# Create a trained model.
|
26
|
+
# Enable you to supply a trained model that is not created by data frame analytics.
|
26
27
|
#
|
27
28
|
# @option arguments [String] :model_id The unique identifier of the trained model. (*Required*)
|
28
|
-
# @option arguments [Boolean] :defer_definition_decompression If set to +true+ and a +compressed_definition+ is provided,
|
29
|
-
#
|
29
|
+
# @option arguments [Boolean] :defer_definition_decompression If set to +true+ and a +compressed_definition+ is provided,
|
30
|
+
# the request defers definition decompression and skips relevant
|
31
|
+
# validations.
|
32
|
+
# @option arguments [Boolean] :wait_for_completion Whether to wait for all child operations (e.g. model download)
|
33
|
+
# to complete.
|
30
34
|
# @option arguments [Hash] :headers Custom HTTP headers
|
31
35
|
# @option arguments [Hash] :body request body
|
32
36
|
#
|
33
37
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models.html
|
34
38
|
#
|
35
39
|
def put_trained_model(arguments = {})
|
40
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.put_trained_model" }
|
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
|
+
|
36
48
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
37
49
|
raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id]
|
38
50
|
|
@@ -48,7 +60,7 @@ module ElasticsearchServerless
|
|
48
60
|
params = Utils.process_params(arguments)
|
49
61
|
|
50
62
|
ElasticsearchServerless::API::Response.new(
|
51
|
-
perform_request(method, path, params, body, headers)
|
63
|
+
perform_request(method, path, params, body, headers, request_opts)
|
52
64
|
)
|
53
65
|
end
|
54
66
|
end
|
@@ -22,8 +22,9 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module MachineLearning
|
24
24
|
module Actions
|
25
|
-
#
|
26
|
-
# name used to reference a single trained
|
25
|
+
# Create or update a trained model alias.
|
26
|
+
# A trained model alias is a logical name used to reference a single trained
|
27
|
+
# model.
|
27
28
|
# You can use aliases instead of trained model identifiers to make it easier to
|
28
29
|
# reference your models. For example, you can use aliases in inference
|
29
30
|
# aggregations and processors.
|
@@ -41,12 +42,22 @@ module ElasticsearchServerless
|
|
41
42
|
#
|
42
43
|
# @option arguments [String] :model_alias The alias to create or update. This value cannot end in numbers. (*Required*)
|
43
44
|
# @option arguments [String] :model_id The identifier for the trained model that the alias refers to. (*Required*)
|
44
|
-
# @option arguments [Boolean] :reassign Specifies whether the alias gets reassigned to the specified trained
|
45
|
+
# @option arguments [Boolean] :reassign Specifies whether the alias gets reassigned to the specified trained
|
46
|
+
# model if it is already assigned to a different model. If the alias is
|
47
|
+
# already assigned and this parameter is false, the API returns an error.
|
45
48
|
# @option arguments [Hash] :headers Custom HTTP headers
|
46
49
|
#
|
47
50
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models-aliases.html
|
48
51
|
#
|
49
52
|
def put_trained_model_alias(arguments = {})
|
53
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.put_trained_model_alias" }
|
54
|
+
|
55
|
+
defined_params = [:model_id, :model_alias].inject({}) do |set_variables, variable|
|
56
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
57
|
+
set_variables
|
58
|
+
end
|
59
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
60
|
+
|
50
61
|
raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id]
|
51
62
|
raise ArgumentError, "Required argument 'model_alias' missing" unless arguments[:model_alias]
|
52
63
|
|
@@ -64,7 +75,7 @@ module ElasticsearchServerless
|
|
64
75
|
params = Utils.process_params(arguments)
|
65
76
|
|
66
77
|
ElasticsearchServerless::API::Response.new(
|
67
|
-
perform_request(method, path, params, body, headers)
|
78
|
+
perform_request(method, path, params, body, headers, request_opts)
|
68
79
|
)
|
69
80
|
end
|
70
81
|
end
|
@@ -22,16 +22,25 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module MachineLearning
|
24
24
|
module Actions
|
25
|
-
#
|
25
|
+
# Create part of a trained model definition.
|
26
26
|
#
|
27
27
|
# @option arguments [String] :model_id The unique identifier of the trained model. (*Required*)
|
28
|
-
# @option arguments [Integer] :part The definition part number. When the definition is loaded for inference the definition parts are streamed in the
|
28
|
+
# @option arguments [Integer] :part The definition part number. When the definition is loaded for inference the definition parts are streamed in the
|
29
|
+
# order of their part number. The first part must be +0+ and the final part must be +total_parts - 1+. (*Required*)
|
29
30
|
# @option arguments [Hash] :headers Custom HTTP headers
|
30
31
|
# @option arguments [Hash] :body request body
|
31
32
|
#
|
32
33
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-definition-part.html
|
33
34
|
#
|
34
35
|
def put_trained_model_definition_part(arguments = {})
|
36
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.put_trained_model_definition_part" }
|
37
|
+
|
38
|
+
defined_params = [:model_id, :part].inject({}) do |set_variables, variable|
|
39
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
40
|
+
set_variables
|
41
|
+
end
|
42
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
43
|
+
|
35
44
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
36
45
|
raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id]
|
37
46
|
raise ArgumentError, "Required argument 'part' missing" unless arguments[:part]
|
@@ -50,7 +59,7 @@ module ElasticsearchServerless
|
|
50
59
|
params = {}
|
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,7 +22,7 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module MachineLearning
|
24
24
|
module Actions
|
25
|
-
#
|
25
|
+
# Create a trained model vocabulary.
|
26
26
|
# This API is supported only for natural language processing (NLP) models.
|
27
27
|
# The vocabulary is stored in the index as described in +inference_config.*.vocabulary+ of the trained model definition.
|
28
28
|
#
|
@@ -33,6 +33,14 @@ module ElasticsearchServerless
|
|
33
33
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-vocabulary.html
|
34
34
|
#
|
35
35
|
def put_trained_model_vocabulary(arguments = {})
|
36
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.put_trained_model_vocabulary" }
|
37
|
+
|
38
|
+
defined_params = [:model_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
|
+
|
36
44
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
37
45
|
raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id]
|
38
46
|
|
@@ -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
|
@@ -22,20 +22,31 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module MachineLearning
|
24
24
|
module Actions
|
25
|
-
#
|
25
|
+
# Reset an anomaly detection job.
|
26
26
|
# All model state and results are deleted. The job is ready to start over as if
|
27
27
|
# it had just been created.
|
28
28
|
# It is not currently possible to reset multiple jobs using wildcards or a
|
29
29
|
# comma separated list.
|
30
30
|
#
|
31
31
|
# @option arguments [String] :job_id The ID of the job to reset. (*Required*)
|
32
|
-
# @option arguments [Boolean] :wait_for_completion Should this request wait until the operation has completed before
|
33
|
-
#
|
32
|
+
# @option arguments [Boolean] :wait_for_completion Should this request wait until the operation has completed before
|
33
|
+
# returning. Server default: true.
|
34
|
+
# @option arguments [Boolean] :delete_user_annotations Specifies whether annotations that have been added by the
|
35
|
+
# user should be deleted along with any auto-generated annotations when the job is
|
36
|
+
# reset.
|
34
37
|
# @option arguments [Hash] :headers Custom HTTP headers
|
35
38
|
#
|
36
39
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-reset-job.html
|
37
40
|
#
|
38
41
|
def reset_job(arguments = {})
|
42
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.reset_job" }
|
43
|
+
|
44
|
+
defined_params = [:job_id].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 'job_id' missing" unless arguments[:job_id]
|
40
51
|
|
41
52
|
arguments = arguments.clone
|
@@ -50,7 +61,7 @@ module ElasticsearchServerless
|
|
50
61
|
params = Utils.process_params(arguments)
|
51
62
|
|
52
63
|
ElasticsearchServerless::API::Response.new(
|
53
|
-
perform_request(method, path, params, body, headers)
|
64
|
+
perform_request(method, path, params, body, headers, request_opts)
|
54
65
|
)
|
55
66
|
end
|
56
67
|
end
|
@@ -22,7 +22,7 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module MachineLearning
|
24
24
|
module Actions
|
25
|
-
#
|
25
|
+
# Start a data frame analytics job.
|
26
26
|
# A data frame analytics job can be started and stopped multiple times
|
27
27
|
# throughout its lifecycle.
|
28
28
|
# If the destination index does not exist, it is created automatically the
|
@@ -35,13 +35,24 @@ module ElasticsearchServerless
|
|
35
35
|
# If the destination index exists, it is used as is. You can therefore set up
|
36
36
|
# the destination index in advance with custom settings and mappings.
|
37
37
|
#
|
38
|
-
# @option arguments [String] :id Identifier for the data frame analytics job. This identifier can contain
|
39
|
-
#
|
38
|
+
# @option arguments [String] :id Identifier for the data frame analytics job. This identifier can contain
|
39
|
+
# lowercase alphanumeric characters (a-z and 0-9), hyphens, and
|
40
|
+
# underscores. It must start and end with alphanumeric characters. (*Required*)
|
41
|
+
# @option arguments [Time] :timeout Controls the amount of time to wait until the data frame analytics job
|
42
|
+
# starts. Server default: 20s.
|
40
43
|
# @option arguments [Hash] :headers Custom HTTP headers
|
41
44
|
#
|
42
45
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-dfanalytics.html
|
43
46
|
#
|
44
47
|
def start_data_frame_analytics(arguments = {})
|
48
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.start_data_frame_analytics" }
|
49
|
+
|
50
|
+
defined_params = [:id].inject({}) do |set_variables, variable|
|
51
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
52
|
+
set_variables
|
53
|
+
end
|
54
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
55
|
+
|
45
56
|
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
46
57
|
|
47
58
|
arguments = arguments.clone
|
@@ -56,7 +67,7 @@ module ElasticsearchServerless
|
|
56
67
|
params = Utils.process_params(arguments)
|
57
68
|
|
58
69
|
ElasticsearchServerless::API::Response.new(
|
59
|
-
perform_request(method, path, params, body, headers)
|
70
|
+
perform_request(method, path, params, body, headers, request_opts)
|
60
71
|
)
|
61
72
|
end
|
62
73
|
end
|
@@ -22,23 +22,34 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module MachineLearning
|
24
24
|
module Actions
|
25
|
-
#
|
26
|
-
#
|
25
|
+
# Start datafeeds.
|
27
26
|
# A datafeed must be started in order to retrieve data from Elasticsearch. A datafeed can be started and stopped
|
28
27
|
# multiple times throughout its lifecycle.
|
29
|
-
#
|
30
28
|
# Before you can start a datafeed, the anomaly detection job must be open. Otherwise, an error occurs.
|
31
|
-
#
|
32
29
|
# If you restart a stopped datafeed, it continues processing input data from the next millisecond after it was stopped.
|
33
30
|
# If new data was indexed for that exact millisecond between stopping and starting, it will be ignored.
|
34
|
-
#
|
35
31
|
# When Elasticsearch security features are enabled, your datafeed remembers which roles the last user to create or
|
36
32
|
# update it had at the time of creation or update and runs the query using those same roles. If you provided secondary
|
37
33
|
# authorization headers when you created or updated the datafeed, those credentials are used instead.
|
38
34
|
#
|
39
|
-
# @option arguments [String] :datafeed_id A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase
|
40
|
-
#
|
41
|
-
#
|
35
|
+
# @option arguments [String] :datafeed_id A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase
|
36
|
+
# alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric
|
37
|
+
# characters. (*Required*)
|
38
|
+
# @option arguments [String, Time] :end The time that the datafeed should end, which can be specified by using one of the following formats:
|
39
|
+
# - ISO 8601 format with milliseconds, for example +2017-01-22T06:00:00.000Z+
|
40
|
+
# - ISO 8601 format without milliseconds, for example +2017-01-22T06:00:00+00:00+
|
41
|
+
# - Milliseconds since the epoch, for example +1485061200000+
|
42
|
+
# Date-time arguments using either of the ISO 8601 formats must have a time zone designator, where +Z+ is accepted
|
43
|
+
# as an abbreviation for UTC time. When a URL is expected (for example, in browsers), the +++ used in time zone
|
44
|
+
# designators must be encoded as +%2B+.
|
45
|
+
# The end time value is exclusive. If you do not specify an end time, the datafeed
|
46
|
+
# runs continuously.
|
47
|
+
# @option arguments [String, Time] :start The time that the datafeed should begin, which can be specified by using the same formats as the +end+ parameter.
|
48
|
+
# This value is inclusive.
|
49
|
+
# If you do not specify a start time and the datafeed is associated with a new anomaly detection job, the analysis
|
50
|
+
# starts from the earliest time for which data is available.
|
51
|
+
# If you restart a stopped datafeed and specify a start value that is earlier than the timestamp of the latest
|
52
|
+
# processed record, the datafeed continues from 1 millisecond after the timestamp of the latest processed record.
|
42
53
|
# @option arguments [Time] :timeout Specifies the amount of time to wait until a datafeed starts. Server default: 20s.
|
43
54
|
# @option arguments [Hash] :headers Custom HTTP headers
|
44
55
|
# @option arguments [Hash] :body request body
|
@@ -46,6 +57,14 @@ module ElasticsearchServerless
|
|
46
57
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html
|
47
58
|
#
|
48
59
|
def start_datafeed(arguments = {})
|
60
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.start_datafeed" }
|
61
|
+
|
62
|
+
defined_params = [:datafeed_id].inject({}) do |set_variables, variable|
|
63
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
64
|
+
set_variables
|
65
|
+
end
|
66
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
67
|
+
|
49
68
|
raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id]
|
50
69
|
|
51
70
|
arguments = arguments.clone
|
@@ -60,7 +79,7 @@ module ElasticsearchServerless
|
|
60
79
|
params = Utils.process_params(arguments)
|
61
80
|
|
62
81
|
ElasticsearchServerless::API::Response.new(
|
63
|
-
perform_request(method, path, params, body, headers)
|
82
|
+
perform_request(method, path, params, body, headers, request_opts)
|
64
83
|
)
|
65
84
|
end
|
66
85
|
end
|
@@ -22,15 +22,28 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module MachineLearning
|
24
24
|
module Actions
|
25
|
-
#
|
25
|
+
# Start a trained model deployment.
|
26
|
+
# It allocates the model to every machine learning node.
|
26
27
|
#
|
27
28
|
# @option arguments [String] :model_id The unique identifier of the trained model. Currently, only PyTorch models are supported. (*Required*)
|
28
|
-
# @option arguments [Integer, String] :cache_size The inference cache size (in memory outside the JVM heap) per node for the model.
|
29
|
+
# @option arguments [Integer, String] :cache_size The inference cache size (in memory outside the JVM heap) per node for the model.
|
30
|
+
# The default value is the same size as the +model_size_bytes+. To disable the cache,
|
31
|
+
# +0b+ can be provided.
|
29
32
|
# @option arguments [String] :deployment_id A unique identifier for the deployment of the model.
|
30
|
-
# @option arguments [Integer] :number_of_allocations The number of model allocations on each node where the model is deployed.
|
33
|
+
# @option arguments [Integer] :number_of_allocations The number of model allocations on each node where the model is deployed.
|
34
|
+
# All allocations on a node share the same copy of the model in memory but use
|
35
|
+
# a separate set of threads to evaluate the model.
|
36
|
+
# Increasing this value generally increases the throughput.
|
37
|
+
# If this setting is greater than the number of hardware threads
|
38
|
+
# it will automatically be changed to a value less than the number of hardware threads. Server default: 1.
|
31
39
|
# @option arguments [String] :priority The deployment priority.
|
32
|
-
# @option arguments [Integer] :queue_capacity Specifies the number of inference requests that are allowed in the queue. After the number of requests exceeds
|
33
|
-
#
|
40
|
+
# @option arguments [Integer] :queue_capacity Specifies the number of inference requests that are allowed in the queue. After the number of requests exceeds
|
41
|
+
# this value, new requests are rejected with a 429 error. Server default: 1024.
|
42
|
+
# @option arguments [Integer] :threads_per_allocation Sets the number of threads used by each model allocation during inference. This generally increases
|
43
|
+
# the inference speed. The inference process is a compute-bound process; any number
|
44
|
+
# greater than the number of available hardware threads on the machine does not increase the
|
45
|
+
# inference speed. If this setting is greater than the number of hardware threads
|
46
|
+
# it will automatically be changed to a value less than the number of hardware threads. Server default: 1.
|
34
47
|
# @option arguments [Time] :timeout Specifies the amount of time to wait for the model to deploy. Server default: 20s.
|
35
48
|
# @option arguments [String] :wait_for Specifies the allocation status to wait for before returning. Server default: started.
|
36
49
|
# @option arguments [Hash] :headers Custom HTTP headers
|
@@ -38,6 +51,14 @@ module ElasticsearchServerless
|
|
38
51
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/start-trained-model-deployment.html
|
39
52
|
#
|
40
53
|
def start_trained_model_deployment(arguments = {})
|
54
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.start_trained_model_deployment" }
|
55
|
+
|
56
|
+
defined_params = [:model_id].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
|
+
|
41
62
|
raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id]
|
42
63
|
|
43
64
|
arguments = arguments.clone
|
@@ -52,7 +73,7 @@ module ElasticsearchServerless
|
|
52
73
|
params = Utils.process_params(arguments)
|
53
74
|
|
54
75
|
ElasticsearchServerless::API::Response.new(
|
55
|
-
perform_request(method, path, params, body, headers)
|
76
|
+
perform_request(method, path, params, body, headers, request_opts)
|
56
77
|
)
|
57
78
|
end
|
58
79
|
end
|
@@ -22,19 +22,38 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module MachineLearning
|
24
24
|
module Actions
|
25
|
-
#
|
25
|
+
# Stop data frame analytics jobs.
|
26
26
|
# A data frame analytics job can be started and stopped multiple times
|
27
27
|
# throughout its lifecycle.
|
28
28
|
#
|
29
|
-
# @option arguments [String] :id Identifier for the data frame analytics job. This identifier can contain
|
30
|
-
#
|
29
|
+
# @option arguments [String] :id Identifier for the data frame analytics job. This identifier can contain
|
30
|
+
# lowercase alphanumeric characters (a-z and 0-9), hyphens, and
|
31
|
+
# underscores. It must start and end with alphanumeric characters. (*Required*)
|
32
|
+
# @option arguments [Boolean] :allow_no_match Specifies what to do when the request:
|
33
|
+
# - Contains wildcard expressions and there are no data frame analytics
|
34
|
+
# jobs that match.
|
35
|
+
# - Contains the _all string or no identifiers and there are no matches.
|
36
|
+
# - Contains wildcard expressions and there are only partial matches.
|
37
|
+
# The default value is true, which returns an empty data_frame_analytics
|
38
|
+
# array when there are no matches and the subset of results when there are
|
39
|
+
# partial matches. If this parameter is false, the request returns a 404
|
40
|
+
# status code when there are no matches or only partial matches. Server default: true.
|
31
41
|
# @option arguments [Boolean] :force If true, the data frame analytics job is stopped forcefully.
|
32
|
-
# @option arguments [Time] :timeout Controls the amount of time to wait until the data frame analytics job
|
42
|
+
# @option arguments [Time] :timeout Controls the amount of time to wait until the data frame analytics job
|
43
|
+
# stops. Defaults to 20 seconds. Server default: 20s.
|
33
44
|
# @option arguments [Hash] :headers Custom HTTP headers
|
34
45
|
#
|
35
46
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-dfanalytics.html
|
36
47
|
#
|
37
48
|
def stop_data_frame_analytics(arguments = {})
|
49
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.stop_data_frame_analytics" }
|
50
|
+
|
51
|
+
defined_params = [:id].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
|
+
|
38
57
|
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
39
58
|
|
40
59
|
arguments = arguments.clone
|
@@ -49,7 +68,7 @@ module ElasticsearchServerless
|
|
49
68
|
params = Utils.process_params(arguments)
|
50
69
|
|
51
70
|
ElasticsearchServerless::API::Response.new(
|
52
|
-
perform_request(method, path, params, body, headers)
|
71
|
+
perform_request(method, path, params, body, headers, request_opts)
|
53
72
|
)
|
54
73
|
end
|
55
74
|
end
|
@@ -22,12 +22,20 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module MachineLearning
|
24
24
|
module Actions
|
25
|
-
#
|
25
|
+
# Stop datafeeds.
|
26
26
|
# A datafeed that is stopped ceases to retrieve data from Elasticsearch. A datafeed can be started and stopped
|
27
27
|
# multiple times throughout its lifecycle.
|
28
28
|
#
|
29
|
-
# @option arguments [String] :datafeed_id Identifier for the datafeed. You can stop multiple datafeeds in a single API request by using a comma-separated
|
30
|
-
#
|
29
|
+
# @option arguments [String] :datafeed_id Identifier for the datafeed. You can stop multiple datafeeds in a single API request by using a comma-separated
|
30
|
+
# list of datafeeds or a wildcard expression. You can close all datafeeds by using +_all+ or by specifying +*+ as
|
31
|
+
# the identifier. (*Required*)
|
32
|
+
# @option arguments [Boolean] :allow_no_match Specifies what to do when the request:
|
33
|
+
# - Contains wildcard expressions and there are no datafeeds that match.
|
34
|
+
# - Contains the +_all+ string or no identifiers and there are no matches.
|
35
|
+
# - Contains wildcard expressions and there are only partial matches.
|
36
|
+
# If +true+, the API returns an empty datafeeds array when there are no matches and the subset of results when
|
37
|
+
# there are partial matches. If +false+, the API returns a 404 status code when there are no matches or only
|
38
|
+
# partial matches. Server default: true.
|
31
39
|
# @option arguments [Boolean] :force If +true+, the datafeed is stopped forcefully.
|
32
40
|
# @option arguments [Time] :timeout Specifies the amount of time to wait until a datafeed stops. Server default: 20s.
|
33
41
|
# @option arguments [Hash] :headers Custom HTTP headers
|
@@ -36,6 +44,14 @@ module ElasticsearchServerless
|
|
36
44
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html
|
37
45
|
#
|
38
46
|
def stop_datafeed(arguments = {})
|
47
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.stop_datafeed" }
|
48
|
+
|
49
|
+
defined_params = [:datafeed_id].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
|
raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id]
|
40
56
|
|
41
57
|
arguments = arguments.clone
|
@@ -50,7 +66,7 @@ module ElasticsearchServerless
|
|
50
66
|
params = Utils.process_params(arguments)
|
51
67
|
|
52
68
|
ElasticsearchServerless::API::Response.new(
|
53
|
-
perform_request(method, path, params, body, headers)
|
69
|
+
perform_request(method, path, params, body, headers, request_opts)
|
54
70
|
)
|
55
71
|
end
|
56
72
|
end
|