elasticsearch-xpack 7.3.0 → 7.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/elasticsearch/xpack.rb +7 -1
- data/lib/elasticsearch/xpack/api/actions/data_frame/delete_data_frame_transform.rb +10 -2
- data/lib/elasticsearch/xpack/api/actions/data_frame/get_data_frame_transform.rb +8 -6
- data/lib/elasticsearch/xpack/api/actions/data_frame/get_data_frame_transform_stats.rb +7 -5
- data/lib/elasticsearch/xpack/api/actions/data_frame/params_registry.rb +50 -0
- data/lib/elasticsearch/xpack/api/actions/data_frame/put_data_frame_transform.rb +10 -2
- data/lib/elasticsearch/xpack/api/actions/data_frame/start_data_frame_transform.rb +6 -4
- data/lib/elasticsearch/xpack/api/actions/data_frame/stop_data_frame_transform.rb +9 -6
- data/lib/elasticsearch/xpack/api/actions/data_frame/update_data_frame_transform.rb +45 -0
- data/lib/elasticsearch/xpack/api/actions/graph/explore.rb +7 -5
- data/lib/elasticsearch/xpack/api/actions/graph/params_registry.rb +50 -0
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/delete_policy.rb +39 -0
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/explain.rb +40 -0
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/get_policy.rb +38 -0
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/get_status.rb +36 -0
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/move_to_step.rb +41 -0
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/params_registry.rb +50 -0
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/put_policy.rb +40 -0
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/remove_policy.rb +38 -0
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/retry_policy.rb +38 -0
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/start.rb +36 -0
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/stop.rb +36 -0
- data/lib/elasticsearch/xpack/api/actions/info.rb +7 -5
- data/lib/elasticsearch/xpack/api/actions/license/get.rb +6 -2
- data/lib/elasticsearch/xpack/api/actions/license/params_registry.rb +50 -0
- data/lib/elasticsearch/xpack/api/actions/license/post.rb +6 -2
- data/lib/elasticsearch/xpack/api/actions/license/post_start_basic.rb +6 -3
- data/lib/elasticsearch/xpack/api/actions/license/post_start_trial.rb +7 -4
- data/lib/elasticsearch/xpack/api/actions/machine_learning/close_job.rb +8 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_datafeed.rb +6 -3
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_forecast.rb +8 -6
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_job.rb +6 -3
- data/lib/elasticsearch/xpack/api/actions/machine_learning/estimate_memory_usage.rb +30 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/flush_job.rb +10 -7
- data/lib/elasticsearch/xpack/api/actions/machine_learning/forecast.rb +7 -4
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_buckets.rb +15 -13
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_calendar_events.rb +11 -9
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_calendars.rb +8 -6
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_categories.rb +7 -4
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_datafeed_stats.rb +6 -4
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_datafeeds.rb +6 -4
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_filters.rb +7 -4
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_influencers.rb +13 -10
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_job_stats.rb +6 -4
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_jobs.rb +6 -4
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_model_snapshots.rb +11 -8
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_overall_buckets.rb +12 -11
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_records.rb +13 -12
- data/lib/elasticsearch/xpack/api/actions/machine_learning/params_registry.rb +50 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/post_data.rb +7 -4
- data/lib/elasticsearch/xpack/api/actions/machine_learning/revert_model_snapshot.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/set_upgrade_mode.rb +8 -6
- data/lib/elasticsearch/xpack/api/actions/machine_learning/start_datafeed.rb +8 -7
- data/lib/elasticsearch/xpack/api/actions/machine_learning/stop_datafeed.rb +8 -5
- data/lib/elasticsearch/xpack/api/actions/migration/get_assistance.rb +8 -6
- data/lib/elasticsearch/xpack/api/actions/migration/params_registry.rb +50 -0
- data/lib/elasticsearch/xpack/api/actions/migration/upgrade.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/monitoring/bulk.rb +9 -8
- data/lib/elasticsearch/xpack/api/actions/monitoring/params_registry.rb +50 -0
- data/lib/elasticsearch/xpack/api/actions/params_registry.rb +48 -0
- data/lib/elasticsearch/xpack/api/actions/rollup/params_registry.rb +50 -0
- data/lib/elasticsearch/xpack/api/actions/rollup/rollup_search.rb +7 -3
- data/lib/elasticsearch/xpack/api/actions/security/authenticate.rb +0 -1
- data/lib/elasticsearch/xpack/api/actions/security/change_password.rb +6 -4
- data/lib/elasticsearch/xpack/api/actions/security/clear_cached_realms.rb +6 -4
- data/lib/elasticsearch/xpack/api/actions/security/create_api_key.rb +6 -4
- data/lib/elasticsearch/xpack/api/actions/security/delete_privileges.rb +6 -3
- data/lib/elasticsearch/xpack/api/actions/security/delete_role.rb +6 -4
- data/lib/elasticsearch/xpack/api/actions/security/delete_role_mapping.rb +7 -5
- data/lib/elasticsearch/xpack/api/actions/security/delete_user.rb +7 -5
- data/lib/elasticsearch/xpack/api/actions/security/disable_user.rb +10 -6
- data/lib/elasticsearch/xpack/api/actions/security/enable_user.rb +10 -6
- data/lib/elasticsearch/xpack/api/actions/security/get_api_key.rb +9 -7
- data/lib/elasticsearch/xpack/api/actions/security/params_registry.rb +50 -0
- data/lib/elasticsearch/xpack/api/actions/security/put_privileges.rb +6 -4
- data/lib/elasticsearch/xpack/api/actions/security/put_role.rb +6 -4
- data/lib/elasticsearch/xpack/api/actions/security/put_role_mapping.rb +10 -6
- data/lib/elasticsearch/xpack/api/actions/security/put_user.rb +6 -4
- data/lib/elasticsearch/xpack/api/actions/sql/params_registry.rb +50 -0
- data/lib/elasticsearch/xpack/api/actions/sql/query.rb +6 -3
- data/lib/elasticsearch/xpack/api/actions/ssl/params_registry.rb +50 -0
- data/lib/elasticsearch/xpack/api/actions/usage.rb +7 -2
- data/lib/elasticsearch/xpack/api/actions/watcher/ack_watch.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/watcher/activate_watch.rb +6 -3
- data/lib/elasticsearch/xpack/api/actions/watcher/deactivate_watch.rb +6 -3
- data/lib/elasticsearch/xpack/api/actions/watcher/delete_watch.rb +7 -4
- data/lib/elasticsearch/xpack/api/actions/watcher/execute_watch.rb +6 -2
- data/lib/elasticsearch/xpack/api/actions/watcher/params_registry.rb +50 -0
- data/lib/elasticsearch/xpack/api/actions/watcher/put_watch.rb +10 -9
- data/lib/elasticsearch/xpack/api/actions/watcher/stats.rb +7 -2
- data/lib/elasticsearch/xpack/api/namespace/index_lifecycle_management.rb +22 -0
- data/lib/elasticsearch/xpack/version.rb +1 -1
- metadata +29 -3
|
@@ -17,14 +17,18 @@ module Elasticsearch
|
|
|
17
17
|
# @see https://www.elastic.co/guide/en/x-pack/current/license-management.html
|
|
18
18
|
#
|
|
19
19
|
def post(arguments={})
|
|
20
|
-
valid_params = [ :acknowledge ]
|
|
21
20
|
method = Elasticsearch::API::HTTP_PUT
|
|
22
21
|
path = "_xpack/license"
|
|
23
|
-
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments,
|
|
22
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
|
24
23
|
body = arguments[:body]
|
|
25
24
|
|
|
26
25
|
perform_request(method, path, params, body).body
|
|
27
26
|
end
|
|
27
|
+
|
|
28
|
+
# Register this action with its valid params when the module is loaded.
|
|
29
|
+
#
|
|
30
|
+
# @since 7.4.0
|
|
31
|
+
ParamsRegistry.register(:post, [ :acknowledge ].freeze)
|
|
28
32
|
end
|
|
29
33
|
end
|
|
30
34
|
end
|
|
@@ -15,15 +15,18 @@ module Elasticsearch
|
|
|
15
15
|
# @see https://www.elastic.co/guide/en/x-pack/current/license-management.html
|
|
16
16
|
#
|
|
17
17
|
def post_start_basic(arguments={})
|
|
18
|
-
valid_params = [
|
|
19
|
-
:acknowledge ]
|
|
20
18
|
method = Elasticsearch::API::HTTP_POST
|
|
21
19
|
path = "_xpack/license/start_basic"
|
|
22
|
-
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments,
|
|
20
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
|
23
21
|
body = nil
|
|
24
22
|
|
|
25
23
|
perform_request(method, path, params, body).body
|
|
26
24
|
end
|
|
25
|
+
|
|
26
|
+
# Register this action with its valid params when the module is loaded.
|
|
27
|
+
#
|
|
28
|
+
# @since 7.4.0
|
|
29
|
+
ParamsRegistry.register(:post_start_basic, [ :acknowledge ].freeze)
|
|
27
30
|
end
|
|
28
31
|
end
|
|
29
32
|
end
|
|
@@ -16,16 +16,19 @@ module Elasticsearch
|
|
|
16
16
|
# @see https://www.elastic.co/guide/en/x-pack/current/license-management.html
|
|
17
17
|
#
|
|
18
18
|
def post_start_trial(arguments={})
|
|
19
|
-
valid_params = [
|
|
20
|
-
:type,
|
|
21
|
-
:acknowledge ]
|
|
22
19
|
method = Elasticsearch::API::HTTP_POST
|
|
23
20
|
path = "_xpack/license/start_trial"
|
|
24
|
-
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments,
|
|
21
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
|
25
22
|
body = nil
|
|
26
23
|
|
|
27
24
|
perform_request(method, path, params, body).body
|
|
28
25
|
end
|
|
26
|
+
|
|
27
|
+
# Register this action with its valid params when the module is loaded.
|
|
28
|
+
#
|
|
29
|
+
# @since 7.4.0
|
|
30
|
+
ParamsRegistry.register(:post_start_trial, [ :type,
|
|
31
|
+
:acknowledge ].freeze)
|
|
29
32
|
end
|
|
30
33
|
end
|
|
31
34
|
end
|
|
@@ -19,17 +19,20 @@ module Elasticsearch
|
|
|
19
19
|
#
|
|
20
20
|
def close_job(arguments={})
|
|
21
21
|
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
|
|
22
|
-
valid_params = [
|
|
23
|
-
:allow_no_jobs,
|
|
24
|
-
:force,
|
|
25
|
-
:timeout ]
|
|
26
22
|
method = Elasticsearch::API::HTTP_POST
|
|
27
23
|
path = "_xpack/ml/anomaly_detectors/#{arguments[:job_id]}/_close"
|
|
28
|
-
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments,
|
|
24
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
|
29
25
|
body = nil
|
|
30
26
|
|
|
31
27
|
perform_request(method, path, params, body).body
|
|
32
28
|
end
|
|
29
|
+
|
|
30
|
+
# Register this action with its valid params when the module is loaded.
|
|
31
|
+
#
|
|
32
|
+
# @since 7.4.0
|
|
33
|
+
ParamsRegistry.register(:close_job, [ :allow_no_jobs,
|
|
34
|
+
:force,
|
|
35
|
+
:timeout ].freeze)
|
|
33
36
|
end
|
|
34
37
|
end
|
|
35
38
|
end
|
|
@@ -17,15 +17,18 @@ module Elasticsearch
|
|
|
17
17
|
#
|
|
18
18
|
def delete_datafeed(arguments={})
|
|
19
19
|
raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id]
|
|
20
|
-
valid_params = [
|
|
21
|
-
:force ]
|
|
22
20
|
method = Elasticsearch::API::HTTP_DELETE
|
|
23
21
|
path = "_xpack/ml/datafeeds/#{arguments[:datafeed_id]}"
|
|
24
|
-
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments,
|
|
22
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
|
25
23
|
body = nil
|
|
26
24
|
|
|
27
25
|
perform_request(method, path, params, body).body
|
|
28
26
|
end
|
|
27
|
+
|
|
28
|
+
# Register this action with its valid params when the module is loaded.
|
|
29
|
+
#
|
|
30
|
+
# @since 7.4.0
|
|
31
|
+
ParamsRegistry.register(:delete_datafeed, [ :force ].freeze)
|
|
29
32
|
end
|
|
30
33
|
end
|
|
31
34
|
end
|
|
@@ -16,16 +16,18 @@ module Elasticsearch
|
|
|
16
16
|
method = Elasticsearch::API::HTTP_DELETE
|
|
17
17
|
path = "_ml/anomaly_detectors/#{arguments[:job_id]}/_forecast/#{arguments[:forecast_id]}"
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
:forecast_id,
|
|
21
|
-
:allow_no_forecasts,
|
|
22
|
-
:timeout ]
|
|
23
|
-
|
|
24
|
-
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
|
|
19
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
|
25
20
|
body = nil
|
|
26
21
|
|
|
27
22
|
perform_request(method, path, params, body).body
|
|
28
23
|
end
|
|
24
|
+
|
|
25
|
+
# Register this action with its valid params when the module is loaded.
|
|
26
|
+
#
|
|
27
|
+
# @since 7.4.0
|
|
28
|
+
ParamsRegistry.register(:delete_forecast, [ :forecast_id,
|
|
29
|
+
:allow_no_forecasts,
|
|
30
|
+
:timeout ].freeze)
|
|
29
31
|
end
|
|
30
32
|
end
|
|
31
33
|
end
|
|
@@ -17,15 +17,18 @@ module Elasticsearch
|
|
|
17
17
|
#
|
|
18
18
|
def delete_job(arguments={})
|
|
19
19
|
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
|
|
20
|
-
valid_params = [
|
|
21
|
-
:force ]
|
|
22
20
|
method = Elasticsearch::API::HTTP_DELETE
|
|
23
21
|
path = "_xpack/ml/anomaly_detectors/#{arguments[:job_id]}"
|
|
24
|
-
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments,
|
|
22
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
|
25
23
|
body = nil
|
|
26
24
|
|
|
27
25
|
perform_request(method, path, params, body).body
|
|
28
26
|
end
|
|
27
|
+
|
|
28
|
+
# Register this action with its valid params when the module is loaded.
|
|
29
|
+
#
|
|
30
|
+
# @since 7.4.0
|
|
31
|
+
ParamsRegistry.register(:delete_job, [ :force ].freeze)
|
|
29
32
|
end
|
|
30
33
|
end
|
|
31
34
|
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Licensed to Elasticsearch B.V under one or more agreements.
|
|
2
|
+
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
|
3
|
+
# See the LICENSE file in the project root for more information
|
|
4
|
+
|
|
5
|
+
module Elasticsearch
|
|
6
|
+
module XPack
|
|
7
|
+
module API
|
|
8
|
+
module MachineLearning
|
|
9
|
+
module Actions
|
|
10
|
+
|
|
11
|
+
# Estimates memory usage for the given data frame analytics config.
|
|
12
|
+
#
|
|
13
|
+
# @option arguments [Hash] :body Memory usage estimation definition (*Required*)
|
|
14
|
+
#
|
|
15
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/estimate-memory-usage-dfanalytics.html
|
|
16
|
+
#
|
|
17
|
+
def estimate_memory_usage(arguments={})
|
|
18
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
|
19
|
+
method = Elasticsearch::API::HTTP_POST
|
|
20
|
+
path = "_ml/data_frame/analytics/_estimate_memory_usage"
|
|
21
|
+
params = {}
|
|
22
|
+
body = arguments[:body]
|
|
23
|
+
|
|
24
|
+
perform_request(method, path, params, body).body
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -23,19 +23,22 @@ module Elasticsearch
|
|
|
23
23
|
#
|
|
24
24
|
def flush_job(arguments={})
|
|
25
25
|
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
|
|
26
|
-
valid_params = [
|
|
27
|
-
:calc_interim,
|
|
28
|
-
:start,
|
|
29
|
-
:end,
|
|
30
|
-
:advance_time,
|
|
31
|
-
:skip_time ]
|
|
32
26
|
method = Elasticsearch::API::HTTP_POST
|
|
33
27
|
path = "_xpack/ml/anomaly_detectors/#{arguments[:job_id]}/_flush"
|
|
34
|
-
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments,
|
|
28
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
|
35
29
|
body = arguments[:body]
|
|
36
30
|
|
|
37
31
|
perform_request(method, path, params, body).body
|
|
38
32
|
end
|
|
33
|
+
|
|
34
|
+
# Register this action with its valid params when the module is loaded.
|
|
35
|
+
#
|
|
36
|
+
# @since 7.4.0
|
|
37
|
+
ParamsRegistry.register(:flush_job, [ :calc_interim,
|
|
38
|
+
:start,
|
|
39
|
+
:end,
|
|
40
|
+
:advance_time,
|
|
41
|
+
:skip_time ].freeze)
|
|
39
42
|
end
|
|
40
43
|
end
|
|
41
44
|
end
|
|
@@ -18,16 +18,19 @@ module Elasticsearch
|
|
|
18
18
|
#
|
|
19
19
|
def forecast(arguments={})
|
|
20
20
|
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
|
|
21
|
-
valid_params = [
|
|
22
|
-
:duration,
|
|
23
|
-
:expires_in ]
|
|
24
21
|
method = Elasticsearch::API::HTTP_POST
|
|
25
22
|
path = "_xpack/ml/anomaly_detectors/#{arguments[:job_id]}/_forecast"
|
|
26
|
-
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments,
|
|
23
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
|
27
24
|
body = nil
|
|
28
25
|
|
|
29
26
|
perform_request(method, path, params, body).body
|
|
30
27
|
end
|
|
28
|
+
|
|
29
|
+
# Register this action with its valid params when the module is loaded.
|
|
30
|
+
#
|
|
31
|
+
# @since 7.4.0
|
|
32
|
+
ParamsRegistry.register(:forecast, [ :duration,
|
|
33
|
+
:expires_in ].freeze)
|
|
31
34
|
end
|
|
32
35
|
end
|
|
33
36
|
end
|
|
@@ -27,28 +27,30 @@ module Elasticsearch
|
|
|
27
27
|
#
|
|
28
28
|
def get_buckets(arguments={})
|
|
29
29
|
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
|
|
30
|
-
valid_params = [
|
|
31
|
-
:timestamp,
|
|
32
|
-
:expand,
|
|
33
|
-
:exclude_interim,
|
|
34
|
-
:from,
|
|
35
|
-
:size,
|
|
36
|
-
:start,
|
|
37
|
-
:end,
|
|
38
|
-
:anomaly_score,
|
|
39
|
-
:sort,
|
|
40
|
-
:desc ]
|
|
41
|
-
|
|
42
30
|
arguments = arguments.clone
|
|
43
31
|
timestamp = arguments.delete(:timestamp)
|
|
44
32
|
|
|
45
33
|
method = Elasticsearch::API::HTTP_GET
|
|
46
34
|
path = Elasticsearch::API::Utils.__pathify "_xpack/ml/anomaly_detectors", arguments[:job_id], "results/buckets", timestamp
|
|
47
|
-
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments,
|
|
35
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
|
48
36
|
body = arguments[:body]
|
|
49
37
|
|
|
50
38
|
perform_request(method, path, params, body).body
|
|
51
39
|
end
|
|
40
|
+
|
|
41
|
+
# Register this action with its valid params when the module is loaded.
|
|
42
|
+
#
|
|
43
|
+
# @since 7.4.0
|
|
44
|
+
ParamsRegistry.register(:get_buckets, [ :timestamp,
|
|
45
|
+
:expand,
|
|
46
|
+
:exclude_interim,
|
|
47
|
+
:from,
|
|
48
|
+
:size,
|
|
49
|
+
:start,
|
|
50
|
+
:end,
|
|
51
|
+
:anomaly_score,
|
|
52
|
+
:sort,
|
|
53
|
+
:desc ].freeze)
|
|
52
54
|
end
|
|
53
55
|
end
|
|
54
56
|
end
|
|
@@ -21,24 +21,26 @@ module Elasticsearch
|
|
|
21
21
|
#
|
|
22
22
|
def get_calendar_events(arguments={})
|
|
23
23
|
raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id]
|
|
24
|
-
valid_params = [
|
|
25
|
-
:calendar_id,
|
|
26
|
-
:job_id,
|
|
27
|
-
:start,
|
|
28
|
-
:end,
|
|
29
|
-
:from,
|
|
30
|
-
:size ]
|
|
31
|
-
|
|
32
24
|
arguments = arguments.clone
|
|
33
25
|
calendar_id = arguments.delete(:calendar_id)
|
|
34
26
|
|
|
35
27
|
method = Elasticsearch::API::HTTP_GET
|
|
36
28
|
path = "_xpack/ml/calendars/#{calendar_id}/events"
|
|
37
|
-
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments,
|
|
29
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
|
38
30
|
body = nil
|
|
39
31
|
|
|
40
32
|
perform_request(method, path, params, body).body
|
|
41
33
|
end
|
|
34
|
+
|
|
35
|
+
# Register this action with its valid params when the module is loaded.
|
|
36
|
+
#
|
|
37
|
+
# @since 7.4.0
|
|
38
|
+
ParamsRegistry.register(:get_calendar_events, [ :calendar_id,
|
|
39
|
+
:job_id,
|
|
40
|
+
:start,
|
|
41
|
+
:end,
|
|
42
|
+
:from,
|
|
43
|
+
:size ].freeze)
|
|
42
44
|
end
|
|
43
45
|
end
|
|
44
46
|
end
|
|
@@ -17,21 +17,23 @@ module Elasticsearch
|
|
|
17
17
|
# @see [TODO]
|
|
18
18
|
#
|
|
19
19
|
def get_calendars(arguments={})
|
|
20
|
-
valid_params = [
|
|
21
|
-
:calendar_id,
|
|
22
|
-
:from,
|
|
23
|
-
:size ]
|
|
24
|
-
|
|
25
20
|
arguments = arguments.clone
|
|
26
21
|
calendar_id = arguments.delete(:calendar_id)
|
|
27
22
|
|
|
28
23
|
method = Elasticsearch::API::HTTP_GET
|
|
29
24
|
path = "_xpack/ml/calendars/#{calendar_id}"
|
|
30
|
-
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments,
|
|
25
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
|
31
26
|
body = nil
|
|
32
27
|
|
|
33
28
|
perform_request(method, path, params, body).body
|
|
34
29
|
end
|
|
30
|
+
|
|
31
|
+
# Register this action with its valid params when the module is loaded.
|
|
32
|
+
#
|
|
33
|
+
# @since 7.4.0
|
|
34
|
+
ParamsRegistry.register(:get_calendars, [ :calendar_id,
|
|
35
|
+
:from,
|
|
36
|
+
:size ].freeze)
|
|
35
37
|
end
|
|
36
38
|
end
|
|
37
39
|
end
|
|
@@ -20,16 +20,19 @@ module Elasticsearch
|
|
|
20
20
|
#
|
|
21
21
|
def get_categories(arguments={})
|
|
22
22
|
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
|
|
23
|
-
valid_params = [
|
|
24
|
-
:from,
|
|
25
|
-
:size ]
|
|
26
23
|
method = Elasticsearch::API::HTTP_GET
|
|
27
24
|
path = Elasticsearch::API::Utils.__pathify "_xpack/ml/anomaly_detectors", arguments[:job_id], "results/categories", arguments[:category_id]
|
|
28
|
-
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments,
|
|
25
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
|
29
26
|
body = arguments[:body]
|
|
30
27
|
|
|
31
28
|
perform_request(method, path, params, body).body
|
|
32
29
|
end
|
|
30
|
+
|
|
31
|
+
# Register this action with its valid params when the module is loaded.
|
|
32
|
+
#
|
|
33
|
+
# @since 7.4.0
|
|
34
|
+
ParamsRegistry.register(:get_categories, [ :from,
|
|
35
|
+
:size ].freeze)
|
|
33
36
|
end
|
|
34
37
|
end
|
|
35
38
|
end
|
|
@@ -16,16 +16,18 @@ module Elasticsearch
|
|
|
16
16
|
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html
|
|
17
17
|
#
|
|
18
18
|
def get_datafeed_stats(arguments={})
|
|
19
|
-
valid_params = [
|
|
20
|
-
:allow_no_datafeeds ]
|
|
21
|
-
|
|
22
19
|
method = Elasticsearch::API::HTTP_GET
|
|
23
20
|
path = Elasticsearch::API::Utils.__pathify "_xpack/ml/datafeeds", arguments[:datafeed_id], "/_stats"
|
|
24
|
-
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments,
|
|
21
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
|
25
22
|
body = nil
|
|
26
23
|
|
|
27
24
|
perform_request(method, path, params, body).body
|
|
28
25
|
end
|
|
26
|
+
|
|
27
|
+
# Register this action with its valid params when the module is loaded.
|
|
28
|
+
#
|
|
29
|
+
# @since 7.4.0
|
|
30
|
+
ParamsRegistry.register(:get_datafeed_stats, [ :allow_no_datafeeds ].freeze)
|
|
29
31
|
end
|
|
30
32
|
end
|
|
31
33
|
end
|
|
@@ -16,16 +16,18 @@ module Elasticsearch
|
|
|
16
16
|
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html
|
|
17
17
|
#
|
|
18
18
|
def get_datafeeds(arguments={})
|
|
19
|
-
valid_params = [
|
|
20
|
-
:allow_no_datafeeds ]
|
|
21
|
-
|
|
22
19
|
method = Elasticsearch::API::HTTP_GET
|
|
23
20
|
path = Elasticsearch::API::Utils.__pathify "_xpack/ml/datafeeds", arguments[:datafeed_id]
|
|
24
|
-
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments,
|
|
21
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
|
25
22
|
body = nil
|
|
26
23
|
|
|
27
24
|
perform_request(method, path, params, body).body
|
|
28
25
|
end
|
|
26
|
+
|
|
27
|
+
# Register this action with its valid params when the module is loaded.
|
|
28
|
+
#
|
|
29
|
+
# @since 7.4.0
|
|
30
|
+
ParamsRegistry.register(:get_datafeeds, [ :allow_no_datafeeds ].freeze)
|
|
29
31
|
end
|
|
30
32
|
end
|
|
31
33
|
end
|
|
@@ -13,16 +13,19 @@ module Elasticsearch
|
|
|
13
13
|
# @option arguments [Int] :size specifies a max number of filters to get
|
|
14
14
|
#
|
|
15
15
|
def get_filters(arguments={})
|
|
16
|
-
valid_params = [
|
|
17
|
-
:from,
|
|
18
|
-
:size ]
|
|
19
16
|
method = Elasticsearch::API::HTTP_GET
|
|
20
17
|
path = Elasticsearch::API::Utils.__pathify "_xpack/ml/filters", arguments[:filter_id]
|
|
21
|
-
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments,
|
|
18
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
|
22
19
|
body = nil
|
|
23
20
|
|
|
24
21
|
perform_request(method, path, params, body).body
|
|
25
22
|
end
|
|
23
|
+
|
|
24
|
+
# Register this action with its valid params when the module is loaded.
|
|
25
|
+
#
|
|
26
|
+
# @since 7.4.0
|
|
27
|
+
ParamsRegistry.register(:get_filters, [ :from,
|
|
28
|
+
:size ].freeze)
|
|
26
29
|
end
|
|
27
30
|
end
|
|
28
31
|
end
|