elasticsearch-xpack 7.4.0 → 7.5.0.pre.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/elasticsearch/xpack/api/actions/{data_frame/delete_data_frame_transform.rb → data_frame_transform_deprecated/delete_transform.rb} +24 -16
- data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/get_transform.rb +55 -0
- data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/get_transform_stats.rb +53 -0
- data/lib/elasticsearch/xpack/api/actions/{data_frame → data_frame_transform_deprecated}/params_registry.rb +1 -2
- data/lib/elasticsearch/xpack/api/actions/{data_frame/preview_data_frame_transform.rb → data_frame_transform_deprecated/preview_transform.rb} +15 -9
- data/lib/elasticsearch/xpack/api/actions/{data_frame/put_data_frame_transform.rb → data_frame_transform_deprecated/put_transform.rb} +23 -16
- data/lib/elasticsearch/xpack/api/actions/{data_frame/start_data_frame_transform.rb → data_frame_transform_deprecated/start_transform.rb} +22 -13
- data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/stop_transform.rb +53 -0
- data/lib/elasticsearch/xpack/api/actions/{data_frame/update_data_frame_transform.rb → data_frame_transform_deprecated/update_transform.rb} +23 -17
- data/lib/elasticsearch/xpack/api/actions/graph/explore.rb +30 -16
- data/lib/elasticsearch/xpack/api/actions/graph/params_registry.rb +0 -1
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/delete_lifecycle.rb +36 -0
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/delete_policy.rb +4 -5
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/explain.rb +4 -5
- data/lib/elasticsearch/xpack/api/actions/{migration/upgrade.rb → index_lifecycle_management/explain_lifecycle.rb} +22 -12
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/get_lifecycle.rb +38 -0
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/get_policy.rb +3 -5
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/get_status.rb +7 -14
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/move_to_step.rb +14 -18
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/params_registry.rb +0 -1
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/put_lifecycle.rb +37 -0
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/put_policy.rb +4 -4
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/remove_policy.rb +13 -15
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/retry.rb +36 -0
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/retry_policy.rb +5 -5
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/start.rb +7 -14
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/stop.rb +7 -14
- data/lib/elasticsearch/xpack/api/actions/info.rb +14 -13
- data/lib/elasticsearch/xpack/api/actions/license/delete.rb +8 -6
- data/lib/elasticsearch/xpack/api/actions/license/get.rb +14 -9
- data/lib/elasticsearch/xpack/api/actions/license/get_basic_status.rb +8 -7
- data/lib/elasticsearch/xpack/api/actions/license/get_trial_status.rb +8 -7
- data/lib/elasticsearch/xpack/api/actions/license/params_registry.rb +0 -1
- data/lib/elasticsearch/xpack/api/actions/license/post.rb +15 -11
- data/lib/elasticsearch/xpack/api/actions/license/post_start_basic.rb +13 -8
- data/lib/elasticsearch/xpack/api/actions/license/post_start_trial.rb +14 -9
- data/lib/elasticsearch/xpack/api/actions/machine_learning/close_job.rb +19 -10
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_calendar.rb +12 -6
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_calendar_event.rb +15 -7
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_calendar_job.rb +15 -7
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_data_frame_analytics.rb +36 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_datafeed.rb +16 -8
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_expired_data.rb +10 -4
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_filter.rb +15 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_forecast.rb +32 -14
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_job.rb +18 -8
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_model_snapshot.rb +15 -7
- data/lib/elasticsearch/xpack/api/actions/machine_learning/estimate_memory_usage.rb +7 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/evaluate_data_frame.rb +32 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/find_file_structure.rb +52 -8
- data/lib/elasticsearch/xpack/api/actions/machine_learning/flush_job.rb +22 -15
- data/lib/elasticsearch/xpack/api/actions/machine_learning/forecast.rb +18 -10
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_buckets.rb +29 -19
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_calendar_events.rb +18 -14
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_calendars.rb +18 -10
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_categories.rb +24 -10
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_data_frame_analytics.rb +50 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_data_frame_analytics_stats.rb +50 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_datafeed_stats.rb +18 -7
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_datafeeds.rb +19 -8
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_filters.rb +22 -7
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_influencers.rb +24 -16
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_job_stats.rb +19 -8
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_jobs.rb +18 -7
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_model_snapshots.rb +30 -16
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_overall_buckets.rb +23 -15
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_records.rb +24 -16
- data/lib/elasticsearch/xpack/api/actions/machine_learning/info.rb +7 -6
- data/lib/elasticsearch/xpack/api/actions/machine_learning/open_job.rb +12 -8
- data/lib/elasticsearch/xpack/api/actions/machine_learning/params_registry.rb +0 -1
- data/lib/elasticsearch/xpack/api/actions/machine_learning/post_calendar_events.rb +13 -7
- data/lib/elasticsearch/xpack/api/actions/machine_learning/post_data.rb +19 -11
- data/lib/elasticsearch/xpack/api/actions/machine_learning/preview_datafeed.rb +12 -6
- data/lib/elasticsearch/xpack/api/actions/machine_learning/put_calendar.rb +12 -6
- data/lib/elasticsearch/xpack/api/actions/machine_learning/put_calendar_job.rb +15 -7
- data/lib/elasticsearch/xpack/api/actions/machine_learning/put_data_frame_analytics.rb +38 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/put_datafeed.rb +13 -7
- data/lib/elasticsearch/xpack/api/actions/machine_learning/put_filter.rb +16 -6
- data/lib/elasticsearch/xpack/api/actions/machine_learning/put_job.rb +13 -7
- data/lib/elasticsearch/xpack/api/actions/machine_learning/revert_model_snapshot.rb +20 -9
- data/lib/elasticsearch/xpack/api/actions/machine_learning/set_upgrade_mode.rb +16 -13
- data/lib/elasticsearch/xpack/api/actions/machine_learning/start_data_frame_analytics.rb +45 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/start_datafeed.rb +19 -11
- data/lib/elasticsearch/xpack/api/actions/machine_learning/stop_data_frame_analytics.rb +49 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/stop_datafeed.rb +18 -10
- data/lib/elasticsearch/xpack/api/actions/machine_learning/update_datafeed.rb +12 -7
- data/lib/elasticsearch/xpack/api/actions/machine_learning/update_filter.rb +15 -7
- data/lib/elasticsearch/xpack/api/actions/machine_learning/update_job.rb +13 -7
- data/lib/elasticsearch/xpack/api/actions/machine_learning/update_model_snapshot.rb +15 -8
- data/lib/elasticsearch/xpack/api/actions/machine_learning/validate.rb +9 -4
- data/lib/elasticsearch/xpack/api/actions/machine_learning/validate_detector.rb +10 -4
- data/lib/elasticsearch/xpack/api/actions/migration/deprecations.rb +16 -8
- data/lib/elasticsearch/xpack/api/actions/migration/params_registry.rb +0 -1
- data/lib/elasticsearch/xpack/api/actions/params_registry.rb +0 -1
- data/lib/elasticsearch/xpack/api/actions/rollup/delete_job.rb +12 -6
- data/lib/elasticsearch/xpack/api/actions/rollup/get_jobs.rb +14 -5
- data/lib/elasticsearch/xpack/api/actions/rollup/get_rollup_caps.rb +16 -5
- data/lib/elasticsearch/xpack/api/actions/rollup/get_rollup_index_caps.rb +12 -6
- data/lib/elasticsearch/xpack/api/actions/rollup/params_registry.rb +0 -1
- data/lib/elasticsearch/xpack/api/actions/rollup/put_job.rb +13 -7
- data/lib/elasticsearch/xpack/api/actions/rollup/rollup_search.rb +31 -11
- data/lib/elasticsearch/xpack/api/actions/rollup/start_job.rb +12 -6
- data/lib/elasticsearch/xpack/api/actions/rollup/stop_job.rb +23 -7
- data/lib/elasticsearch/xpack/api/actions/security/authenticate.rb +8 -6
- data/lib/elasticsearch/xpack/api/actions/security/change_password.rb +20 -10
- data/lib/elasticsearch/xpack/api/actions/security/clear_cached_realms.rb +16 -11
- data/lib/elasticsearch/xpack/api/actions/security/clear_cached_roles.rb +13 -8
- data/lib/elasticsearch/xpack/api/actions/security/create_api_key.rb +16 -11
- data/lib/elasticsearch/xpack/api/actions/security/delete_privileges.rb +24 -9
- data/lib/elasticsearch/xpack/api/actions/security/delete_role.rb +20 -15
- data/lib/elasticsearch/xpack/api/actions/security/delete_role_mapping.rb +17 -12
- data/lib/elasticsearch/xpack/api/actions/security/delete_user.rb +19 -17
- data/lib/elasticsearch/xpack/api/actions/security/disable_user.rb +17 -13
- data/lib/elasticsearch/xpack/api/actions/security/enable_user.rb +17 -13
- data/lib/elasticsearch/xpack/api/actions/security/get_api_key.rb +21 -16
- data/lib/elasticsearch/xpack/api/actions/security/get_builtin_privileges.rb +6 -4
- data/lib/elasticsearch/xpack/api/actions/security/get_privileges.rb +21 -9
- data/lib/elasticsearch/xpack/api/actions/security/get_role.rb +15 -6
- data/lib/elasticsearch/xpack/api/actions/security/get_role_mapping.rb +15 -6
- data/lib/elasticsearch/xpack/api/actions/security/get_token.rb +9 -7
- data/lib/elasticsearch/xpack/api/actions/security/get_user.rb +15 -6
- data/lib/elasticsearch/xpack/api/actions/security/get_user_privileges.rb +10 -5
- data/lib/elasticsearch/xpack/api/actions/security/has_privileges.rb +17 -7
- data/lib/elasticsearch/xpack/api/actions/security/invalidate_api_key.rb +8 -6
- data/lib/elasticsearch/xpack/api/actions/security/invalidate_token.rb +9 -7
- data/lib/elasticsearch/xpack/api/actions/security/params_registry.rb +0 -1
- data/lib/elasticsearch/xpack/api/actions/security/put_privileges.rb +17 -9
- data/lib/elasticsearch/xpack/api/actions/security/put_role.rb +20 -11
- data/lib/elasticsearch/xpack/api/actions/security/put_role_mapping.rb +19 -16
- data/lib/elasticsearch/xpack/api/actions/security/put_user.rb +18 -12
- data/lib/elasticsearch/xpack/api/actions/sql/clear_cursor.rb +8 -6
- data/lib/elasticsearch/xpack/api/actions/sql/params_registry.rb +0 -1
- data/lib/elasticsearch/xpack/api/actions/sql/query.rb +14 -8
- data/lib/elasticsearch/xpack/api/actions/sql/translate.rb +8 -6
- data/lib/elasticsearch/xpack/api/actions/ssl/certificates.rb +10 -4
- data/lib/elasticsearch/xpack/api/actions/ssl/params_registry.rb +0 -1
- data/lib/elasticsearch/xpack/api/actions/usage.rb +14 -9
- data/lib/elasticsearch/xpack/api/actions/watcher/ack_watch.rb +18 -19
- data/lib/elasticsearch/xpack/api/actions/watcher/activate_watch.rb +12 -15
- data/lib/elasticsearch/xpack/api/actions/watcher/deactivate_watch.rb +12 -15
- data/lib/elasticsearch/xpack/api/actions/watcher/delete_watch.rb +14 -16
- data/lib/elasticsearch/xpack/api/actions/watcher/execute_watch.rb +19 -10
- data/lib/elasticsearch/xpack/api/actions/watcher/get_watch.rb +12 -7
- data/lib/elasticsearch/xpack/api/actions/watcher/params_registry.rb +0 -1
- data/lib/elasticsearch/xpack/api/actions/watcher/put_watch.rb +24 -16
- data/lib/elasticsearch/xpack/api/actions/watcher/start.rb +8 -7
- data/lib/elasticsearch/xpack/api/actions/watcher/stats.rb +27 -11
- data/lib/elasticsearch/xpack/api/actions/watcher/stop.rb +8 -7
- data/lib/elasticsearch/xpack/api/namespace/data_frame.rb +1 -1
- data/lib/elasticsearch/xpack/version.rb +1 -1
- metadata +25 -16
- data/lib/elasticsearch/xpack/api/actions/data_frame/get_data_frame_transform.rb +0 -43
- data/lib/elasticsearch/xpack/api/actions/data_frame/get_data_frame_transform_stats.rb +0 -42
- data/lib/elasticsearch/xpack/api/actions/data_frame/stop_data_frame_transform.rb +0 -46
- data/lib/elasticsearch/xpack/api/actions/migration/get_assistance.rb +0 -39
- data/lib/elasticsearch/xpack/api/actions/watcher/restart.rb +0 -27
@@ -7,34 +7,48 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module MachineLearning
|
9
9
|
module Actions
|
10
|
+
# TODO: Description
|
10
11
|
|
11
|
-
# Retrieve job results for one or more categories
|
12
12
|
#
|
13
|
-
# @option arguments [String] :job_id The name of the job
|
13
|
+
# @option arguments [String] :job_id The name of the job
|
14
14
|
# @option arguments [Long] :category_id The identifier of the category definition of interest
|
15
|
-
# @option arguments [Hash] :body Category selection details if not provided in URI
|
16
15
|
# @option arguments [Int] :from skips a number of categories
|
17
16
|
# @option arguments [Int] :size specifies a max number of categories to get
|
17
|
+
|
18
|
+
# @option arguments [Hash] :body Category selection details if not provided in URI
|
18
19
|
#
|
19
20
|
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html
|
20
21
|
#
|
21
|
-
def get_categories(arguments={})
|
22
|
+
def get_categories(arguments = {})
|
22
23
|
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
|
24
|
+
|
25
|
+
arguments = arguments.clone
|
26
|
+
|
27
|
+
_job_id = arguments.delete(:job_id)
|
28
|
+
|
29
|
+
_category_id = arguments.delete(:category_id)
|
30
|
+
|
23
31
|
method = Elasticsearch::API::HTTP_GET
|
24
|
-
path =
|
32
|
+
path = if _job_id && _category_id
|
33
|
+
"_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/results/categories/#{Elasticsearch::API::Utils.__listify(_category_id)}"
|
34
|
+
else
|
35
|
+
"_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/results/categories"
|
36
|
+
end
|
25
37
|
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
26
|
-
body = arguments[:body]
|
27
38
|
|
39
|
+
body = arguments[:body]
|
28
40
|
perform_request(method, path, params, body).body
|
29
41
|
end
|
30
42
|
|
31
43
|
# Register this action with its valid params when the module is loaded.
|
32
44
|
#
|
33
|
-
# @since
|
34
|
-
ParamsRegistry.register(:get_categories, [
|
35
|
-
|
36
|
-
|
45
|
+
# @since 6.2.0
|
46
|
+
ParamsRegistry.register(:get_categories, [
|
47
|
+
:from,
|
48
|
+
:size
|
49
|
+
].freeze)
|
37
50
|
end
|
38
51
|
end
|
52
|
+
end
|
39
53
|
end
|
40
54
|
end
|
@@ -0,0 +1,50 @@
|
|
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
|
+
# TODO: Description
|
11
|
+
|
12
|
+
#
|
13
|
+
# @option arguments [String] :id The ID of the data frame analytics to fetch
|
14
|
+
# @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no data frame analytics. (This includes `_all` string or when no data frame analytics have been specified)
|
15
|
+
# @option arguments [Int] :from skips a number of analytics
|
16
|
+
# @option arguments [Int] :size specifies a max number of analytics to get
|
17
|
+
|
18
|
+
#
|
19
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html
|
20
|
+
#
|
21
|
+
def get_data_frame_analytics(arguments = {})
|
22
|
+
arguments = arguments.clone
|
23
|
+
|
24
|
+
_id = arguments.delete(:id)
|
25
|
+
|
26
|
+
method = Elasticsearch::API::HTTP_GET
|
27
|
+
path = if _id
|
28
|
+
"_ml/data_frame/analytics/#{Elasticsearch::API::Utils.__listify(_id)}"
|
29
|
+
else
|
30
|
+
"_ml/data_frame/analytics"
|
31
|
+
end
|
32
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
33
|
+
|
34
|
+
body = nil
|
35
|
+
perform_request(method, path, params, body).body
|
36
|
+
end
|
37
|
+
|
38
|
+
# Register this action with its valid params when the module is loaded.
|
39
|
+
#
|
40
|
+
# @since 6.2.0
|
41
|
+
ParamsRegistry.register(:get_data_frame_analytics, [
|
42
|
+
:allow_no_match,
|
43
|
+
:from,
|
44
|
+
:size
|
45
|
+
].freeze)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,50 @@
|
|
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
|
+
# TODO: Description
|
11
|
+
|
12
|
+
#
|
13
|
+
# @option arguments [String] :id The ID of the data frame analytics stats to fetch
|
14
|
+
# @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no data frame analytics. (This includes `_all` string or when no data frame analytics have been specified)
|
15
|
+
# @option arguments [Int] :from skips a number of analytics
|
16
|
+
# @option arguments [Int] :size specifies a max number of analytics to get
|
17
|
+
|
18
|
+
#
|
19
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html
|
20
|
+
#
|
21
|
+
def get_data_frame_analytics_stats(arguments = {})
|
22
|
+
arguments = arguments.clone
|
23
|
+
|
24
|
+
_id = arguments.delete(:id)
|
25
|
+
|
26
|
+
method = Elasticsearch::API::HTTP_GET
|
27
|
+
path = if _id
|
28
|
+
"_ml/data_frame/analytics/#{Elasticsearch::API::Utils.__listify(_id)}/_stats"
|
29
|
+
else
|
30
|
+
"_ml/data_frame/analytics/_stats"
|
31
|
+
end
|
32
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
33
|
+
|
34
|
+
body = nil
|
35
|
+
perform_request(method, path, params, body).body
|
36
|
+
end
|
37
|
+
|
38
|
+
# Register this action with its valid params when the module is loaded.
|
39
|
+
#
|
40
|
+
# @since 6.2.0
|
41
|
+
ParamsRegistry.register(:get_data_frame_analytics_stats, [
|
42
|
+
:allow_no_match,
|
43
|
+
:from,
|
44
|
+
:size
|
45
|
+
].freeze)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -7,29 +7,40 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module MachineLearning
|
9
9
|
module Actions
|
10
|
+
# TODO: Description
|
10
11
|
|
11
|
-
# Retrieve usage information for datafeeds
|
12
12
|
#
|
13
13
|
# @option arguments [String] :datafeed_id The ID of the datafeeds stats to fetch
|
14
14
|
# @option arguments [Boolean] :allow_no_datafeeds Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)
|
15
|
+
|
15
16
|
#
|
16
17
|
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html
|
17
18
|
#
|
18
|
-
def get_datafeed_stats(arguments={})
|
19
|
+
def get_datafeed_stats(arguments = {})
|
20
|
+
arguments = arguments.clone
|
21
|
+
|
22
|
+
_datafeed_id = arguments.delete(:datafeed_id)
|
23
|
+
|
19
24
|
method = Elasticsearch::API::HTTP_GET
|
20
|
-
path =
|
25
|
+
path = if _datafeed_id
|
26
|
+
"_ml/datafeeds/#{Elasticsearch::API::Utils.__listify(_datafeed_id)}/_stats"
|
27
|
+
else
|
28
|
+
"_ml/datafeeds/_stats"
|
29
|
+
end
|
21
30
|
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
22
|
-
body = nil
|
23
31
|
|
32
|
+
body = nil
|
24
33
|
perform_request(method, path, params, body).body
|
25
34
|
end
|
26
35
|
|
27
36
|
# Register this action with its valid params when the module is loaded.
|
28
37
|
#
|
29
|
-
# @since
|
30
|
-
ParamsRegistry.register(:get_datafeed_stats, [
|
31
|
-
|
38
|
+
# @since 6.2.0
|
39
|
+
ParamsRegistry.register(:get_datafeed_stats, [
|
40
|
+
:allow_no_datafeeds
|
41
|
+
].freeze)
|
32
42
|
end
|
33
43
|
end
|
44
|
+
end
|
34
45
|
end
|
35
46
|
end
|
@@ -7,29 +7,40 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module MachineLearning
|
9
9
|
module Actions
|
10
|
+
# TODO: Description
|
10
11
|
|
11
|
-
# Retrieve configuration information for datafeeds
|
12
12
|
#
|
13
|
-
# @option arguments [String] :datafeed_id The ID of the datafeeds
|
13
|
+
# @option arguments [String] :datafeed_id The ID of the datafeeds to fetch
|
14
14
|
# @option arguments [Boolean] :allow_no_datafeeds Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)
|
15
|
+
|
15
16
|
#
|
16
17
|
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html
|
17
18
|
#
|
18
|
-
def get_datafeeds(arguments={})
|
19
|
+
def get_datafeeds(arguments = {})
|
20
|
+
arguments = arguments.clone
|
21
|
+
|
22
|
+
_datafeed_id = arguments.delete(:datafeed_id)
|
23
|
+
|
19
24
|
method = Elasticsearch::API::HTTP_GET
|
20
|
-
path =
|
25
|
+
path = if _datafeed_id
|
26
|
+
"_ml/datafeeds/#{Elasticsearch::API::Utils.__listify(_datafeed_id)}"
|
27
|
+
else
|
28
|
+
"_ml/datafeeds"
|
29
|
+
end
|
21
30
|
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
22
|
-
body = nil
|
23
31
|
|
32
|
+
body = nil
|
24
33
|
perform_request(method, path, params, body).body
|
25
34
|
end
|
26
35
|
|
27
36
|
# Register this action with its valid params when the module is loaded.
|
28
37
|
#
|
29
|
-
# @since
|
30
|
-
ParamsRegistry.register(:get_datafeeds, [
|
31
|
-
|
38
|
+
# @since 6.2.0
|
39
|
+
ParamsRegistry.register(:get_datafeeds, [
|
40
|
+
:allow_no_datafeeds
|
41
|
+
].freeze)
|
32
42
|
end
|
33
43
|
end
|
44
|
+
end
|
34
45
|
end
|
35
46
|
end
|
@@ -7,27 +7,42 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module MachineLearning
|
9
9
|
module Actions
|
10
|
+
# TODO: Description
|
10
11
|
|
12
|
+
#
|
11
13
|
# @option arguments [String] :filter_id The ID of the filter to fetch
|
12
14
|
# @option arguments [Int] :from skips a number of filters
|
13
15
|
# @option arguments [Int] :size specifies a max number of filters to get
|
16
|
+
|
14
17
|
#
|
15
|
-
|
18
|
+
# @see [TODO]
|
19
|
+
#
|
20
|
+
def get_filters(arguments = {})
|
21
|
+
arguments = arguments.clone
|
22
|
+
|
23
|
+
_filter_id = arguments.delete(:filter_id)
|
24
|
+
|
16
25
|
method = Elasticsearch::API::HTTP_GET
|
17
|
-
path =
|
26
|
+
path = if _filter_id
|
27
|
+
"_ml/filters/#{Elasticsearch::API::Utils.__listify(_filter_id)}"
|
28
|
+
else
|
29
|
+
"_ml/filters"
|
30
|
+
end
|
18
31
|
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
19
|
-
body = nil
|
20
32
|
|
33
|
+
body = nil
|
21
34
|
perform_request(method, path, params, body).body
|
22
35
|
end
|
23
36
|
|
24
37
|
# Register this action with its valid params when the module is loaded.
|
25
38
|
#
|
26
|
-
# @since
|
27
|
-
ParamsRegistry.register(:get_filters, [
|
28
|
-
|
29
|
-
|
39
|
+
# @since 6.2.0
|
40
|
+
ParamsRegistry.register(:get_filters, [
|
41
|
+
:from,
|
42
|
+
:size
|
43
|
+
].freeze)
|
30
44
|
end
|
31
45
|
end
|
46
|
+
end
|
32
47
|
end
|
33
48
|
end
|
@@ -7,11 +7,10 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module MachineLearning
|
9
9
|
module Actions
|
10
|
+
# TODO: Description
|
10
11
|
|
11
|
-
# Retrieve job results for one or more influencers
|
12
12
|
#
|
13
|
-
# @option arguments [String] :job_id [TODO]
|
14
|
-
# @option arguments [Hash] :body Influencer selection criteria
|
13
|
+
# @option arguments [String] :job_id [TODO]
|
15
14
|
# @option arguments [Boolean] :exclude_interim Exclude interim results
|
16
15
|
# @option arguments [Int] :from skips a number of influencers
|
17
16
|
# @option arguments [Int] :size specifies a max number of influencers to get
|
@@ -20,32 +19,41 @@ module Elasticsearch
|
|
20
19
|
# @option arguments [Double] :influencer_score influencer score threshold for the requested influencers
|
21
20
|
# @option arguments [String] :sort sort field for the requested influencers
|
22
21
|
# @option arguments [Boolean] :desc whether the results should be sorted in decending order
|
22
|
+
|
23
|
+
# @option arguments [Hash] :body Influencer selection criteria
|
23
24
|
#
|
24
25
|
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html
|
25
26
|
#
|
26
|
-
def get_influencers(arguments={})
|
27
|
+
def get_influencers(arguments = {})
|
27
28
|
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
|
29
|
+
|
30
|
+
arguments = arguments.clone
|
31
|
+
|
32
|
+
_job_id = arguments.delete(:job_id)
|
33
|
+
|
28
34
|
method = Elasticsearch::API::HTTP_GET
|
29
|
-
path = "
|
35
|
+
path = "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/results/influencers"
|
30
36
|
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
31
|
-
body = arguments[:body]
|
32
37
|
|
38
|
+
body = arguments[:body]
|
33
39
|
perform_request(method, path, params, body).body
|
34
40
|
end
|
35
41
|
|
36
42
|
# Register this action with its valid params when the module is loaded.
|
37
43
|
#
|
38
|
-
# @since
|
39
|
-
ParamsRegistry.register(:get_influencers, [
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
44
|
+
# @since 6.2.0
|
45
|
+
ParamsRegistry.register(:get_influencers, [
|
46
|
+
:exclude_interim,
|
47
|
+
:from,
|
48
|
+
:size,
|
49
|
+
:start,
|
50
|
+
:end,
|
51
|
+
:influencer_score,
|
52
|
+
:sort,
|
53
|
+
:desc
|
54
|
+
].freeze)
|
48
55
|
end
|
49
56
|
end
|
57
|
+
end
|
50
58
|
end
|
51
59
|
end
|
@@ -7,29 +7,40 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module MachineLearning
|
9
9
|
module Actions
|
10
|
-
|
11
10
|
# TODO: Description
|
11
|
+
|
12
12
|
#
|
13
13
|
# @option arguments [String] :job_id The ID of the jobs stats to fetch
|
14
14
|
# @option arguments [Boolean] :allow_no_jobs Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)
|
15
|
+
|
15
16
|
#
|
16
|
-
# @see http://www.elastic.co/guide/en/
|
17
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html
|
17
18
|
#
|
18
|
-
def get_job_stats(arguments={})
|
19
|
+
def get_job_stats(arguments = {})
|
20
|
+
arguments = arguments.clone
|
21
|
+
|
22
|
+
_job_id = arguments.delete(:job_id)
|
23
|
+
|
19
24
|
method = Elasticsearch::API::HTTP_GET
|
20
|
-
path =
|
25
|
+
path = if _job_id
|
26
|
+
"_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/_stats"
|
27
|
+
else
|
28
|
+
"_ml/anomaly_detectors/_stats"
|
29
|
+
end
|
21
30
|
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
22
|
-
body = nil
|
23
31
|
|
32
|
+
body = nil
|
24
33
|
perform_request(method, path, params, body).body
|
25
34
|
end
|
26
35
|
|
27
36
|
# Register this action with its valid params when the module is loaded.
|
28
37
|
#
|
29
|
-
# @since
|
30
|
-
ParamsRegistry.register(:get_job_stats, [
|
31
|
-
|
38
|
+
# @since 6.2.0
|
39
|
+
ParamsRegistry.register(:get_job_stats, [
|
40
|
+
:allow_no_jobs
|
41
|
+
].freeze)
|
32
42
|
end
|
33
43
|
end
|
44
|
+
end
|
34
45
|
end
|
35
46
|
end
|
@@ -7,29 +7,40 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module MachineLearning
|
9
9
|
module Actions
|
10
|
+
# TODO: Description
|
10
11
|
|
11
|
-
# Retrieve configuration information for jobs
|
12
12
|
#
|
13
13
|
# @option arguments [String] :job_id The ID of the jobs to fetch
|
14
14
|
# @option arguments [Boolean] :allow_no_jobs Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)
|
15
|
+
|
15
16
|
#
|
16
17
|
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html
|
17
18
|
#
|
18
|
-
def get_jobs(arguments={})
|
19
|
+
def get_jobs(arguments = {})
|
20
|
+
arguments = arguments.clone
|
21
|
+
|
22
|
+
_job_id = arguments.delete(:job_id)
|
23
|
+
|
19
24
|
method = Elasticsearch::API::HTTP_GET
|
20
|
-
path =
|
25
|
+
path = if _job_id
|
26
|
+
"_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}"
|
27
|
+
else
|
28
|
+
"_ml/anomaly_detectors"
|
29
|
+
end
|
21
30
|
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
22
|
-
body = nil
|
23
31
|
|
32
|
+
body = nil
|
24
33
|
perform_request(method, path, params, body).body
|
25
34
|
end
|
26
35
|
|
27
36
|
# Register this action with its valid params when the module is loaded.
|
28
37
|
#
|
29
|
-
# @since
|
30
|
-
ParamsRegistry.register(:get_jobs, [
|
31
|
-
|
38
|
+
# @since 6.2.0
|
39
|
+
ParamsRegistry.register(:get_jobs, [
|
40
|
+
:allow_no_jobs
|
41
|
+
].freeze)
|
32
42
|
end
|
33
43
|
end
|
44
|
+
end
|
34
45
|
end
|
35
46
|
end
|