elasticsearch-serverless 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/elasticsearch-serverless/api/async_search/delete.rb +9 -1
- data/lib/elasticsearch-serverless/api/async_search/get.rb +17 -3
- data/lib/elasticsearch-serverless/api/async_search/status.rb +9 -1
- data/lib/elasticsearch-serverless/api/async_search/submit.rb +15 -4
- data/lib/elasticsearch-serverless/api/bulk.rb +17 -4
- data/lib/elasticsearch-serverless/api/cat/aliases.rb +22 -6
- data/lib/elasticsearch-serverless/api/cat/component_templates.rb +22 -6
- data/lib/elasticsearch-serverless/api/cat/count.rb +25 -8
- data/lib/elasticsearch-serverless/api/cat/help.rb +16 -6
- data/lib/elasticsearch-serverless/api/cat/indices.rb +31 -9
- data/lib/elasticsearch-serverless/api/cat/ml_data_frame_analytics.rb +24 -8
- data/lib/elasticsearch-serverless/api/cat/ml_datafeeds.rb +29 -8
- data/lib/elasticsearch-serverless/api/cat/ml_jobs.rb +29 -8
- data/lib/elasticsearch-serverless/api/cat/ml_trained_models.rb +25 -8
- data/lib/elasticsearch-serverless/api/cat/transforms.rb +27 -9
- data/lib/elasticsearch-serverless/api/clear_scroll.rb +12 -3
- data/lib/elasticsearch-serverless/api/close_point_in_time.rb +3 -1
- data/lib/elasticsearch-serverless/api/cluster/delete_component_template.rb +14 -3
- data/lib/elasticsearch-serverless/api/cluster/exists_component_template.rb +18 -5
- data/lib/elasticsearch-serverless/api/cluster/get_component_template.rb +16 -4
- data/lib/elasticsearch-serverless/api/cluster/info.rb +11 -2
- data/lib/elasticsearch-serverless/api/cluster/put_component_template.rb +17 -7
- data/lib/elasticsearch-serverless/api/connector/check_in.rb +9 -1
- data/lib/elasticsearch-serverless/api/connector/delete.rb +14 -6
- data/lib/elasticsearch-serverless/api/connector/get.rb +13 -5
- data/lib/elasticsearch-serverless/api/connector/list.rb +7 -5
- data/lib/elasticsearch-serverless/api/connector/post.rb +7 -5
- data/lib/elasticsearch-serverless/api/connector/put.rb +14 -6
- data/lib/elasticsearch-serverless/api/connector/sync_job_cancel.rb +13 -5
- data/lib/elasticsearch-serverless/api/connector/sync_job_delete.rb +13 -5
- data/lib/elasticsearch-serverless/api/connector/sync_job_get.rb +13 -5
- data/lib/elasticsearch-serverless/api/connector/sync_job_list.rb +8 -6
- data/lib/elasticsearch-serverless/api/connector/sync_job_post.rb +7 -5
- data/lib/elasticsearch-serverless/api/connector/update_active_filtering.rb +9 -1
- data/lib/elasticsearch-serverless/api/connector/update_api_key_id.rb +13 -5
- data/lib/elasticsearch-serverless/api/connector/update_configuration.rb +13 -5
- data/lib/elasticsearch-serverless/api/connector/update_error.rb +9 -1
- data/lib/elasticsearch-serverless/api/connector/update_filtering.rb +13 -5
- data/lib/elasticsearch-serverless/api/connector/update_filtering_validation.rb +9 -1
- data/lib/elasticsearch-serverless/api/connector/update_index_name.rb +13 -5
- data/lib/elasticsearch-serverless/api/connector/update_name.rb +13 -5
- data/lib/elasticsearch-serverless/api/connector/update_native.rb +13 -5
- data/lib/elasticsearch-serverless/api/connector/update_pipeline.rb +13 -5
- data/lib/elasticsearch-serverless/api/connector/update_scheduling.rb +13 -5
- data/lib/elasticsearch-serverless/api/connector/update_service_type.rb +13 -5
- data/lib/elasticsearch-serverless/api/connector/update_status.rb +9 -1
- data/lib/elasticsearch-serverless/api/count.rb +30 -10
- data/lib/elasticsearch-serverless/api/create.rb +21 -5
- data/lib/elasticsearch-serverless/api/delete.rb +17 -5
- data/lib/elasticsearch-serverless/api/delete_by_query.rb +38 -11
- data/lib/elasticsearch-serverless/api/delete_script.rb +14 -3
- data/lib/elasticsearch-serverless/api/enrich/delete_policy.rb +10 -1
- data/lib/elasticsearch-serverless/api/enrich/execute_policy.rb +9 -1
- data/lib/elasticsearch-serverless/api/enrich/get_policy.rb +12 -2
- data/lib/elasticsearch-serverless/api/enrich/put_policy.rb +10 -1
- data/lib/elasticsearch-serverless/api/enrich/stats.rb +4 -1
- data/lib/elasticsearch-serverless/api/eql/delete.rb +12 -2
- data/lib/elasticsearch-serverless/api/eql/get.rb +13 -3
- data/lib/elasticsearch-serverless/api/eql/get_status.rb +9 -1
- data/lib/elasticsearch-serverless/api/eql/search.rb +9 -1
- data/lib/elasticsearch-serverless/api/exists.rb +20 -6
- data/lib/elasticsearch-serverless/api/exists_source.rb +16 -4
- data/lib/elasticsearch-serverless/api/explain.rb +17 -5
- data/lib/elasticsearch-serverless/api/field_caps.rb +12 -2
- data/lib/elasticsearch-serverless/api/get.rb +18 -5
- data/lib/elasticsearch-serverless/api/get_script.rb +10 -1
- data/lib/elasticsearch-serverless/api/get_source.rb +10 -1
- data/lib/elasticsearch-serverless/api/graph/explore.rb +12 -2
- data/lib/elasticsearch-serverless/api/index.rb +25 -6
- data/lib/elasticsearch-serverless/api/indices/add_block.rb +11 -2
- data/lib/elasticsearch-serverless/api/indices/analyze.rb +12 -2
- data/lib/elasticsearch-serverless/api/indices/create.rb +16 -4
- data/lib/elasticsearch-serverless/api/indices/create_data_stream.rb +16 -2
- data/lib/elasticsearch-serverless/api/indices/data_streams_stats.rb +15 -3
- data/lib/elasticsearch-serverless/api/indices/delete.rb +25 -7
- data/lib/elasticsearch-serverless/api/indices/delete_alias.rb +18 -5
- data/lib/elasticsearch-serverless/api/indices/delete_data_lifecycle.rb +11 -2
- data/lib/elasticsearch-serverless/api/indices/delete_data_stream.rb +10 -1
- data/lib/elasticsearch-serverless/api/indices/delete_index_template.rb +9 -1
- data/lib/elasticsearch-serverless/api/indices/exists.rb +17 -4
- data/lib/elasticsearch-serverless/api/indices/exists_alias.rb +19 -5
- data/lib/elasticsearch-serverless/api/indices/exists_index_template.rb +9 -1
- data/lib/elasticsearch-serverless/api/indices/explain_data_lifecycle.rb +11 -2
- data/lib/elasticsearch-serverless/api/indices/get.rb +18 -4
- data/lib/elasticsearch-serverless/api/indices/get_alias.rb +23 -6
- data/lib/elasticsearch-serverless/api/indices/get_data_lifecycle.rb +16 -3
- data/lib/elasticsearch-serverless/api/indices/get_data_stream.rb +14 -3
- data/lib/elasticsearch-serverless/api/indices/get_index_template.rb +9 -1
- data/lib/elasticsearch-serverless/api/indices/get_mapping.rb +21 -5
- data/lib/elasticsearch-serverless/api/indices/get_settings.rb +26 -6
- data/lib/elasticsearch-serverless/api/indices/migrate_to_data_stream.rb +10 -1
- data/lib/elasticsearch-serverless/api/indices/modify_data_stream.rb +4 -1
- data/lib/elasticsearch-serverless/api/indices/put_alias.rb +20 -5
- data/lib/elasticsearch-serverless/api/indices/put_data_lifecycle.rb +22 -6
- data/lib/elasticsearch-serverless/api/indices/put_index_template.rb +11 -2
- data/lib/elasticsearch-serverless/api/indices/put_mapping.rb +20 -5
- data/lib/elasticsearch-serverless/api/indices/put_settings.rb +28 -7
- data/lib/elasticsearch-serverless/api/indices/put_template.rb +14 -3
- data/lib/elasticsearch-serverless/api/indices/refresh.rb +19 -4
- data/lib/elasticsearch-serverless/api/indices/resolve_index.rb +15 -3
- data/lib/elasticsearch-serverless/api/indices/rollover.rb +19 -5
- data/lib/elasticsearch-serverless/api/indices/simulate_index_template.rb +9 -1
- data/lib/elasticsearch-serverless/api/indices/simulate_template.rb +11 -2
- data/lib/elasticsearch-serverless/api/indices/update_aliases.rb +8 -3
- data/lib/elasticsearch-serverless/api/indices/validate_query.rb +24 -7
- data/lib/elasticsearch-serverless/api/inference/delete.rb +9 -1
- data/lib/elasticsearch-serverless/api/inference/get.rb +9 -1
- data/lib/elasticsearch-serverless/api/inference/inference.rb +9 -1
- data/lib/elasticsearch-serverless/api/inference/put.rb +9 -1
- data/lib/elasticsearch-serverless/api/info.rb +4 -1
- data/lib/elasticsearch-serverless/api/ingest/delete_pipeline.rb +15 -4
- data/lib/elasticsearch-serverless/api/ingest/get_pipeline.rb +14 -3
- data/lib/elasticsearch-serverless/api/ingest/processor_grok.rb +3 -1
- data/lib/elasticsearch-serverless/api/ingest/put_pipeline.rb +9 -1
- data/lib/elasticsearch-serverless/api/ingest/simulate.rb +11 -2
- data/lib/elasticsearch-serverless/api/license/get.rb +8 -4
- data/lib/elasticsearch-serverless/api/logstash/delete_pipeline.rb +9 -1
- data/lib/elasticsearch-serverless/api/logstash/get_pipeline.rb +9 -1
- data/lib/elasticsearch-serverless/api/logstash/put_pipeline.rb +9 -1
- data/lib/elasticsearch-serverless/api/machine_learning/close_job.rb +14 -4
- data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar.rb +10 -1
- data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_event.rb +12 -3
- data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_job.rb +12 -3
- data/lib/elasticsearch-serverless/api/machine_learning/delete_data_frame_analytics.rb +10 -2
- data/lib/elasticsearch-serverless/api/machine_learning/delete_datafeed.rb +16 -4
- data/lib/elasticsearch-serverless/api/machine_learning/delete_filter.rb +10 -2
- data/lib/elasticsearch-serverless/api/machine_learning/delete_job.rb +17 -6
- data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model.rb +11 -3
- data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model_alias.rb +10 -2
- data/lib/elasticsearch-serverless/api/machine_learning/estimate_model_memory.rb +4 -1
- data/lib/elasticsearch-serverless/api/machine_learning/evaluate_data_frame.rb +4 -2
- data/lib/elasticsearch-serverless/api/machine_learning/flush_job.rb +19 -6
- data/lib/elasticsearch-serverless/api/machine_learning/get_calendar_events.rb +9 -1
- data/lib/elasticsearch-serverless/api/machine_learning/get_calendars.rb +9 -1
- data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics.rb +24 -4
- data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics_stats.rb +21 -3
- data/lib/elasticsearch-serverless/api/machine_learning/get_datafeed_stats.rb +20 -3
- data/lib/elasticsearch-serverless/api/machine_learning/get_datafeeds.rb +23 -4
- data/lib/elasticsearch-serverless/api/machine_learning/get_filters.rb +9 -1
- data/lib/elasticsearch-serverless/api/machine_learning/get_job_stats.rb +21 -3
- data/lib/elasticsearch-serverless/api/machine_learning/get_jobs.rb +23 -4
- data/lib/elasticsearch-serverless/api/machine_learning/get_overall_buckets.rb +30 -7
- data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models.rb +28 -7
- data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models_stats.rb +17 -3
- data/lib/elasticsearch-serverless/api/machine_learning/infer_trained_model.rb +9 -1
- data/lib/elasticsearch-serverless/api/machine_learning/open_job.rb +10 -2
- data/lib/elasticsearch-serverless/api/machine_learning/post_calendar_events.rb +9 -1
- data/lib/elasticsearch-serverless/api/machine_learning/preview_data_frame_analytics.rb +9 -1
- data/lib/elasticsearch-serverless/api/machine_learning/preview_datafeed.rb +13 -2
- data/lib/elasticsearch-serverless/api/machine_learning/put_calendar.rb +9 -1
- data/lib/elasticsearch-serverless/api/machine_learning/put_calendar_job.rb +9 -1
- data/lib/elasticsearch-serverless/api/machine_learning/put_data_frame_analytics.rb +12 -2
- data/lib/elasticsearch-serverless/api/machine_learning/put_datafeed.rb +17 -5
- data/lib/elasticsearch-serverless/api/machine_learning/put_filter.rb +9 -1
- data/lib/elasticsearch-serverless/api/machine_learning/put_job.rb +11 -2
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model.rb +14 -3
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_alias.rb +12 -2
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_definition_part.rb +11 -2
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_vocabulary.rb +9 -1
- data/lib/elasticsearch-serverless/api/machine_learning/reset_job.rb +14 -3
- data/lib/elasticsearch-serverless/api/machine_learning/start_data_frame_analytics.rb +14 -3
- data/lib/elasticsearch-serverless/api/machine_learning/start_datafeed.rb +27 -8
- data/lib/elasticsearch-serverless/api/machine_learning/start_trained_model_deployment.rb +25 -5
- data/lib/elasticsearch-serverless/api/machine_learning/stop_data_frame_analytics.rb +23 -4
- data/lib/elasticsearch-serverless/api/machine_learning/stop_datafeed.rb +19 -3
- data/lib/elasticsearch-serverless/api/machine_learning/stop_trained_model_deployment.rb +15 -3
- data/lib/elasticsearch-serverless/api/machine_learning/update_data_frame_analytics.rb +12 -2
- data/lib/elasticsearch-serverless/api/machine_learning/update_datafeed.rb +21 -4
- data/lib/elasticsearch-serverless/api/machine_learning/update_filter.rb +9 -1
- data/lib/elasticsearch-serverless/api/machine_learning/update_job.rb +9 -1
- data/lib/elasticsearch-serverless/api/machine_learning/update_trained_model_deployment.rb +15 -2
- data/lib/elasticsearch-serverless/api/mget.rb +17 -4
- data/lib/elasticsearch-serverless/api/msearch.rb +15 -1
- data/lib/elasticsearch-serverless/api/msearch_template.rb +16 -4
- data/lib/elasticsearch-serverless/api/mtermvectors.rb +14 -8
- data/lib/elasticsearch-serverless/api/open_point_in_time.rb +14 -3
- data/lib/elasticsearch-serverless/api/ping.rb +4 -1
- data/lib/elasticsearch-serverless/api/put_script.rb +18 -5
- data/lib/elasticsearch-serverless/api/query_rules/delete_rule.rb +9 -1
- data/lib/elasticsearch-serverless/api/query_rules/delete_ruleset.rb +9 -1
- data/lib/elasticsearch-serverless/api/query_rules/get_rule.rb +9 -1
- data/lib/elasticsearch-serverless/api/query_rules/get_ruleset.rb +9 -1
- data/lib/elasticsearch-serverless/api/query_rules/list_rulesets.rb +3 -1
- data/lib/elasticsearch-serverless/api/query_rules/put_rule.rb +9 -1
- data/lib/elasticsearch-serverless/api/query_rules/put_ruleset.rb +9 -1
- data/lib/elasticsearch-serverless/api/rank_eval.rb +11 -2
- data/lib/elasticsearch-serverless/api/reindex.rb +11 -7
- data/lib/elasticsearch-serverless/api/render_search_template.rb +11 -2
- data/lib/elasticsearch-serverless/api/scripts_painless_execute.rb +4 -1
- data/lib/elasticsearch-serverless/api/scroll.rb +9 -1
- data/lib/elasticsearch-serverless/api/search.rb +107 -30
- data/lib/elasticsearch-serverless/api/search_application/delete.rb +9 -1
- data/lib/elasticsearch-serverless/api/search_application/delete_behavioral_analytics.rb +9 -1
- data/lib/elasticsearch-serverless/api/search_application/get.rb +9 -1
- data/lib/elasticsearch-serverless/api/search_application/get_behavioral_analytics.rb +9 -1
- data/lib/elasticsearch-serverless/api/search_application/list.rb +3 -1
- data/lib/elasticsearch-serverless/api/search_application/put.rb +9 -1
- data/lib/elasticsearch-serverless/api/search_application/put_behavioral_analytics.rb +9 -1
- data/lib/elasticsearch-serverless/api/search_application/search.rb +9 -1
- data/lib/elasticsearch-serverless/api/search_mvt.rb +27 -7
- data/lib/elasticsearch-serverless/api/search_template.rb +22 -6
- data/lib/elasticsearch-serverless/api/security/authenticate.rb +6 -2
- data/lib/elasticsearch-serverless/api/security/create_api_key.rb +4 -1
- data/lib/elasticsearch-serverless/api/security/get_api_key.rb +19 -7
- data/lib/elasticsearch-serverless/api/security/has_privileges.rb +10 -1
- data/lib/elasticsearch-serverless/api/security/invalidate_api_key.rb +4 -1
- data/lib/elasticsearch-serverless/api/security/query_api_keys.rb +7 -3
- data/lib/elasticsearch-serverless/api/security/update_api_key.rb +10 -1
- data/lib/elasticsearch-serverless/api/sql/clear_cursor.rb +3 -1
- data/lib/elasticsearch-serverless/api/sql/delete_async.rb +9 -1
- data/lib/elasticsearch-serverless/api/sql/get_async.rb +15 -4
- data/lib/elasticsearch-serverless/api/sql/get_async_status.rb +9 -1
- data/lib/elasticsearch-serverless/api/sql/query.rb +3 -1
- data/lib/elasticsearch-serverless/api/sql/translate.rb +3 -1
- data/lib/elasticsearch-serverless/api/synonyms/delete_synonym.rb +9 -1
- data/lib/elasticsearch-serverless/api/synonyms/delete_synonym_rule.rb +9 -1
- data/lib/elasticsearch-serverless/api/synonyms/get_synonym.rb +9 -1
- data/lib/elasticsearch-serverless/api/synonyms/get_synonym_rule.rb +9 -1
- data/lib/elasticsearch-serverless/api/synonyms/get_synonyms_sets.rb +3 -1
- data/lib/elasticsearch-serverless/api/synonyms/put_synonym.rb +9 -1
- data/lib/elasticsearch-serverless/api/synonyms/put_synonym_rule.rb +9 -1
- data/lib/elasticsearch-serverless/api/tasks/get.rb +13 -3
- data/lib/elasticsearch-serverless/api/terms_enum.rb +9 -1
- data/lib/elasticsearch-serverless/api/termvectors.rb +21 -9
- data/lib/elasticsearch-serverless/api/transform/delete_transform.rb +14 -3
- data/lib/elasticsearch-serverless/api/transform/get_transform.rb +23 -4
- data/lib/elasticsearch-serverless/api/transform/get_transform_stats.rb +20 -3
- data/lib/elasticsearch-serverless/api/transform/preview_transform.rb +15 -5
- data/lib/elasticsearch-serverless/api/transform/put_transform.rb +17 -7
- data/lib/elasticsearch-serverless/api/transform/reset_transform.rb +14 -3
- data/lib/elasticsearch-serverless/api/transform/schedule_now_transform.rb +11 -3
- data/lib/elasticsearch-serverless/api/transform/start_transform.rb +10 -3
- data/lib/elasticsearch-serverless/api/transform/stop_transform.rb +23 -6
- data/lib/elasticsearch-serverless/api/transform/update_transform.rb +15 -4
- data/lib/elasticsearch-serverless/api/update.rb +23 -7
- data/lib/elasticsearch-serverless/api/update_by_query.rb +36 -9
- data/lib/elasticsearch-serverless/api.rb +3 -2
- data/lib/elasticsearch-serverless/version.rb +1 -1
- data/lib/elasticsearch-serverless.rb +4 -3
- metadata +5 -76
- data/lib/elasticsearch-serverless/api/connector/last_sync.rb +0 -59
@@ -29,14 +29,33 @@ module ElasticsearchServerless
|
|
29
29
|
# +<feed_id>+, or by omitting the +<feed_id>+.
|
30
30
|
# This API returns a maximum of 10,000 datafeeds.
|
31
31
|
#
|
32
|
-
# @option arguments [String, Array] :datafeed_id Identifier for the datafeed. It can be a datafeed identifier or a
|
33
|
-
#
|
34
|
-
#
|
32
|
+
# @option arguments [String, Array] :datafeed_id Identifier for the datafeed. It can be a datafeed identifier or a
|
33
|
+
# wildcard expression. If you do not specify one of these options, the API
|
34
|
+
# returns information about all datafeeds.
|
35
|
+
# @option arguments [Boolean] :allow_no_match Specifies what to do when the request:
|
36
|
+
# - Contains wildcard expressions and there are no datafeeds that match.
|
37
|
+
# - Contains the +_all+ string or no identifiers and there are no matches.
|
38
|
+
# - Contains wildcard expressions and there are only partial matches.
|
39
|
+
# The default value is +true+, which returns an empty +datafeeds+ array
|
40
|
+
# when there are no matches and the subset of results when there are
|
41
|
+
# partial matches. If this parameter is +false+, the request returns a
|
42
|
+
# +404+ status code when there are no matches or only partial matches.
|
43
|
+
# @option arguments [Boolean] :exclude_generated Indicates if certain fields should be removed from the configuration on
|
44
|
+
# retrieval. This allows the configuration to be in an acceptable format to
|
45
|
+
# be retrieved and then added to another cluster.
|
35
46
|
# @option arguments [Hash] :headers Custom HTTP headers
|
36
47
|
#
|
37
48
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html
|
38
49
|
#
|
39
50
|
def get_datafeeds(arguments = {})
|
51
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.get_datafeeds" }
|
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
|
+
|
40
59
|
arguments = arguments.clone
|
41
60
|
headers = arguments.delete(:headers) || {}
|
42
61
|
|
@@ -53,7 +72,7 @@ module ElasticsearchServerless
|
|
53
72
|
params = Utils.process_params(arguments)
|
54
73
|
|
55
74
|
ElasticsearchServerless::API::Response.new(
|
56
|
-
perform_request(method, path, params, body, headers)
|
75
|
+
perform_request(method, path, params, body, headers, request_opts)
|
57
76
|
)
|
58
77
|
end
|
59
78
|
end
|
@@ -33,6 +33,14 @@ module ElasticsearchServerless
|
|
33
33
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-filter.html
|
34
34
|
#
|
35
35
|
def get_filters(arguments = {})
|
36
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.get_filters" }
|
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
|
arguments = arguments.clone
|
37
45
|
headers = arguments.delete(:headers) || {}
|
38
46
|
|
@@ -49,7 +57,7 @@ module ElasticsearchServerless
|
|
49
57
|
params = Utils.process_params(arguments)
|
50
58
|
|
51
59
|
ElasticsearchServerless::API::Response.new(
|
52
|
-
perform_request(method, path, params, body, headers)
|
60
|
+
perform_request(method, path, params, body, headers, request_opts)
|
53
61
|
)
|
54
62
|
end
|
55
63
|
end
|
@@ -24,13 +24,31 @@ module ElasticsearchServerless
|
|
24
24
|
module Actions
|
25
25
|
# Retrieves usage information for anomaly detection jobs.
|
26
26
|
#
|
27
|
-
# @option arguments [String] :job_id Identifier for the anomaly detection job. It can be a job identifier, a
|
28
|
-
#
|
27
|
+
# @option arguments [String] :job_id Identifier for the anomaly detection job. It can be a job identifier, a
|
28
|
+
# group name, a comma-separated list of jobs, or a wildcard expression. If
|
29
|
+
# you do not specify one of these options, the API returns information for
|
30
|
+
# all anomaly detection jobs.
|
31
|
+
# @option arguments [Boolean] :allow_no_match Specifies what to do when the request:
|
32
|
+
# - Contains wildcard expressions and there are no jobs that match.
|
33
|
+
# - Contains the _all string or no identifiers and there are no matches.
|
34
|
+
# - Contains wildcard expressions and there are only partial matches.
|
35
|
+
# If +true+, the API returns an empty +jobs+ array when
|
36
|
+
# there are no matches and the subset of results when there are partial
|
37
|
+
# matches. If +false+, the API returns a +404+ status
|
38
|
+
# code when there are no matches or only partial matches. Server default: true.
|
29
39
|
# @option arguments [Hash] :headers Custom HTTP headers
|
30
40
|
#
|
31
41
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html
|
32
42
|
#
|
33
43
|
def get_job_stats(arguments = {})
|
44
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.get_job_stats" }
|
45
|
+
|
46
|
+
defined_params = [:job_id].inject({}) do |set_variables, variable|
|
47
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
48
|
+
set_variables
|
49
|
+
end
|
50
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
51
|
+
|
34
52
|
arguments = arguments.clone
|
35
53
|
headers = arguments.delete(:headers) || {}
|
36
54
|
|
@@ -47,7 +65,7 @@ module ElasticsearchServerless
|
|
47
65
|
params = Utils.process_params(arguments)
|
48
66
|
|
49
67
|
ElasticsearchServerless::API::Response.new(
|
50
|
-
perform_request(method, path, params, body, headers)
|
68
|
+
perform_request(method, path, params, body, headers, request_opts)
|
51
69
|
)
|
52
70
|
end
|
53
71
|
end
|
@@ -28,14 +28,33 @@ module ElasticsearchServerless
|
|
28
28
|
# expression. You can get information for all anomaly detection jobs by using
|
29
29
|
# +_all+, by specifying +*+ as the +<job_id>+, or by omitting the +<job_id>+.
|
30
30
|
#
|
31
|
-
# @option arguments [String, Array] :job_id Identifier for the anomaly detection job. It can be a job identifier, a
|
32
|
-
#
|
33
|
-
#
|
31
|
+
# @option arguments [String, Array] :job_id Identifier for the anomaly detection job. It can be a job identifier, a
|
32
|
+
# group name, or a wildcard expression. If you do not specify one of these
|
33
|
+
# options, the API returns information for all anomaly detection jobs.
|
34
|
+
# @option arguments [Boolean] :allow_no_match Specifies what to do when the request:
|
35
|
+
# - Contains wildcard expressions and there are no jobs that match.
|
36
|
+
# - Contains the _all string or no identifiers and there are no matches.
|
37
|
+
# - Contains wildcard expressions and there are only partial matches.
|
38
|
+
# The default value is +true+, which returns an empty +jobs+ array when
|
39
|
+
# there are no matches and the subset of results when there are partial
|
40
|
+
# matches. If this parameter is +false+, the request returns a +404+ status
|
41
|
+
# code when there are no matches or only partial matches. Server default: true.
|
42
|
+
# @option arguments [Boolean] :exclude_generated Indicates if certain fields should be removed from the configuration on
|
43
|
+
# retrieval. This allows the configuration to be in an acceptable format to
|
44
|
+
# be retrieved and then added to another cluster.
|
34
45
|
# @option arguments [Hash] :headers Custom HTTP headers
|
35
46
|
#
|
36
47
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html
|
37
48
|
#
|
38
49
|
def get_jobs(arguments = {})
|
50
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.get_jobs" }
|
51
|
+
|
52
|
+
defined_params = [:job_id].inject({}) do |set_variables, variable|
|
53
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
54
|
+
set_variables
|
55
|
+
end
|
56
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
57
|
+
|
39
58
|
arguments = arguments.clone
|
40
59
|
headers = arguments.delete(:headers) || {}
|
41
60
|
|
@@ -52,7 +71,7 @@ module ElasticsearchServerless
|
|
52
71
|
params = Utils.process_params(arguments)
|
53
72
|
|
54
73
|
ElasticsearchServerless::API::Response.new(
|
55
|
-
perform_request(method, path, params, body, headers)
|
74
|
+
perform_request(method, path, params, body, headers, request_opts)
|
56
75
|
)
|
57
76
|
end
|
58
77
|
end
|
@@ -24,7 +24,6 @@ module ElasticsearchServerless
|
|
24
24
|
module Actions
|
25
25
|
# Retrieves overall bucket results that summarize the bucket results of
|
26
26
|
# multiple anomaly detection jobs.
|
27
|
-
#
|
28
27
|
# The +overall_score+ is calculated by combining the scores of all the
|
29
28
|
# buckets within the overall bucket span. First, the maximum
|
30
29
|
# +anomaly_score+ per anomaly detection job in the overall bucket is
|
@@ -40,20 +39,44 @@ module ElasticsearchServerless
|
|
40
39
|
# +overall_score+ of the overall buckets that have a span equal to the
|
41
40
|
# jobs' largest bucket span.
|
42
41
|
#
|
43
|
-
# @option arguments [String] :job_id Identifier for the anomaly detection job. It can be a job identifier, a
|
44
|
-
#
|
45
|
-
#
|
42
|
+
# @option arguments [String] :job_id Identifier for the anomaly detection job. It can be a job identifier, a
|
43
|
+
# group name, a comma-separated list of jobs or groups, or a wildcard
|
44
|
+
# expression.You can summarize the bucket results for all anomaly detection jobs by
|
45
|
+
# using +_all+ or by specifying +*+ as the +<job_id>+. (*Required*)
|
46
|
+
# @option arguments [Boolean] :allow_no_match Specifies what to do when the request:
|
47
|
+
# - Contains wildcard expressions and there are no jobs that match.
|
48
|
+
# - Contains the +_all+ string or no identifiers and there are no matches.
|
49
|
+
# - Contains wildcard expressions and there are only partial matches.
|
50
|
+
# If +true+, the request returns an empty +jobs+ array when there are no
|
51
|
+
# matches and the subset of results when there are partial matches. If this
|
52
|
+
# parameter is +false+, the request returns a +404+ status code when there
|
53
|
+
# are no matches or only partial matches. Server default: true.
|
54
|
+
# @option arguments [Time] :bucket_span The span of the overall buckets. Must be greater or equal to the largest
|
55
|
+
# bucket span of the specified anomaly detection jobs, which is the default
|
56
|
+
# value.By default, an overall bucket has a span equal to the largest bucket span
|
57
|
+
# of the specified anomaly detection jobs. To override that behavior, use
|
58
|
+
# the optional +bucket_span+ parameter.
|
46
59
|
# @option arguments [String, Time] :end Returns overall buckets with timestamps earlier than this time.
|
47
60
|
# @option arguments [Boolean] :exclude_interim If +true+, the output excludes interim results.
|
48
|
-
# @option arguments [Double, String] :overall_score Returns overall buckets with overall scores greater than or equal to this
|
61
|
+
# @option arguments [Double, String] :overall_score Returns overall buckets with overall scores greater than or equal to this
|
62
|
+
# value.
|
49
63
|
# @option arguments [String, Time] :start Returns overall buckets with timestamps after this time.
|
50
|
-
# @option arguments [Integer] :top_n The number of top anomaly detection job bucket scores to be used in the
|
64
|
+
# @option arguments [Integer] :top_n The number of top anomaly detection job bucket scores to be used in the
|
65
|
+
# +overall_score+ calculation. Server default: 1.
|
51
66
|
# @option arguments [Hash] :headers Custom HTTP headers
|
52
67
|
# @option arguments [Hash] :body request body
|
53
68
|
#
|
54
69
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html
|
55
70
|
#
|
56
71
|
def get_overall_buckets(arguments = {})
|
72
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.get_overall_buckets" }
|
73
|
+
|
74
|
+
defined_params = [:job_id].inject({}) do |set_variables, variable|
|
75
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
76
|
+
set_variables
|
77
|
+
end
|
78
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
79
|
+
|
57
80
|
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
|
58
81
|
|
59
82
|
arguments = arguments.clone
|
@@ -73,7 +96,7 @@ module ElasticsearchServerless
|
|
73
96
|
params = Utils.process_params(arguments)
|
74
97
|
|
75
98
|
ElasticsearchServerless::API::Response.new(
|
76
|
-
perform_request(method, path, params, body, headers)
|
99
|
+
perform_request(method, path, params, body, headers, request_opts)
|
77
100
|
)
|
78
101
|
end
|
79
102
|
end
|
@@ -24,19 +24,40 @@ module ElasticsearchServerless
|
|
24
24
|
module Actions
|
25
25
|
# Retrieves configuration information for a trained model.
|
26
26
|
#
|
27
|
-
# @option arguments [String, Array] :model_id The unique identifier of the trained model or a model alias.
|
28
|
-
#
|
29
|
-
#
|
30
|
-
# @option arguments [Boolean] :
|
27
|
+
# @option arguments [String, Array] :model_id The unique identifier of the trained model or a model alias.You can get information for multiple trained models in a single API
|
28
|
+
# request by using a comma-separated list of model IDs or a wildcard
|
29
|
+
# expression.
|
30
|
+
# @option arguments [Boolean] :allow_no_match Specifies what to do when the request:
|
31
|
+
# - Contains wildcard expressions and there are no models that match.
|
32
|
+
# - Contains the _all string or no identifiers and there are no matches.
|
33
|
+
# - Contains wildcard expressions and there are only partial matches.
|
34
|
+
# If true, it returns an empty array when there are no matches and the
|
35
|
+
# subset of results when there are partial matches. Server default: true.
|
36
|
+
# @option arguments [Boolean] :decompress_definition Specifies whether the included model definition should be returned as a
|
37
|
+
# JSON map (true) or in a custom compressed format (false). Server default: true.
|
38
|
+
# @option arguments [Boolean] :exclude_generated Indicates if certain fields should be removed from the configuration on
|
39
|
+
# retrieval. This allows the configuration to be in an acceptable format to
|
40
|
+
# be retrieved and then added to another cluster.
|
31
41
|
# @option arguments [Integer] :from Skips the specified number of models. Server default: 0.
|
32
|
-
# @option arguments [String] :include A comma delimited string of optional fields to include in the response
|
42
|
+
# @option arguments [String] :include A comma delimited string of optional fields to include in the response
|
43
|
+
# body.
|
33
44
|
# @option arguments [Integer] :size Specifies the maximum number of models to obtain. Server default: 100.
|
34
|
-
# @option arguments [String] :tags A comma delimited string of tags. A trained model can have many tags, or
|
45
|
+
# @option arguments [String] :tags A comma delimited string of tags. A trained model can have many tags, or
|
46
|
+
# none. When supplied, only trained models that contain all the supplied
|
47
|
+
# tags are returned.
|
35
48
|
# @option arguments [Hash] :headers Custom HTTP headers
|
36
49
|
#
|
37
50
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models.html
|
38
51
|
#
|
39
52
|
def get_trained_models(arguments = {})
|
53
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.get_trained_models" }
|
54
|
+
|
55
|
+
defined_params = [:model_id].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
|
+
|
40
61
|
arguments = arguments.clone
|
41
62
|
headers = arguments.delete(:headers) || {}
|
42
63
|
|
@@ -53,7 +74,7 @@ module ElasticsearchServerless
|
|
53
74
|
params = Utils.process_params(arguments)
|
54
75
|
|
55
76
|
ElasticsearchServerless::API::Response.new(
|
56
|
-
perform_request(method, path, params, body, headers)
|
77
|
+
perform_request(method, path, params, body, headers, request_opts)
|
57
78
|
)
|
58
79
|
end
|
59
80
|
end
|
@@ -25,8 +25,14 @@ module ElasticsearchServerless
|
|
25
25
|
# Retrieves usage information for trained models. You can get usage information for multiple trained
|
26
26
|
# models in a single API request by using a comma-separated list of model IDs or a wildcard expression.
|
27
27
|
#
|
28
|
-
# @option arguments [String, Array] :model_id The unique identifier of the trained model or a model alias. It can be a
|
29
|
-
#
|
28
|
+
# @option arguments [String, Array] :model_id The unique identifier of the trained model or a model alias. It can be a
|
29
|
+
# comma-separated list or a wildcard expression.
|
30
|
+
# @option arguments [Boolean] :allow_no_match Specifies what to do when the request:
|
31
|
+
# - Contains wildcard expressions and there are no models that match.
|
32
|
+
# - Contains the _all string or no identifiers and there are no matches.
|
33
|
+
# - Contains wildcard expressions and there are only partial matches.
|
34
|
+
# If true, it returns an empty array when there are no matches and the
|
35
|
+
# subset of results when there are partial matches. Server default: true.
|
30
36
|
# @option arguments [Integer] :from Skips the specified number of models. Server default: 0.
|
31
37
|
# @option arguments [Integer] :size Specifies the maximum number of models to obtain. Server default: 100.
|
32
38
|
# @option arguments [Hash] :headers Custom HTTP headers
|
@@ -34,6 +40,14 @@ module ElasticsearchServerless
|
|
34
40
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models-stats.html
|
35
41
|
#
|
36
42
|
def get_trained_models_stats(arguments = {})
|
43
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.get_trained_models_stats" }
|
44
|
+
|
45
|
+
defined_params = [:model_id].inject({}) do |set_variables, variable|
|
46
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
47
|
+
set_variables
|
48
|
+
end
|
49
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
50
|
+
|
37
51
|
arguments = arguments.clone
|
38
52
|
headers = arguments.delete(:headers) || {}
|
39
53
|
|
@@ -50,7 +64,7 @@ module ElasticsearchServerless
|
|
50
64
|
params = Utils.process_params(arguments)
|
51
65
|
|
52
66
|
ElasticsearchServerless::API::Response.new(
|
53
|
-
perform_request(method, path, params, body, headers)
|
67
|
+
perform_request(method, path, params, body, headers, request_opts)
|
54
68
|
)
|
55
69
|
end
|
56
70
|
end
|
@@ -37,6 +37,14 @@ module ElasticsearchServerless
|
|
37
37
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/infer-trained-model.html
|
38
38
|
#
|
39
39
|
def infer_trained_model(arguments = {})
|
40
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.infer_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
|
+
|
40
48
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
41
49
|
raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id]
|
42
50
|
|
@@ -54,7 +62,7 @@ module ElasticsearchServerless
|
|
54
62
|
params = Utils.process_params(arguments)
|
55
63
|
|
56
64
|
ElasticsearchServerless::API::Response.new(
|
57
|
-
perform_request(method, path, params, body, headers)
|
65
|
+
perform_request(method, path, params, body, headers, request_opts)
|
58
66
|
)
|
59
67
|
end
|
60
68
|
end
|
@@ -22,7 +22,7 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module MachineLearning
|
24
24
|
module Actions
|
25
|
-
#
|
25
|
+
# Open anomaly detection jobs.
|
26
26
|
# An anomaly detection job must be opened in order for it to be ready to
|
27
27
|
# receive and analyze data. It can be opened and closed multiple times
|
28
28
|
# throughout its lifecycle.
|
@@ -39,6 +39,14 @@ module ElasticsearchServerless
|
|
39
39
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html
|
40
40
|
#
|
41
41
|
def open_job(arguments = {})
|
42
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.open_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
|
+
|
42
50
|
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
|
43
51
|
|
44
52
|
arguments = arguments.clone
|
@@ -53,7 +61,7 @@ module ElasticsearchServerless
|
|
53
61
|
params = Utils.process_params(arguments)
|
54
62
|
|
55
63
|
ElasticsearchServerless::API::Response.new(
|
56
|
-
perform_request(method, path, params, body, headers)
|
64
|
+
perform_request(method, path, params, body, headers, request_opts)
|
57
65
|
)
|
58
66
|
end
|
59
67
|
end
|
@@ -31,6 +31,14 @@ module ElasticsearchServerless
|
|
31
31
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-calendar-event.html
|
32
32
|
#
|
33
33
|
def post_calendar_events(arguments = {})
|
34
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.post_calendar_events" }
|
35
|
+
|
36
|
+
defined_params = [:calendar_id].inject({}) do |set_variables, variable|
|
37
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
38
|
+
set_variables
|
39
|
+
end
|
40
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
41
|
+
|
34
42
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
35
43
|
raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id]
|
36
44
|
|
@@ -46,7 +54,7 @@ module ElasticsearchServerless
|
|
46
54
|
params = {}
|
47
55
|
|
48
56
|
ElasticsearchServerless::API::Response.new(
|
49
|
-
perform_request(method, path, params, body, headers)
|
57
|
+
perform_request(method, path, params, body, headers, request_opts)
|
50
58
|
)
|
51
59
|
end
|
52
60
|
end
|
@@ -31,6 +31,14 @@ module ElasticsearchServerless
|
|
31
31
|
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/preview-dfanalytics.html
|
32
32
|
#
|
33
33
|
def preview_data_frame_analytics(arguments = {})
|
34
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.preview_data_frame_analytics" }
|
35
|
+
|
36
|
+
defined_params = [:id].inject({}) do |set_variables, variable|
|
37
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
38
|
+
set_variables
|
39
|
+
end
|
40
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
41
|
+
|
34
42
|
arguments = arguments.clone
|
35
43
|
headers = arguments.delete(:headers) || {}
|
36
44
|
|
@@ -52,7 +60,7 @@ module ElasticsearchServerless
|
|
52
60
|
params = {}
|
53
61
|
|
54
62
|
ElasticsearchServerless::API::Response.new(
|
55
|
-
perform_request(method, path, params, body, headers)
|
63
|
+
perform_request(method, path, params, body, headers, request_opts)
|
56
64
|
)
|
57
65
|
end
|
58
66
|
end
|
@@ -32,7 +32,10 @@ module ElasticsearchServerless
|
|
32
32
|
# datafeed. To get a preview that accurately reflects the behavior of the datafeed, use the appropriate credentials.
|
33
33
|
# You can also use secondary authorization headers to supply the credentials.
|
34
34
|
#
|
35
|
-
# @option arguments [String] :datafeed_id A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase
|
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. NOTE: If you use this path parameter, you cannot provide datafeed or anomaly detection job
|
38
|
+
# configuration details in the request body.
|
36
39
|
# @option arguments [String, Time] :start The start time from where the datafeed preview should begin
|
37
40
|
# @option arguments [String, Time] :end The end time when the datafeed preview should stop
|
38
41
|
# @option arguments [Hash] :headers Custom HTTP headers
|
@@ -41,6 +44,14 @@ module ElasticsearchServerless
|
|
41
44
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html
|
42
45
|
#
|
43
46
|
def preview_datafeed(arguments = {})
|
47
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.preview_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
|
+
|
44
55
|
arguments = arguments.clone
|
45
56
|
headers = arguments.delete(:headers) || {}
|
46
57
|
|
@@ -62,7 +73,7 @@ module ElasticsearchServerless
|
|
62
73
|
params = Utils.process_params(arguments)
|
63
74
|
|
64
75
|
ElasticsearchServerless::API::Response.new(
|
65
|
-
perform_request(method, path, params, body, headers)
|
76
|
+
perform_request(method, path, params, body, headers, request_opts)
|
66
77
|
)
|
67
78
|
end
|
68
79
|
end
|
@@ -31,6 +31,14 @@ module ElasticsearchServerless
|
|
31
31
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar.html
|
32
32
|
#
|
33
33
|
def put_calendar(arguments = {})
|
34
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.put_calendar" }
|
35
|
+
|
36
|
+
defined_params = [:calendar_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 'calendar_id' missing" unless arguments[:calendar_id]
|
35
43
|
|
36
44
|
arguments = arguments.clone
|
@@ -45,7 +53,7 @@ module ElasticsearchServerless
|
|
45
53
|
params = {}
|
46
54
|
|
47
55
|
ElasticsearchServerless::API::Response.new(
|
48
|
-
perform_request(method, path, params, body, headers)
|
56
|
+
perform_request(method, path, params, body, headers, request_opts)
|
49
57
|
)
|
50
58
|
end
|
51
59
|
end
|
@@ -31,6 +31,14 @@ module ElasticsearchServerless
|
|
31
31
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar-job.html
|
32
32
|
#
|
33
33
|
def put_calendar_job(arguments = {})
|
34
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.put_calendar_job" }
|
35
|
+
|
36
|
+
defined_params = [:calendar_id, :job_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 'calendar_id' missing" unless arguments[:calendar_id]
|
35
43
|
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_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
|
@@ -26,13 +26,23 @@ module ElasticsearchServerless
|
|
26
26
|
# This API creates a data frame analytics job that performs an analysis on the
|
27
27
|
# source indices and stores the outcome in a destination index.
|
28
28
|
#
|
29
|
-
# @option arguments [String] :id Identifier for the data frame analytics job. This identifier can contain
|
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*)
|
30
32
|
# @option arguments [Hash] :headers Custom HTTP headers
|
31
33
|
# @option arguments [Hash] :body request body
|
32
34
|
#
|
33
35
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-dfanalytics.html
|
34
36
|
#
|
35
37
|
def put_data_frame_analytics(arguments = {})
|
38
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.put_data_frame_analytics" }
|
39
|
+
|
40
|
+
defined_params = [:id].inject({}) do |set_variables, variable|
|
41
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
42
|
+
set_variables
|
43
|
+
end
|
44
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
45
|
+
|
36
46
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
37
47
|
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
38
48
|
|
@@ -48,7 +58,7 @@ module ElasticsearchServerless
|
|
48
58
|
params = {}
|
49
59
|
|
50
60
|
ElasticsearchServerless::API::Response.new(
|
51
|
-
perform_request(method, path, params, body, headers)
|
61
|
+
perform_request(method, path, params, body, headers, request_opts)
|
52
62
|
)
|
53
63
|
end
|
54
64
|
end
|
@@ -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
|
@@ -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
|