elasticsearch-xpack 7.6.0 → 7.7.0.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.rb +12 -0
- data/lib/elasticsearch/xpack/api/actions/async_search/delete.rb +37 -0
- data/lib/elasticsearch/xpack/api/actions/async_search/get.rb +49 -0
- data/lib/elasticsearch/xpack/api/actions/async_search/params_registry.rb +49 -0
- data/lib/elasticsearch/xpack/api/actions/async_search/submit.rb +136 -0
- data/lib/elasticsearch/xpack/api/actions/cat/ml_data_frame_analytics.rb +65 -0
- data/lib/elasticsearch/xpack/api/actions/cat/ml_datafeeds.rb +61 -0
- data/lib/elasticsearch/xpack/api/actions/cat/ml_jobs.rb +65 -0
- data/lib/elasticsearch/xpack/api/actions/cat/ml_trained_models.rb +69 -0
- data/lib/elasticsearch/xpack/api/actions/cat/params_registry.rb +49 -0
- data/lib/elasticsearch/xpack/api/actions/cat/transform.rb +64 -0
- data/lib/elasticsearch/xpack/api/actions/cat/transforms.rb +65 -0
- data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/delete_transform.rb +5 -4
- data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/get_transform.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/get_transform_stats.rb +5 -4
- data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/preview_transform.rb +6 -3
- data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/put_transform.rb +5 -4
- data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/start_transform.rb +5 -4
- data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/stop_transform.rb +5 -4
- data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/update_transform.rb +5 -4
- data/lib/elasticsearch/xpack/api/actions/graph/explore.rb +5 -4
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/delete_lifecycle.rb +5 -4
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/explain_lifecycle.rb +5 -4
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/get_lifecycle.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/get_status.rb +6 -3
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/move_to_step.rb +5 -4
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/put_lifecycle.rb +5 -4
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/remove_policy.rb +5 -4
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/retry.rb +5 -4
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/start.rb +6 -3
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/stop.rb +6 -3
- data/lib/elasticsearch/xpack/api/actions/info.rb +5 -4
- data/lib/elasticsearch/xpack/api/actions/license/delete.rb +6 -3
- data/lib/elasticsearch/xpack/api/actions/license/get.rb +5 -4
- data/lib/elasticsearch/xpack/api/actions/license/get_basic_status.rb +6 -3
- data/lib/elasticsearch/xpack/api/actions/license/get_trial_status.rb +6 -3
- data/lib/elasticsearch/xpack/api/actions/license/post.rb +5 -4
- data/lib/elasticsearch/xpack/api/actions/license/post_start_basic.rb +5 -4
- data/lib/elasticsearch/xpack/api/actions/license/post_start_trial.rb +5 -4
- data/lib/elasticsearch/xpack/api/actions/machine_learning/close_job.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_calendar.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_calendar_event.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_calendar_job.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_data_frame_analytics.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_datafeed.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_expired_data.rb +7 -4
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_filter.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_forecast.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_job.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_model_snapshot.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_trained_model.rb +5 -4
- data/lib/elasticsearch/xpack/api/actions/machine_learning/estimate_model_memory.rb +35 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/evaluate_data_frame.rb +7 -4
- data/lib/elasticsearch/xpack/api/actions/machine_learning/explain_data_frame_analytics.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/find_file_structure.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/flush_job.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/forecast.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_buckets.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_calendar_events.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_calendars.rb +7 -6
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_categories.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_data_frame_analytics.rb +7 -6
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_data_frame_analytics_stats.rb +7 -6
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_datafeed_stats.rb +7 -6
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_datafeeds.rb +7 -6
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_filters.rb +7 -6
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_influencers.rb +7 -6
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_job_stats.rb +7 -6
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_jobs.rb +7 -6
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_model_snapshots.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_overall_buckets.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_records.rb +8 -7
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_trained_models.rb +9 -6
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_trained_models_stats.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/info.rb +7 -4
- data/lib/elasticsearch/xpack/api/actions/machine_learning/open_job.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/post_calendar_events.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/post_data.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/preview_datafeed.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/put_calendar.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/put_calendar_job.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/put_data_frame_analytics.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/put_datafeed.rb +22 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/put_filter.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/put_job.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/put_trained_model.rb +6 -5
- 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 +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/start_data_frame_analytics.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/start_datafeed.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/stop_data_frame_analytics.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/stop_datafeed.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/update_datafeed.rb +22 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/update_filter.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/update_job.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/update_model_snapshot.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/validate.rb +6 -3
- data/lib/elasticsearch/xpack/api/actions/machine_learning/validate_detector.rb +6 -3
- data/lib/elasticsearch/xpack/api/actions/migration/deprecations.rb +7 -6
- data/lib/elasticsearch/xpack/api/actions/monitoring/bulk.rb +6 -4
- data/lib/elasticsearch/xpack/api/actions/rollup/delete_job.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/rollup/get_jobs.rb +7 -6
- data/lib/elasticsearch/xpack/api/actions/rollup/get_rollup_caps.rb +7 -6
- data/lib/elasticsearch/xpack/api/actions/rollup/get_rollup_index_caps.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/rollup/put_job.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/rollup/rollup_search.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/rollup/start_job.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/rollup/stop_job.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/security/authenticate.rb +6 -3
- data/lib/elasticsearch/xpack/api/actions/security/change_password.rb +5 -3
- data/lib/elasticsearch/xpack/api/actions/security/clear_cached_realms.rb +5 -4
- data/lib/elasticsearch/xpack/api/actions/security/clear_cached_roles.rb +5 -4
- data/lib/elasticsearch/xpack/api/actions/security/create_api_key.rb +5 -3
- data/lib/elasticsearch/xpack/api/actions/security/delete_privileges.rb +6 -4
- data/lib/elasticsearch/xpack/api/actions/security/delete_role.rb +5 -3
- data/lib/elasticsearch/xpack/api/actions/security/delete_role_mapping.rb +5 -3
- data/lib/elasticsearch/xpack/api/actions/security/delete_user.rb +5 -3
- data/lib/elasticsearch/xpack/api/actions/security/disable_user.rb +5 -3
- data/lib/elasticsearch/xpack/api/actions/security/enable_user.rb +5 -3
- data/lib/elasticsearch/xpack/api/actions/security/get_api_key.rb +5 -4
- data/lib/elasticsearch/xpack/api/actions/security/get_builtin_privileges.rb +6 -3
- data/lib/elasticsearch/xpack/api/actions/security/get_privileges.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/security/get_role.rb +7 -6
- data/lib/elasticsearch/xpack/api/actions/security/get_role_mapping.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/security/get_token.rb +6 -3
- data/lib/elasticsearch/xpack/api/actions/security/get_user.rb +7 -6
- data/lib/elasticsearch/xpack/api/actions/security/get_user_privileges.rb +6 -3
- data/lib/elasticsearch/xpack/api/actions/security/has_privileges.rb +5 -4
- data/lib/elasticsearch/xpack/api/actions/security/invalidate_api_key.rb +6 -3
- data/lib/elasticsearch/xpack/api/actions/security/invalidate_token.rb +6 -3
- data/lib/elasticsearch/xpack/api/actions/security/put_privileges.rb +6 -4
- data/lib/elasticsearch/xpack/api/actions/security/put_role.rb +5 -3
- data/lib/elasticsearch/xpack/api/actions/security/put_role_mapping.rb +5 -3
- data/lib/elasticsearch/xpack/api/actions/security/put_user.rb +5 -3
- data/lib/elasticsearch/xpack/api/actions/sql/clear_cursor.rb +7 -4
- data/lib/elasticsearch/xpack/api/actions/sql/query.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/sql/translate.rb +7 -4
- data/lib/elasticsearch/xpack/api/actions/ssl/certificates.rb +6 -3
- data/lib/elasticsearch/xpack/api/actions/transform/delete_transform.rb +45 -0
- data/lib/elasticsearch/xpack/api/actions/transform/get_transform.rb +51 -0
- data/lib/elasticsearch/xpack/api/actions/transform/get_transform_stats.rb +49 -0
- data/lib/elasticsearch/xpack/api/actions/transform/params_registry.rb +49 -0
- data/lib/elasticsearch/xpack/api/actions/transform/preview_transform.rb +35 -0
- data/lib/elasticsearch/xpack/api/actions/transform/put_transform.rb +47 -0
- data/lib/elasticsearch/xpack/api/actions/transform/start_transform.rb +45 -0
- data/lib/elasticsearch/xpack/api/actions/transform/stop_transform.rb +53 -0
- data/lib/elasticsearch/xpack/api/actions/transform/update_transform.rb +47 -0
- data/lib/elasticsearch/xpack/api/actions/usage.rb +5 -4
- data/lib/elasticsearch/xpack/api/actions/watcher/ack_watch.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/watcher/activate_watch.rb +5 -4
- data/lib/elasticsearch/xpack/api/actions/watcher/deactivate_watch.rb +5 -4
- data/lib/elasticsearch/xpack/api/actions/watcher/delete_watch.rb +7 -6
- data/lib/elasticsearch/xpack/api/actions/watcher/execute_watch.rb +7 -6
- data/lib/elasticsearch/xpack/api/actions/watcher/get_watch.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/watcher/put_watch.rb +6 -5
- data/lib/elasticsearch/xpack/api/actions/watcher/start.rb +7 -4
- data/lib/elasticsearch/xpack/api/actions/watcher/stats.rb +7 -6
- data/lib/elasticsearch/xpack/api/actions/watcher/stop.rb +7 -4
- data/lib/elasticsearch/xpack/api/namespace/async_search.rb +22 -0
- data/lib/elasticsearch/xpack/api/namespace/cat.rb +21 -0
- data/lib/elasticsearch/xpack/api/namespace/transform.rb +22 -0
- data/lib/elasticsearch/xpack/version.rb +1 -1
- metadata +28 -4
@@ -0,0 +1,69 @@
|
|
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 Cat
|
9
|
+
module Actions
|
10
|
+
# Gets configuration and usage information about inference trained models.
|
11
|
+
#
|
12
|
+
# @option arguments [String] :model_id The ID of the trained models stats to fetch
|
13
|
+
# @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no trained models have been specified)
|
14
|
+
# @option arguments [Int] :from skips a number of trained models
|
15
|
+
# @option arguments [Int] :size specifies a max number of trained models to get
|
16
|
+
# @option arguments [String] :bytes The unit in which to display byte values
|
17
|
+
# (options: b,k,kb,m,mb,g,gb,t,tb,p,pb)
|
18
|
+
|
19
|
+
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
|
20
|
+
# @option arguments [List] :h Comma-separated list of column names to display
|
21
|
+
# @option arguments [Boolean] :help Return help information
|
22
|
+
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
|
23
|
+
# @option arguments [String] :time The unit in which to display time values
|
24
|
+
# (options: d,h,m,s,ms,micros,nanos)
|
25
|
+
|
26
|
+
# @option arguments [Boolean] :v Verbose mode. Display column headers
|
27
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
28
|
+
#
|
29
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-trained-model.html
|
30
|
+
#
|
31
|
+
def ml_trained_models(arguments = {})
|
32
|
+
headers = arguments.delete(:headers) || {}
|
33
|
+
|
34
|
+
arguments = arguments.clone
|
35
|
+
|
36
|
+
_model_id = arguments.delete(:model_id)
|
37
|
+
|
38
|
+
method = Elasticsearch::API::HTTP_GET
|
39
|
+
path = if _model_id
|
40
|
+
"_cat/ml/trained_models/#{Elasticsearch::API::Utils.__listify(_model_id)}"
|
41
|
+
else
|
42
|
+
"_cat/ml/trained_models"
|
43
|
+
end
|
44
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
45
|
+
|
46
|
+
body = nil
|
47
|
+
perform_request(method, path, params, body, headers).body
|
48
|
+
end
|
49
|
+
|
50
|
+
# Register this action with its valid params when the module is loaded.
|
51
|
+
#
|
52
|
+
# @since 6.2.0
|
53
|
+
ParamsRegistry.register(:ml_trained_models, [
|
54
|
+
:allow_no_match,
|
55
|
+
:from,
|
56
|
+
:size,
|
57
|
+
:bytes,
|
58
|
+
:format,
|
59
|
+
:h,
|
60
|
+
:help,
|
61
|
+
:s,
|
62
|
+
:time,
|
63
|
+
:v
|
64
|
+
].freeze)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,49 @@
|
|
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 Cat
|
9
|
+
module Actions
|
10
|
+
module ParamsRegistry
|
11
|
+
extend self
|
12
|
+
|
13
|
+
# A Mapping of all the actions to their list of valid params.
|
14
|
+
#
|
15
|
+
# @since 7.4.0
|
16
|
+
PARAMS = {}
|
17
|
+
|
18
|
+
# Register an action with its list of valid params.
|
19
|
+
#
|
20
|
+
# @example Register the action.
|
21
|
+
# ParamsRegistry.register(:benchmark, [ :verbose ])
|
22
|
+
#
|
23
|
+
# @param [ Symbol ] action The action to register.
|
24
|
+
# @param [ Array[Symbol] ] valid_params The list of valid params.
|
25
|
+
#
|
26
|
+
# @since 7.4.0
|
27
|
+
def register(action, valid_params)
|
28
|
+
PARAMS[action.to_sym] = valid_params
|
29
|
+
end
|
30
|
+
|
31
|
+
# Get the list of valid params for a given action.
|
32
|
+
#
|
33
|
+
# @example Get the list of valid params.
|
34
|
+
# ParamsRegistry.get(:benchmark)
|
35
|
+
#
|
36
|
+
# @param [ Symbol ] action The action.
|
37
|
+
#
|
38
|
+
# @return [ Array<Symbol> ] The list of valid params for the action.
|
39
|
+
#
|
40
|
+
# @since 7.4.0
|
41
|
+
def get(action)
|
42
|
+
PARAMS.fetch(action, [])
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,64 @@
|
|
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 Cat
|
9
|
+
module Actions
|
10
|
+
# TODO: Description
|
11
|
+
|
12
|
+
#
|
13
|
+
# @option arguments [String] :transform_id The id of the transform for which to get stats. '_all' or '*' implies all transforms
|
14
|
+
# @option arguments [Int] :from skips a number of transform configs, defaults to 0
|
15
|
+
# @option arguments [Int] :size specifies a max number of transforms to get, defaults to 100
|
16
|
+
# @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified)
|
17
|
+
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
|
18
|
+
# @option arguments [List] :h Comma-separated list of column names to display
|
19
|
+
# @option arguments [Boolean] :help Return help information
|
20
|
+
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
|
21
|
+
# @option arguments [String] :time The unit in which to display time values
|
22
|
+
# (options: d (Days),h (Hours),m (Minutes),s (Seconds),ms (Milliseconds),micros (Microseconds),nanos (Nanoseconds))
|
23
|
+
|
24
|
+
# @option arguments [Boolean] :v Verbose mode. Display column headers
|
25
|
+
|
26
|
+
#
|
27
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-transforms.html
|
28
|
+
#
|
29
|
+
def transform(arguments = {})
|
30
|
+
arguments = arguments.clone
|
31
|
+
|
32
|
+
_transform_id = arguments.delete(:transform_id)
|
33
|
+
|
34
|
+
method = Elasticsearch::API::HTTP_GET
|
35
|
+
path = if _transform_id
|
36
|
+
"_cat/transforms/#{Elasticsearch::API::Utils.__listify(_transform_id)}"
|
37
|
+
else
|
38
|
+
"_cat/transforms"
|
39
|
+
end
|
40
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
41
|
+
|
42
|
+
body = nil
|
43
|
+
perform_request(method, path, params, body).body
|
44
|
+
end
|
45
|
+
|
46
|
+
# Register this action with its valid params when the module is loaded.
|
47
|
+
#
|
48
|
+
# @since 6.2.0
|
49
|
+
ParamsRegistry.register(:transform, [
|
50
|
+
:from,
|
51
|
+
:size,
|
52
|
+
:allow_no_match,
|
53
|
+
:format,
|
54
|
+
:h,
|
55
|
+
:help,
|
56
|
+
:s,
|
57
|
+
:time,
|
58
|
+
:v
|
59
|
+
].freeze)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,65 @@
|
|
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 Cat
|
9
|
+
module Actions
|
10
|
+
# Gets configuration and usage information about transforms.
|
11
|
+
#
|
12
|
+
# @option arguments [String] :transform_id The id of the transform for which to get stats. '_all' or '*' implies all transforms
|
13
|
+
# @option arguments [Int] :from skips a number of transform configs, defaults to 0
|
14
|
+
# @option arguments [Int] :size specifies a max number of transforms to get, defaults to 100
|
15
|
+
# @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified)
|
16
|
+
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
|
17
|
+
# @option arguments [List] :h Comma-separated list of column names to display
|
18
|
+
# @option arguments [Boolean] :help Return help information
|
19
|
+
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
|
20
|
+
# @option arguments [String] :time The unit in which to display time values
|
21
|
+
# (options: d,h,m,s,ms,micros,nanos)
|
22
|
+
|
23
|
+
# @option arguments [Boolean] :v Verbose mode. Display column headers
|
24
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
25
|
+
#
|
26
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-transforms.html
|
27
|
+
#
|
28
|
+
def transforms(arguments = {})
|
29
|
+
headers = arguments.delete(:headers) || {}
|
30
|
+
|
31
|
+
arguments = arguments.clone
|
32
|
+
|
33
|
+
_transform_id = arguments.delete(:transform_id)
|
34
|
+
|
35
|
+
method = Elasticsearch::API::HTTP_GET
|
36
|
+
path = if _transform_id
|
37
|
+
"_cat/transforms/#{Elasticsearch::API::Utils.__listify(_transform_id)}"
|
38
|
+
else
|
39
|
+
"_cat/transforms"
|
40
|
+
end
|
41
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
42
|
+
|
43
|
+
body = nil
|
44
|
+
perform_request(method, path, params, body, headers).body
|
45
|
+
end
|
46
|
+
|
47
|
+
# Register this action with its valid params when the module is loaded.
|
48
|
+
#
|
49
|
+
# @since 6.2.0
|
50
|
+
ParamsRegistry.register(:transforms, [
|
51
|
+
:from,
|
52
|
+
:size,
|
53
|
+
:allow_no_match,
|
54
|
+
:format,
|
55
|
+
:h,
|
56
|
+
:help,
|
57
|
+
:s,
|
58
|
+
:time,
|
59
|
+
:v
|
60
|
+
].freeze)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/delete_transform.rb
CHANGED
@@ -7,12 +7,11 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module DataFrameTransformDeprecated
|
9
9
|
module Actions
|
10
|
-
#
|
11
|
-
|
10
|
+
# Deletes an existing transform.
|
12
11
|
#
|
13
12
|
# @option arguments [String] :transform_id The id of the transform to delete
|
14
13
|
# @option arguments [Boolean] :force When `true`, the transform is deleted regardless of its current state. The default value is `false`, meaning that the transform must be `stopped` before it can be deleted.
|
15
|
-
|
14
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
16
15
|
#
|
17
16
|
# *Deprecation notice*:
|
18
17
|
# [_data_frame/transforms/] is deprecated, use [_transform/] in the future.
|
@@ -24,6 +23,8 @@ module Elasticsearch
|
|
24
23
|
def delete_transform(arguments = {})
|
25
24
|
raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id]
|
26
25
|
|
26
|
+
headers = arguments.delete(:headers) || {}
|
27
|
+
|
27
28
|
arguments = arguments.clone
|
28
29
|
|
29
30
|
_transform_id = arguments.delete(:transform_id)
|
@@ -33,7 +34,7 @@ module Elasticsearch
|
|
33
34
|
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
34
35
|
|
35
36
|
body = nil
|
36
|
-
perform_request(method, path, params, body).body
|
37
|
+
perform_request(method, path, params, body, headers).body
|
37
38
|
end
|
38
39
|
|
39
40
|
# Register this action with its valid params when the module is loaded.
|
@@ -7,14 +7,13 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module DataFrameTransformDeprecated
|
9
9
|
module Actions
|
10
|
-
#
|
11
|
-
|
10
|
+
# Retrieves configuration information for transforms.
|
12
11
|
#
|
13
12
|
# @option arguments [String] :transform_id The id or comma delimited list of id expressions of the transforms to get, '_all' or '*' implies get all transforms
|
14
13
|
# @option arguments [Int] :from skips a number of transform configs, defaults to 0
|
15
14
|
# @option arguments [Int] :size specifies a max number of transforms to get, defaults to 100
|
16
15
|
# @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified)
|
17
|
-
|
16
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
18
17
|
#
|
19
18
|
# *Deprecation notice*:
|
20
19
|
# [_data_frame/transforms/] is deprecated, use [_transform/] in the future.
|
@@ -24,6 +23,8 @@ module Elasticsearch
|
|
24
23
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform.html
|
25
24
|
#
|
26
25
|
def get_transform(arguments = {})
|
26
|
+
headers = arguments.delete(:headers) || {}
|
27
|
+
|
27
28
|
arguments = arguments.clone
|
28
29
|
|
29
30
|
_transform_id = arguments.delete(:transform_id)
|
@@ -33,11 +34,11 @@ module Elasticsearch
|
|
33
34
|
"_data_frame/transforms/#{Elasticsearch::API::Utils.__listify(_transform_id)}"
|
34
35
|
else
|
35
36
|
"_data_frame/transforms"
|
36
|
-
|
37
|
+
end
|
37
38
|
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
38
39
|
|
39
40
|
body = nil
|
40
|
-
perform_request(method, path, params, body).body
|
41
|
+
perform_request(method, path, params, body, headers).body
|
41
42
|
end
|
42
43
|
|
43
44
|
# Register this action with its valid params when the module is loaded.
|
data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/get_transform_stats.rb
CHANGED
@@ -7,14 +7,13 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module DataFrameTransformDeprecated
|
9
9
|
module Actions
|
10
|
-
#
|
11
|
-
|
10
|
+
# Retrieves usage information for transforms.
|
12
11
|
#
|
13
12
|
# @option arguments [String] :transform_id The id of the transform for which to get stats. '_all' or '*' implies all transforms
|
14
13
|
# @option arguments [Number] :from skips a number of transform stats, defaults to 0
|
15
14
|
# @option arguments [Number] :size specifies a max number of transform stats to get, defaults to 100
|
16
15
|
# @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified)
|
17
|
-
|
16
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
18
17
|
#
|
19
18
|
# *Deprecation notice*:
|
20
19
|
# [_data_frame/transforms/] is deprecated, use [_transform/] in the future.
|
@@ -26,6 +25,8 @@ module Elasticsearch
|
|
26
25
|
def get_transform_stats(arguments = {})
|
27
26
|
raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id]
|
28
27
|
|
28
|
+
headers = arguments.delete(:headers) || {}
|
29
|
+
|
29
30
|
arguments = arguments.clone
|
30
31
|
|
31
32
|
_transform_id = arguments.delete(:transform_id)
|
@@ -35,7 +36,7 @@ module Elasticsearch
|
|
35
36
|
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
36
37
|
|
37
38
|
body = nil
|
38
|
-
perform_request(method, path, params, body).body
|
39
|
+
perform_request(method, path, params, body, headers).body
|
39
40
|
end
|
40
41
|
|
41
42
|
# Register this action with its valid params when the module is loaded.
|
data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/preview_transform.rb
CHANGED
@@ -7,8 +7,9 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module DataFrameTransformDeprecated
|
9
9
|
module Actions
|
10
|
-
#
|
11
|
-
|
10
|
+
# Previews a transform.
|
11
|
+
#
|
12
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
12
13
|
# @option arguments [Hash] :body The definition for the transform to preview (*Required*)
|
13
14
|
#
|
14
15
|
# *Deprecation notice*:
|
@@ -21,6 +22,8 @@ module Elasticsearch
|
|
21
22
|
def preview_transform(arguments = {})
|
22
23
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
23
24
|
|
25
|
+
headers = arguments.delete(:headers) || {}
|
26
|
+
|
24
27
|
arguments = arguments.clone
|
25
28
|
|
26
29
|
method = Elasticsearch::API::HTTP_POST
|
@@ -28,7 +31,7 @@ module Elasticsearch
|
|
28
31
|
params = {}
|
29
32
|
|
30
33
|
body = arguments[:body]
|
31
|
-
perform_request(method, path, params, body).body
|
34
|
+
perform_request(method, path, params, body, headers).body
|
32
35
|
end
|
33
36
|
end
|
34
37
|
end
|
@@ -7,12 +7,11 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module DataFrameTransformDeprecated
|
9
9
|
module Actions
|
10
|
-
#
|
11
|
-
|
10
|
+
# Instantiates a transform.
|
12
11
|
#
|
13
12
|
# @option arguments [String] :transform_id The id of the new transform.
|
14
13
|
# @option arguments [Boolean] :defer_validation If validations should be deferred until transform starts, defaults to false.
|
15
|
-
|
14
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
16
15
|
# @option arguments [Hash] :body The transform definition (*Required*)
|
17
16
|
#
|
18
17
|
# *Deprecation notice*:
|
@@ -26,6 +25,8 @@ module Elasticsearch
|
|
26
25
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
27
26
|
raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id]
|
28
27
|
|
28
|
+
headers = arguments.delete(:headers) || {}
|
29
|
+
|
29
30
|
arguments = arguments.clone
|
30
31
|
|
31
32
|
_transform_id = arguments.delete(:transform_id)
|
@@ -35,7 +36,7 @@ module Elasticsearch
|
|
35
36
|
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
36
37
|
|
37
38
|
body = arguments[:body]
|
38
|
-
perform_request(method, path, params, body).body
|
39
|
+
perform_request(method, path, params, body, headers).body
|
39
40
|
end
|
40
41
|
|
41
42
|
# Register this action with its valid params when the module is loaded.
|
@@ -7,12 +7,11 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module DataFrameTransformDeprecated
|
9
9
|
module Actions
|
10
|
-
#
|
11
|
-
|
10
|
+
# Starts one or more transforms.
|
12
11
|
#
|
13
12
|
# @option arguments [String] :transform_id The id of the transform to start
|
14
13
|
# @option arguments [Time] :timeout Controls the time to wait for the transform to start
|
15
|
-
|
14
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
16
15
|
#
|
17
16
|
# *Deprecation notice*:
|
18
17
|
# [_data_frame/transforms/] is deprecated, use [_transform/] in the future.
|
@@ -24,6 +23,8 @@ module Elasticsearch
|
|
24
23
|
def start_transform(arguments = {})
|
25
24
|
raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id]
|
26
25
|
|
26
|
+
headers = arguments.delete(:headers) || {}
|
27
|
+
|
27
28
|
arguments = arguments.clone
|
28
29
|
|
29
30
|
_transform_id = arguments.delete(:transform_id)
|
@@ -33,7 +34,7 @@ module Elasticsearch
|
|
33
34
|
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
34
35
|
|
35
36
|
body = nil
|
36
|
-
perform_request(method, path, params, body).body
|
37
|
+
perform_request(method, path, params, body, headers).body
|
37
38
|
end
|
38
39
|
|
39
40
|
# Register this action with its valid params when the module is loaded.
|