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,39 +7,53 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module Graph
|
9
9
|
module Actions
|
10
|
+
# TODO: Description
|
10
11
|
|
11
|
-
# Get structured information about the vertices and connections in a dataset
|
12
12
|
#
|
13
|
-
# @option arguments [List] :index A comma-separated list of index names to search;
|
14
|
-
#
|
15
|
-
# @option arguments [List] :type A comma-separated list of document types to search;
|
16
|
-
# leave empty to perform the operation on all types
|
17
|
-
# @option arguments [Hash] :body The Graph Query DSL definition
|
13
|
+
# @option arguments [List] :index A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
|
14
|
+
# @option arguments [List] :type A comma-separated list of document types to search; leave empty to perform the operation on all types *Deprecated*
|
18
15
|
# @option arguments [String] :routing Specific routing value
|
19
16
|
# @option arguments [Time] :timeout Explicit operation timeout
|
17
|
+
|
18
|
+
# @option arguments [Hash] :body Graph Query DSL
|
19
|
+
#
|
20
|
+
# *Deprecation notice*:
|
21
|
+
# Specifying types in urls has been deprecated
|
22
|
+
# Deprecated since version 7.0.0
|
20
23
|
#
|
21
|
-
# @see https://www.elastic.co/guide/en/graph/current/explore.html
|
22
24
|
#
|
23
|
-
|
25
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html
|
26
|
+
#
|
27
|
+
def explore(arguments = {})
|
28
|
+
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
29
|
+
|
24
30
|
arguments = arguments.clone
|
25
|
-
|
26
|
-
|
31
|
+
|
32
|
+
_index = arguments.delete(:index)
|
33
|
+
|
34
|
+
_type = arguments.delete(:type)
|
27
35
|
|
28
36
|
method = Elasticsearch::API::HTTP_GET
|
29
|
-
path =
|
37
|
+
path = if _index && _type
|
38
|
+
"#{Elasticsearch::API::Utils.__listify(_index)}/#{Elasticsearch::API::Utils.__listify(_type)}/_graph/explore"
|
39
|
+
else
|
40
|
+
"#{Elasticsearch::API::Utils.__listify(_index)}/_graph/explore"
|
41
|
+
end
|
30
42
|
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
31
|
-
body = arguments[:body]
|
32
43
|
|
44
|
+
body = arguments[:body]
|
33
45
|
perform_request(method, path, params, body).body
|
34
46
|
end
|
35
47
|
|
36
48
|
# Register this action with its valid params when the module is loaded.
|
37
49
|
#
|
38
|
-
# @since
|
39
|
-
ParamsRegistry.register(:explore, [
|
40
|
-
|
41
|
-
|
50
|
+
# @since 6.2.0
|
51
|
+
ParamsRegistry.register(:explore, [
|
52
|
+
:routing,
|
53
|
+
:timeout
|
54
|
+
].freeze)
|
42
55
|
end
|
43
56
|
end
|
57
|
+
end
|
44
58
|
end
|
45
59
|
end
|
@@ -0,0 +1,36 @@
|
|
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 IndexLifecycleManagement
|
9
|
+
module Actions
|
10
|
+
# TODO: Description
|
11
|
+
|
12
|
+
#
|
13
|
+
# @option arguments [String] :policy The name of the index lifecycle policy
|
14
|
+
|
15
|
+
#
|
16
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-delete-lifecycle.html
|
17
|
+
#
|
18
|
+
def delete_lifecycle(arguments = {})
|
19
|
+
raise ArgumentError, "Required argument 'policy' missing" unless arguments[:policy]
|
20
|
+
|
21
|
+
arguments = arguments.clone
|
22
|
+
|
23
|
+
_policy = arguments.delete(:policy)
|
24
|
+
|
25
|
+
method = Elasticsearch::API::HTTP_DELETE
|
26
|
+
path = "_ilm/policy/#{Elasticsearch::API::Utils.__listify(_policy)}"
|
27
|
+
params = {}
|
28
|
+
|
29
|
+
body = nil
|
30
|
+
perform_request(method, path, params, body).body
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -7,7 +7,6 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module IndexLifecycleManagement
|
9
9
|
module Actions
|
10
|
-
|
11
10
|
# Deletes a lifecycle policy
|
12
11
|
#
|
13
12
|
# @option arguments [String] :policy_id Identifier for the policy
|
@@ -16,8 +15,9 @@ module Elasticsearch
|
|
16
15
|
#
|
17
16
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-delete-lifecycle.html
|
18
17
|
#
|
19
|
-
def delete_policy(arguments={})
|
18
|
+
def delete_policy(arguments = {})
|
20
19
|
raise ArgumentError, "Required argument 'policy_id' missing" unless arguments[:policy_id]
|
20
|
+
|
21
21
|
method = Elasticsearch::API::HTTP_DELETE
|
22
22
|
path = Elasticsearch::API::Utils.__pathify "_ilm/policy",
|
23
23
|
Elasticsearch::API::Utils.__escape(arguments[:policy_id])
|
@@ -29,9 +29,8 @@ module Elasticsearch
|
|
29
29
|
|
30
30
|
# Register this action with its valid params when the module is loaded.
|
31
31
|
#
|
32
|
-
ParamsRegistry.register(:delete_policy, [
|
33
|
-
|
34
|
-
|
32
|
+
ParamsRegistry.register(:delete_policy, [:master_timeout,
|
33
|
+
:timeout].freeze)
|
35
34
|
end
|
36
35
|
end
|
37
36
|
end
|
@@ -7,7 +7,6 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module IndexLifecycleManagement
|
9
9
|
module Actions
|
10
|
-
|
11
10
|
# Shows an index’s current lifecycle status
|
12
11
|
#
|
13
12
|
# @option arguments [String] :index The target index (*Required*)
|
@@ -16,8 +15,9 @@ module Elasticsearch
|
|
16
15
|
#
|
17
16
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html
|
18
17
|
#
|
19
|
-
def explain(arguments={})
|
18
|
+
def explain(arguments = {})
|
20
19
|
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
20
|
+
|
21
21
|
index = Elasticsearch::API::Utils.__escape(arguments.delete(:index))
|
22
22
|
|
23
23
|
method = Elasticsearch::API::HTTP_GET
|
@@ -30,9 +30,8 @@ module Elasticsearch
|
|
30
30
|
|
31
31
|
# Register this action with its valid params when the module is loaded.
|
32
32
|
#
|
33
|
-
ParamsRegistry.register(:explain, [
|
34
|
-
|
35
|
-
|
33
|
+
ParamsRegistry.register(:explain, [:master_timeout,
|
34
|
+
:timeout].freeze)
|
36
35
|
end
|
37
36
|
end
|
38
37
|
end
|
@@ -5,32 +5,42 @@
|
|
5
5
|
module Elasticsearch
|
6
6
|
module XPack
|
7
7
|
module API
|
8
|
-
module
|
8
|
+
module IndexLifecycleManagement
|
9
9
|
module Actions
|
10
|
+
# TODO: Description
|
10
11
|
|
11
|
-
# Perform the upgrade of internal indices to make them compatible with the next major version
|
12
12
|
#
|
13
|
-
# @option arguments [String] :index The name of the index
|
14
|
-
# @option arguments [Boolean] :
|
13
|
+
# @option arguments [String] :index The name of the index to explain
|
14
|
+
# @option arguments [Boolean] :only_managed filters the indices included in the response to ones managed by ILM
|
15
|
+
# @option arguments [Boolean] :only_errors filters the indices included in the response to ones in an ILM error state, implies only_managed
|
16
|
+
|
15
17
|
#
|
16
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/
|
18
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html
|
17
19
|
#
|
18
|
-
def
|
20
|
+
def explain_lifecycle(arguments = {})
|
19
21
|
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
20
|
-
|
21
|
-
|
22
|
+
|
23
|
+
arguments = arguments.clone
|
24
|
+
|
25
|
+
_index = arguments.delete(:index)
|
26
|
+
|
27
|
+
method = Elasticsearch::API::HTTP_GET
|
28
|
+
path = "#{Elasticsearch::API::Utils.__listify(_index)}/_ilm/explain"
|
22
29
|
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
23
|
-
body = nil
|
24
30
|
|
31
|
+
body = nil
|
25
32
|
perform_request(method, path, params, body).body
|
26
33
|
end
|
27
34
|
|
28
35
|
# Register this action with its valid params when the module is loaded.
|
29
36
|
#
|
30
|
-
# @since
|
31
|
-
ParamsRegistry.register(:
|
32
|
-
|
37
|
+
# @since 6.2.0
|
38
|
+
ParamsRegistry.register(:explain_lifecycle, [
|
39
|
+
:only_managed,
|
40
|
+
:only_errors
|
41
|
+
].freeze)
|
33
42
|
end
|
34
43
|
end
|
44
|
+
end
|
35
45
|
end
|
36
46
|
end
|
@@ -0,0 +1,38 @@
|
|
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 IndexLifecycleManagement
|
9
|
+
module Actions
|
10
|
+
# TODO: Description
|
11
|
+
|
12
|
+
#
|
13
|
+
# @option arguments [String] :policy The name of the index lifecycle policy
|
14
|
+
|
15
|
+
#
|
16
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html
|
17
|
+
#
|
18
|
+
def get_lifecycle(arguments = {})
|
19
|
+
arguments = arguments.clone
|
20
|
+
|
21
|
+
_policy = arguments.delete(:policy)
|
22
|
+
|
23
|
+
method = Elasticsearch::API::HTTP_GET
|
24
|
+
path = if _policy
|
25
|
+
"_ilm/policy/#{Elasticsearch::API::Utils.__listify(_policy)}"
|
26
|
+
else
|
27
|
+
"_ilm/policy"
|
28
|
+
end
|
29
|
+
params = {}
|
30
|
+
|
31
|
+
body = nil
|
32
|
+
perform_request(method, path, params, body).body
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -7,7 +7,6 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module IndexLifecycleManagement
|
9
9
|
module Actions
|
10
|
-
|
11
10
|
# Retrieves a lifecycle policy
|
12
11
|
#
|
13
12
|
# @option arguments [String] :policy_id Identifier for the policy
|
@@ -16,7 +15,7 @@ module Elasticsearch
|
|
16
15
|
#
|
17
16
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html
|
18
17
|
#
|
19
|
-
def get_policy(arguments={})
|
18
|
+
def get_policy(arguments = {})
|
20
19
|
method = Elasticsearch::API::HTTP_GET
|
21
20
|
path = Elasticsearch::API::Utils.__pathify "_ilm/policy",
|
22
21
|
Elasticsearch::API::Utils.__escape(arguments[:policy_id])
|
@@ -28,9 +27,8 @@ module Elasticsearch
|
|
28
27
|
|
29
28
|
# Register this action with its valid params when the module is loaded.
|
30
29
|
#
|
31
|
-
ParamsRegistry.register(:get_policy, [
|
32
|
-
|
33
|
-
|
30
|
+
ParamsRegistry.register(:get_policy, [:master_timeout,
|
31
|
+
:timeout].freeze)
|
34
32
|
end
|
35
33
|
end
|
36
34
|
end
|
@@ -7,30 +7,23 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module IndexLifecycleManagement
|
9
9
|
module Actions
|
10
|
+
# TODO: Description
|
10
11
|
|
11
|
-
# Retrieves the current index lifecycle management (ILM) status
|
12
|
-
#
|
13
|
-
# @option arguments [Time] :master_timeout Specifies the period of time to wait for a connection to the master node
|
14
|
-
# @option arguments [Time] :timeout Specifies the period of time to wait for a response.
|
15
12
|
#
|
16
13
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html
|
17
14
|
#
|
18
|
-
def get_status(arguments={})
|
15
|
+
def get_status(arguments = {})
|
16
|
+
arguments = arguments.clone
|
17
|
+
|
19
18
|
method = Elasticsearch::API::HTTP_GET
|
20
19
|
path = "_ilm/status"
|
21
|
-
params =
|
22
|
-
body = nil
|
20
|
+
params = {}
|
23
21
|
|
22
|
+
body = nil
|
24
23
|
perform_request(method, path, params, body).body
|
25
24
|
end
|
26
|
-
|
27
|
-
# Register this action with its valid params when the module is loaded.
|
28
|
-
#
|
29
|
-
ParamsRegistry.register(:get_status, [ :master_timeout,
|
30
|
-
:timeout ].freeze)
|
31
|
-
|
32
|
-
end
|
33
25
|
end
|
34
26
|
end
|
27
|
+
end
|
35
28
|
end
|
36
29
|
end
|
@@ -7,35 +7,31 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module IndexLifecycleManagement
|
9
9
|
module Actions
|
10
|
+
# TODO: Description
|
10
11
|
|
11
|
-
# Triggers execution of a specific step in the lifecycle policy
|
12
12
|
#
|
13
|
-
# @option arguments [String] :index The
|
14
|
-
|
15
|
-
# @option arguments [
|
16
|
-
# @option arguments [Time] :timeout Specifies the period of time to wait for a response.
|
13
|
+
# @option arguments [String] :index The name of the index whose lifecycle step is to change
|
14
|
+
|
15
|
+
# @option arguments [Hash] :body The new lifecycle step to move to
|
17
16
|
#
|
18
17
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-move-to-step.html
|
19
18
|
#
|
20
|
-
def move_to_step(arguments={})
|
19
|
+
def move_to_step(arguments = {})
|
21
20
|
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
22
|
-
|
21
|
+
|
22
|
+
arguments = arguments.clone
|
23
|
+
|
24
|
+
_index = arguments.delete(:index)
|
25
|
+
|
23
26
|
method = Elasticsearch::API::HTTP_POST
|
24
|
-
|
25
|
-
|
26
|
-
index
|
27
|
-
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
28
|
-
body = arguments[:body]
|
27
|
+
path = "_ilm/move/#{Elasticsearch::API::Utils.__listify(_index)}"
|
28
|
+
params = {}
|
29
29
|
|
30
|
+
body = arguments[:body]
|
30
31
|
perform_request(method, path, params, body).body
|
31
32
|
end
|
32
|
-
|
33
|
-
# Register this action with its valid params when the module is loaded.
|
34
|
-
#
|
35
|
-
ParamsRegistry.register(:move_to_step, [ :master_timeout,
|
36
|
-
:timeout ].freeze)
|
37
|
-
end
|
38
33
|
end
|
39
34
|
end
|
35
|
+
end
|
40
36
|
end
|
41
37
|
end
|
@@ -0,0 +1,37 @@
|
|
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 IndexLifecycleManagement
|
9
|
+
module Actions
|
10
|
+
# TODO: Description
|
11
|
+
|
12
|
+
#
|
13
|
+
# @option arguments [String] :policy The name of the index lifecycle policy
|
14
|
+
|
15
|
+
# @option arguments [Hash] :body The lifecycle policy definition to register
|
16
|
+
#
|
17
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html
|
18
|
+
#
|
19
|
+
def put_lifecycle(arguments = {})
|
20
|
+
raise ArgumentError, "Required argument 'policy' missing" unless arguments[:policy]
|
21
|
+
|
22
|
+
arguments = arguments.clone
|
23
|
+
|
24
|
+
_policy = arguments.delete(:policy)
|
25
|
+
|
26
|
+
method = Elasticsearch::API::HTTP_PUT
|
27
|
+
path = "_ilm/policy/#{Elasticsearch::API::Utils.__listify(_policy)}"
|
28
|
+
params = {}
|
29
|
+
|
30
|
+
body = arguments[:body]
|
31
|
+
perform_request(method, path, params, body).body
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -7,7 +7,6 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module IndexLifecycleManagement
|
9
9
|
module Actions
|
10
|
-
|
11
10
|
# Register a new watch in or update an existing one
|
12
11
|
#
|
13
12
|
# @option arguments [String] :policy_id Identifier for the policy (*Required*)
|
@@ -17,9 +16,10 @@ module Elasticsearch
|
|
17
16
|
#
|
18
17
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html
|
19
18
|
#
|
20
|
-
def put_policy(arguments={})
|
19
|
+
def put_policy(arguments = {})
|
21
20
|
raise ArgumentError, "Required argument 'policy_id' missing" unless arguments[:policy_id]
|
22
21
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
22
|
+
|
23
23
|
method = Elasticsearch::API::HTTP_PUT
|
24
24
|
path = Elasticsearch::API::Utils.__pathify "_ilm/policy",
|
25
25
|
Elasticsearch::API::Utils.__escape(arguments[:policy_id])
|
@@ -31,8 +31,8 @@ module Elasticsearch
|
|
31
31
|
|
32
32
|
# Register this action with its valid params when the module is loaded.
|
33
33
|
#
|
34
|
-
ParamsRegistry.register(:put_policy, [
|
35
|
-
|
34
|
+
ParamsRegistry.register(:put_policy, [:master_timeout,
|
35
|
+
:timeout].freeze)
|
36
36
|
end
|
37
37
|
end
|
38
38
|
end
|