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.
Files changed (157) hide show
  1. checksums.yaml +4 -4
  2. data/lib/elasticsearch/xpack/api/actions/{data_frame/delete_data_frame_transform.rb → data_frame_transform_deprecated/delete_transform.rb} +24 -16
  3. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/get_transform.rb +55 -0
  4. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/get_transform_stats.rb +53 -0
  5. data/lib/elasticsearch/xpack/api/actions/{data_frame → data_frame_transform_deprecated}/params_registry.rb +1 -2
  6. data/lib/elasticsearch/xpack/api/actions/{data_frame/preview_data_frame_transform.rb → data_frame_transform_deprecated/preview_transform.rb} +15 -9
  7. data/lib/elasticsearch/xpack/api/actions/{data_frame/put_data_frame_transform.rb → data_frame_transform_deprecated/put_transform.rb} +23 -16
  8. data/lib/elasticsearch/xpack/api/actions/{data_frame/start_data_frame_transform.rb → data_frame_transform_deprecated/start_transform.rb} +22 -13
  9. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/stop_transform.rb +53 -0
  10. data/lib/elasticsearch/xpack/api/actions/{data_frame/update_data_frame_transform.rb → data_frame_transform_deprecated/update_transform.rb} +23 -17
  11. data/lib/elasticsearch/xpack/api/actions/graph/explore.rb +30 -16
  12. data/lib/elasticsearch/xpack/api/actions/graph/params_registry.rb +0 -1
  13. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/delete_lifecycle.rb +36 -0
  14. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/delete_policy.rb +4 -5
  15. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/explain.rb +4 -5
  16. data/lib/elasticsearch/xpack/api/actions/{migration/upgrade.rb → index_lifecycle_management/explain_lifecycle.rb} +22 -12
  17. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/get_lifecycle.rb +38 -0
  18. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/get_policy.rb +3 -5
  19. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/get_status.rb +7 -14
  20. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/move_to_step.rb +14 -18
  21. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/params_registry.rb +0 -1
  22. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/put_lifecycle.rb +37 -0
  23. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/put_policy.rb +4 -4
  24. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/remove_policy.rb +13 -15
  25. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/retry.rb +36 -0
  26. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/retry_policy.rb +5 -5
  27. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/start.rb +7 -14
  28. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/stop.rb +7 -14
  29. data/lib/elasticsearch/xpack/api/actions/info.rb +14 -13
  30. data/lib/elasticsearch/xpack/api/actions/license/delete.rb +8 -6
  31. data/lib/elasticsearch/xpack/api/actions/license/get.rb +14 -9
  32. data/lib/elasticsearch/xpack/api/actions/license/get_basic_status.rb +8 -7
  33. data/lib/elasticsearch/xpack/api/actions/license/get_trial_status.rb +8 -7
  34. data/lib/elasticsearch/xpack/api/actions/license/params_registry.rb +0 -1
  35. data/lib/elasticsearch/xpack/api/actions/license/post.rb +15 -11
  36. data/lib/elasticsearch/xpack/api/actions/license/post_start_basic.rb +13 -8
  37. data/lib/elasticsearch/xpack/api/actions/license/post_start_trial.rb +14 -9
  38. data/lib/elasticsearch/xpack/api/actions/machine_learning/close_job.rb +19 -10
  39. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_calendar.rb +12 -6
  40. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_calendar_event.rb +15 -7
  41. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_calendar_job.rb +15 -7
  42. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_data_frame_analytics.rb +36 -0
  43. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_datafeed.rb +16 -8
  44. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_expired_data.rb +10 -4
  45. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_filter.rb +15 -5
  46. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_forecast.rb +32 -14
  47. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_job.rb +18 -8
  48. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_model_snapshot.rb +15 -7
  49. data/lib/elasticsearch/xpack/api/actions/machine_learning/estimate_memory_usage.rb +7 -5
  50. data/lib/elasticsearch/xpack/api/actions/machine_learning/evaluate_data_frame.rb +32 -0
  51. data/lib/elasticsearch/xpack/api/actions/machine_learning/find_file_structure.rb +52 -8
  52. data/lib/elasticsearch/xpack/api/actions/machine_learning/flush_job.rb +22 -15
  53. data/lib/elasticsearch/xpack/api/actions/machine_learning/forecast.rb +18 -10
  54. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_buckets.rb +29 -19
  55. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_calendar_events.rb +18 -14
  56. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_calendars.rb +18 -10
  57. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_categories.rb +24 -10
  58. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_data_frame_analytics.rb +50 -0
  59. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_data_frame_analytics_stats.rb +50 -0
  60. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_datafeed_stats.rb +18 -7
  61. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_datafeeds.rb +19 -8
  62. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_filters.rb +22 -7
  63. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_influencers.rb +24 -16
  64. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_job_stats.rb +19 -8
  65. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_jobs.rb +18 -7
  66. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_model_snapshots.rb +30 -16
  67. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_overall_buckets.rb +23 -15
  68. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_records.rb +24 -16
  69. data/lib/elasticsearch/xpack/api/actions/machine_learning/info.rb +7 -6
  70. data/lib/elasticsearch/xpack/api/actions/machine_learning/open_job.rb +12 -8
  71. data/lib/elasticsearch/xpack/api/actions/machine_learning/params_registry.rb +0 -1
  72. data/lib/elasticsearch/xpack/api/actions/machine_learning/post_calendar_events.rb +13 -7
  73. data/lib/elasticsearch/xpack/api/actions/machine_learning/post_data.rb +19 -11
  74. data/lib/elasticsearch/xpack/api/actions/machine_learning/preview_datafeed.rb +12 -6
  75. data/lib/elasticsearch/xpack/api/actions/machine_learning/put_calendar.rb +12 -6
  76. data/lib/elasticsearch/xpack/api/actions/machine_learning/put_calendar_job.rb +15 -7
  77. data/lib/elasticsearch/xpack/api/actions/machine_learning/put_data_frame_analytics.rb +38 -0
  78. data/lib/elasticsearch/xpack/api/actions/machine_learning/put_datafeed.rb +13 -7
  79. data/lib/elasticsearch/xpack/api/actions/machine_learning/put_filter.rb +16 -6
  80. data/lib/elasticsearch/xpack/api/actions/machine_learning/put_job.rb +13 -7
  81. data/lib/elasticsearch/xpack/api/actions/machine_learning/revert_model_snapshot.rb +20 -9
  82. data/lib/elasticsearch/xpack/api/actions/machine_learning/set_upgrade_mode.rb +16 -13
  83. data/lib/elasticsearch/xpack/api/actions/machine_learning/start_data_frame_analytics.rb +45 -0
  84. data/lib/elasticsearch/xpack/api/actions/machine_learning/start_datafeed.rb +19 -11
  85. data/lib/elasticsearch/xpack/api/actions/machine_learning/stop_data_frame_analytics.rb +49 -0
  86. data/lib/elasticsearch/xpack/api/actions/machine_learning/stop_datafeed.rb +18 -10
  87. data/lib/elasticsearch/xpack/api/actions/machine_learning/update_datafeed.rb +12 -7
  88. data/lib/elasticsearch/xpack/api/actions/machine_learning/update_filter.rb +15 -7
  89. data/lib/elasticsearch/xpack/api/actions/machine_learning/update_job.rb +13 -7
  90. data/lib/elasticsearch/xpack/api/actions/machine_learning/update_model_snapshot.rb +15 -8
  91. data/lib/elasticsearch/xpack/api/actions/machine_learning/validate.rb +9 -4
  92. data/lib/elasticsearch/xpack/api/actions/machine_learning/validate_detector.rb +10 -4
  93. data/lib/elasticsearch/xpack/api/actions/migration/deprecations.rb +16 -8
  94. data/lib/elasticsearch/xpack/api/actions/migration/params_registry.rb +0 -1
  95. data/lib/elasticsearch/xpack/api/actions/params_registry.rb +0 -1
  96. data/lib/elasticsearch/xpack/api/actions/rollup/delete_job.rb +12 -6
  97. data/lib/elasticsearch/xpack/api/actions/rollup/get_jobs.rb +14 -5
  98. data/lib/elasticsearch/xpack/api/actions/rollup/get_rollup_caps.rb +16 -5
  99. data/lib/elasticsearch/xpack/api/actions/rollup/get_rollup_index_caps.rb +12 -6
  100. data/lib/elasticsearch/xpack/api/actions/rollup/params_registry.rb +0 -1
  101. data/lib/elasticsearch/xpack/api/actions/rollup/put_job.rb +13 -7
  102. data/lib/elasticsearch/xpack/api/actions/rollup/rollup_search.rb +31 -11
  103. data/lib/elasticsearch/xpack/api/actions/rollup/start_job.rb +12 -6
  104. data/lib/elasticsearch/xpack/api/actions/rollup/stop_job.rb +23 -7
  105. data/lib/elasticsearch/xpack/api/actions/security/authenticate.rb +8 -6
  106. data/lib/elasticsearch/xpack/api/actions/security/change_password.rb +20 -10
  107. data/lib/elasticsearch/xpack/api/actions/security/clear_cached_realms.rb +16 -11
  108. data/lib/elasticsearch/xpack/api/actions/security/clear_cached_roles.rb +13 -8
  109. data/lib/elasticsearch/xpack/api/actions/security/create_api_key.rb +16 -11
  110. data/lib/elasticsearch/xpack/api/actions/security/delete_privileges.rb +24 -9
  111. data/lib/elasticsearch/xpack/api/actions/security/delete_role.rb +20 -15
  112. data/lib/elasticsearch/xpack/api/actions/security/delete_role_mapping.rb +17 -12
  113. data/lib/elasticsearch/xpack/api/actions/security/delete_user.rb +19 -17
  114. data/lib/elasticsearch/xpack/api/actions/security/disable_user.rb +17 -13
  115. data/lib/elasticsearch/xpack/api/actions/security/enable_user.rb +17 -13
  116. data/lib/elasticsearch/xpack/api/actions/security/get_api_key.rb +21 -16
  117. data/lib/elasticsearch/xpack/api/actions/security/get_builtin_privileges.rb +6 -4
  118. data/lib/elasticsearch/xpack/api/actions/security/get_privileges.rb +21 -9
  119. data/lib/elasticsearch/xpack/api/actions/security/get_role.rb +15 -6
  120. data/lib/elasticsearch/xpack/api/actions/security/get_role_mapping.rb +15 -6
  121. data/lib/elasticsearch/xpack/api/actions/security/get_token.rb +9 -7
  122. data/lib/elasticsearch/xpack/api/actions/security/get_user.rb +15 -6
  123. data/lib/elasticsearch/xpack/api/actions/security/get_user_privileges.rb +10 -5
  124. data/lib/elasticsearch/xpack/api/actions/security/has_privileges.rb +17 -7
  125. data/lib/elasticsearch/xpack/api/actions/security/invalidate_api_key.rb +8 -6
  126. data/lib/elasticsearch/xpack/api/actions/security/invalidate_token.rb +9 -7
  127. data/lib/elasticsearch/xpack/api/actions/security/params_registry.rb +0 -1
  128. data/lib/elasticsearch/xpack/api/actions/security/put_privileges.rb +17 -9
  129. data/lib/elasticsearch/xpack/api/actions/security/put_role.rb +20 -11
  130. data/lib/elasticsearch/xpack/api/actions/security/put_role_mapping.rb +19 -16
  131. data/lib/elasticsearch/xpack/api/actions/security/put_user.rb +18 -12
  132. data/lib/elasticsearch/xpack/api/actions/sql/clear_cursor.rb +8 -6
  133. data/lib/elasticsearch/xpack/api/actions/sql/params_registry.rb +0 -1
  134. data/lib/elasticsearch/xpack/api/actions/sql/query.rb +14 -8
  135. data/lib/elasticsearch/xpack/api/actions/sql/translate.rb +8 -6
  136. data/lib/elasticsearch/xpack/api/actions/ssl/certificates.rb +10 -4
  137. data/lib/elasticsearch/xpack/api/actions/ssl/params_registry.rb +0 -1
  138. data/lib/elasticsearch/xpack/api/actions/usage.rb +14 -9
  139. data/lib/elasticsearch/xpack/api/actions/watcher/ack_watch.rb +18 -19
  140. data/lib/elasticsearch/xpack/api/actions/watcher/activate_watch.rb +12 -15
  141. data/lib/elasticsearch/xpack/api/actions/watcher/deactivate_watch.rb +12 -15
  142. data/lib/elasticsearch/xpack/api/actions/watcher/delete_watch.rb +14 -16
  143. data/lib/elasticsearch/xpack/api/actions/watcher/execute_watch.rb +19 -10
  144. data/lib/elasticsearch/xpack/api/actions/watcher/get_watch.rb +12 -7
  145. data/lib/elasticsearch/xpack/api/actions/watcher/params_registry.rb +0 -1
  146. data/lib/elasticsearch/xpack/api/actions/watcher/put_watch.rb +24 -16
  147. data/lib/elasticsearch/xpack/api/actions/watcher/start.rb +8 -7
  148. data/lib/elasticsearch/xpack/api/actions/watcher/stats.rb +27 -11
  149. data/lib/elasticsearch/xpack/api/actions/watcher/stop.rb +8 -7
  150. data/lib/elasticsearch/xpack/api/namespace/data_frame.rb +1 -1
  151. data/lib/elasticsearch/xpack/version.rb +1 -1
  152. metadata +25 -16
  153. data/lib/elasticsearch/xpack/api/actions/data_frame/get_data_frame_transform.rb +0 -43
  154. data/lib/elasticsearch/xpack/api/actions/data_frame/get_data_frame_transform_stats.rb +0 -42
  155. data/lib/elasticsearch/xpack/api/actions/data_frame/stop_data_frame_transform.rb +0 -46
  156. data/lib/elasticsearch/xpack/api/actions/migration/get_assistance.rb +0 -39
  157. data/lib/elasticsearch/xpack/api/actions/watcher/restart.rb +0 -27
@@ -7,24 +7,30 @@ module Elasticsearch
7
7
  module API
8
8
  module Rollup
9
9
  module Actions
10
-
11
10
  # TODO: Description
11
+
12
12
  #
13
- # @option arguments [String] :index The rollup index or index pattern to obtain rollup capabilities from (*Required*)
13
+ # @option arguments [String] :index The rollup index or index pattern to obtain rollup capabilities from.
14
+
14
15
  #
15
16
  # @see
16
17
  #
17
- def get_rollup_index_caps(arguments={})
18
+ def get_rollup_index_caps(arguments = {})
18
19
  raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
20
+
21
+ arguments = arguments.clone
22
+
23
+ _index = arguments.delete(:index)
24
+
19
25
  method = Elasticsearch::API::HTTP_GET
20
- path = "#{arguments[:index]}/_xpack/rollup/data"
26
+ path = "#{Elasticsearch::API::Utils.__listify(_index)}/_rollup/data"
21
27
  params = {}
22
- body = nil
23
28
 
29
+ body = nil
24
30
  perform_request(method, path, params, body).body
25
31
  end
26
- end
27
32
  end
28
33
  end
34
+ end
29
35
  end
30
36
  end
@@ -8,7 +8,6 @@ module Elasticsearch
8
8
  module Rollup
9
9
  module Actions
10
10
  module ParamsRegistry
11
-
12
11
  extend self
13
12
 
14
13
  # A Mapping of all the actions to their list of valid params.
@@ -7,26 +7,32 @@ module Elasticsearch
7
7
  module API
8
8
  module Rollup
9
9
  module Actions
10
-
11
10
  # TODO: Description
11
+
12
12
  #
13
- # @option arguments [String] :id The ID of the job to create (*Required*)
13
+ # @option arguments [String] :id The ID of the job to create
14
+
14
15
  # @option arguments [Hash] :body The job configuration (*Required*)
15
16
  #
16
17
  # @see
17
18
  #
18
- def put_job(arguments={})
19
- raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
19
+ def put_job(arguments = {})
20
20
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
21
+ raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
22
+
23
+ arguments = arguments.clone
24
+
25
+ _id = arguments.delete(:id)
26
+
21
27
  method = Elasticsearch::API::HTTP_PUT
22
- path = "_xpack/rollup/job/#{arguments[:id]}"
28
+ path = "_rollup/job/#{Elasticsearch::API::Utils.__listify(_id)}"
23
29
  params = {}
24
- body = arguments[:body]
25
30
 
31
+ body = arguments[:body]
26
32
  perform_request(method, path, params, body).body
27
33
  end
28
- end
29
34
  end
30
35
  end
36
+ end
31
37
  end
32
38
  end
@@ -7,34 +7,54 @@ module Elasticsearch
7
7
  module API
8
8
  module Rollup
9
9
  module Actions
10
-
11
10
  # TODO: Description
11
+
12
12
  #
13
- # @option arguments [String] :index The index or index-pattern (containing rollup or regular data) that should be searched (*Required*)
14
- # @option arguments [String] :type The doc type inside the index
13
+ # @option arguments [List] :index The indices or index-pattern(s) (containing rollup or regular data) that should be searched
14
+ # @option arguments [String] :type The doc type inside the index *Deprecated*
15
+ # @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response
16
+ # @option arguments [Boolean] :rest_total_hits_as_int Indicates whether hits.total should be rendered as an integer or an object in the rest search response
17
+
15
18
  # @option arguments [Hash] :body The search request body (*Required*)
16
19
  #
20
+ # *Deprecation notice*:
21
+ # Specifying types in urls has been deprecated
22
+ # Deprecated since version 7.0.0
23
+ #
24
+ #
17
25
  # @see
18
26
  #
19
- def rollup_search(arguments={})
20
- raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
27
+ def rollup_search(arguments = {})
21
28
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
29
+ raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
30
+
31
+ arguments = arguments.clone
32
+
33
+ _index = arguments.delete(:index)
34
+
35
+ _type = arguments.delete(:type)
22
36
 
23
37
  method = Elasticsearch::API::HTTP_GET
24
- path = "#{arguments[:index]}/_rollup_search"
38
+ path = if _index && _type
39
+ "#{Elasticsearch::API::Utils.__listify(_index)}/#{Elasticsearch::API::Utils.__listify(_type)}/_rollup_search"
40
+ else
41
+ "#{Elasticsearch::API::Utils.__listify(_index)}/_rollup_search"
42
+ end
25
43
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
26
- body = arguments[:body]
27
44
 
45
+ body = arguments[:body]
28
46
  perform_request(method, path, params, body).body
29
47
  end
30
48
 
31
49
  # Register this action with its valid params when the module is loaded.
32
50
  #
33
- # @since 7.4.0
34
- ParamsRegistry.register(:rollup_search, [ :typed_keys,
35
- :rest_total_hits_as_int ].freeze)
36
- end
51
+ # @since 6.2.0
52
+ ParamsRegistry.register(:rollup_search, [
53
+ :typed_keys,
54
+ :rest_total_hits_as_int
55
+ ].freeze)
37
56
  end
38
57
  end
58
+ end
39
59
  end
40
60
  end
@@ -7,24 +7,30 @@ module Elasticsearch
7
7
  module API
8
8
  module Rollup
9
9
  module Actions
10
-
11
10
  # TODO: Description
11
+
12
12
  #
13
- # @option arguments [String] :id The ID of the job to start (*Required*)
13
+ # @option arguments [String] :id The ID of the job to start
14
+
14
15
  #
15
16
  # @see
16
17
  #
17
- def start_job(arguments={})
18
+ def start_job(arguments = {})
18
19
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
20
+
21
+ arguments = arguments.clone
22
+
23
+ _id = arguments.delete(:id)
24
+
19
25
  method = Elasticsearch::API::HTTP_POST
20
- path = "_xpack/rollup/job/#{arguments[:id]}/_start"
26
+ path = "_rollup/job/#{Elasticsearch::API::Utils.__listify(_id)}/_start"
21
27
  params = {}
22
- body = nil
23
28
 
29
+ body = nil
24
30
  perform_request(method, path, params, body).body
25
31
  end
26
- end
27
32
  end
28
33
  end
34
+ end
29
35
  end
30
36
  end
@@ -7,24 +7,40 @@ module Elasticsearch
7
7
  module API
8
8
  module Rollup
9
9
  module Actions
10
-
11
10
  # TODO: Description
11
+
12
12
  #
13
- # @option arguments [String] :id The ID of the job to stop (*Required*)
13
+ # @option arguments [String] :id The ID of the job to stop
14
+ # @option arguments [Boolean] :wait_for_completion True if the API should block until the job has fully stopped, false if should be executed async. Defaults to false.
15
+ # @option arguments [Time] :timeout Block for (at maximum) the specified duration while waiting for the job to stop. Defaults to 30s.
16
+
14
17
  #
15
18
  # @see
16
19
  #
17
- def stop_job(arguments={})
20
+ def stop_job(arguments = {})
18
21
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
22
+
23
+ arguments = arguments.clone
24
+
25
+ _id = arguments.delete(:id)
26
+
19
27
  method = Elasticsearch::API::HTTP_POST
20
- path = "_xpack/rollup/job/#{arguments[:id]}/_stop"
21
- params = {}
22
- body = nil
28
+ path = "_rollup/job/#{Elasticsearch::API::Utils.__listify(_id)}/_stop"
29
+ params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
23
30
 
31
+ body = nil
24
32
  perform_request(method, path, params, body).body
25
33
  end
26
- end
34
+
35
+ # Register this action with its valid params when the module is loaded.
36
+ #
37
+ # @since 6.2.0
38
+ ParamsRegistry.register(:stop_job, [
39
+ :wait_for_completion,
40
+ :timeout
41
+ ].freeze)
27
42
  end
28
43
  end
44
+ end
29
45
  end
30
46
  end
@@ -7,21 +7,23 @@ module Elasticsearch
7
7
  module API
8
8
  module Security
9
9
  module Actions
10
+ # TODO: Description
10
11
 
11
- # Retrieve details about the currently authenticated user
12
12
  #
13
- # @see https://www.elastic.co/guide/en/x-pack/current/security-api-authenticate.html
13
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html
14
14
  #
15
- def authenticate(arguments={})
15
+ def authenticate(arguments = {})
16
+ arguments = arguments.clone
17
+
16
18
  method = Elasticsearch::API::HTTP_GET
17
- path = "_xpack/security/_authenticate"
19
+ path = "_security/_authenticate"
18
20
  params = {}
19
- body = nil
20
21
 
22
+ body = nil
21
23
  perform_request(method, path, params, body).body
22
24
  end
23
- end
24
25
  end
25
26
  end
27
+ end
26
28
  end
27
29
  end
@@ -7,34 +7,44 @@ module Elasticsearch
7
7
  module API
8
8
  module Security
9
9
  module Actions
10
+ # TODO: Description
10
11
 
11
- # Change the password of a user
12
12
  #
13
13
  # @option arguments [String] :username The username of the user to change the password for
14
+ # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
15
+ # (options: true,false,wait_for)
16
+
14
17
  # @option arguments [Hash] :body the new password for the user (*Required*)
15
- # @option arguments [Boolean] :refresh Refresh the index after performing the operation
16
18
  #
17
- # @see https://www.elastic.co/guide/en/x-pack/current/security-api-change-password.html
19
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html
18
20
  #
19
- def change_password(arguments={})
21
+ def change_password(arguments = {})
20
22
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
23
+
21
24
  arguments = arguments.clone
22
- username = arguments.delete(:username)
25
+
26
+ _username = arguments.delete(:username)
23
27
 
24
28
  method = Elasticsearch::API::HTTP_PUT
25
- path = Elasticsearch::API::Utils.__pathify "_xpack/security/user/", username, "/_password"
29
+ path = if _username
30
+ "_security/user/#{Elasticsearch::API::Utils.__listify(_username)}/_password"
31
+ else
32
+ "_security/user/_password"
33
+ end
26
34
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
27
- body = arguments[:body]
28
35
 
36
+ body = arguments[:body]
29
37
  perform_request(method, path, params, body).body
30
38
  end
31
39
 
32
40
  # Register this action with its valid params when the module is loaded.
33
41
  #
34
- # @since 7.4.0
35
- ParamsRegistry.register(:change_password, [ :refresh ].freeze)
36
- end
42
+ # @since 6.2.0
43
+ ParamsRegistry.register(:change_password, [
44
+ :refresh
45
+ ].freeze)
37
46
  end
38
47
  end
48
+ end
39
49
  end
40
50
  end
@@ -7,33 +7,38 @@ module Elasticsearch
7
7
  module API
8
8
  module Security
9
9
  module Actions
10
+ # TODO: Description
10
11
 
11
- # Clears the internal user caches for specified realms
12
12
  #
13
- # @option arguments [String] :realms Comma-separated list of realms to clear (*Required*)
14
- # @option arguments [String] :usernames Comma-separated list of usernames to clear from the cache
13
+ # @option arguments [List] :realms Comma-separated list of realms to clear
14
+ # @option arguments [List] :usernames Comma-separated list of usernames to clear from the cache
15
+
15
16
  #
16
- # @see https://www.elastic.co/guide/en/x-pack/current/security-api-clear-cache.html
17
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html
17
18
  #
18
- def clear_cached_realms(arguments={})
19
+ def clear_cached_realms(arguments = {})
19
20
  raise ArgumentError, "Required argument 'realms' missing" unless arguments[:realms]
21
+
20
22
  arguments = arguments.clone
21
- realms = arguments.delete(:realms)
23
+
24
+ _realms = arguments.delete(:realms)
22
25
 
23
26
  method = Elasticsearch::API::HTTP_POST
24
- path = Elasticsearch::API::Utils.__pathify "_xpack/security/realm/", Elasticsearch::API::Utils.__listify(realms), "_clear_cache"
27
+ path = "_security/realm/#{Elasticsearch::API::Utils.__listify(_realms)}/_clear_cache"
25
28
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
26
- body = nil
27
29
 
30
+ body = nil
28
31
  perform_request(method, path, params, body).body
29
32
  end
30
33
 
31
34
  # Register this action with its valid params when the module is loaded.
32
35
  #
33
- # @since 7.4.0
34
- ParamsRegistry.register(:clear_cached_realms, [ :usernames ].freeze)
35
- end
36
+ # @since 6.2.0
37
+ ParamsRegistry.register(:clear_cached_realms, [
38
+ :usernames
39
+ ].freeze)
36
40
  end
37
41
  end
42
+ end
38
43
  end
39
44
  end
@@ -7,25 +7,30 @@ module Elasticsearch
7
7
  module API
8
8
  module Security
9
9
  module Actions
10
+ # TODO: Description
10
11
 
11
- # Clears the internal caches for specified roles
12
12
  #
13
- # @option arguments [String] :name Role name (*Required*)
13
+ # @option arguments [List] :name Role name
14
+
14
15
  #
15
- # @see https://www.elastic.co/guide/en/x-pack/current/security-api-roles.html#security-api-clear-role-cache
16
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html
16
17
  #
17
- def clear_cached_roles(arguments={})
18
+ def clear_cached_roles(arguments = {})
18
19
  raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
19
20
 
20
- method = Elasticsearch::API::HTTP_PUT
21
- path = "_xpack/security/role/#{arguments[:name]}/_clear_cache"
21
+ arguments = arguments.clone
22
+
23
+ _name = arguments.delete(:name)
24
+
25
+ method = Elasticsearch::API::HTTP_POST
26
+ path = "_security/role/#{Elasticsearch::API::Utils.__listify(_name)}/_clear_cache"
22
27
  params = {}
23
- body = nil
24
28
 
29
+ body = nil
25
30
  perform_request(method, path, params, body).body
26
31
  end
27
- end
28
32
  end
29
33
  end
34
+ end
30
35
  end
31
36
  end
@@ -7,32 +7,37 @@ module Elasticsearch
7
7
  module API
8
8
  module Security
9
9
  module Actions
10
+ # TODO: Description
10
11
 
11
- # Creates an API key for access without requiring basic authentication.
12
12
  #
13
- # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make
14
- # this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to
15
- # search, if `false` then do nothing with refreshes.
16
- #
17
- # @option arguments [Hash] :body The api key request to create an API key. (*Required*)
13
+ # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
14
+ # (options: true,false,wait_for)
15
+
16
+ # @option arguments [Hash] :body The api key request to create an API key (*Required*)
18
17
  #
19
18
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html
20
19
  #
21
- def create_api_key(arguments={})
20
+ def create_api_key(arguments = {})
22
21
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
22
+
23
+ arguments = arguments.clone
24
+
23
25
  method = Elasticsearch::API::HTTP_PUT
24
26
  path = "_security/api_key"
25
27
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
26
28
 
27
- perform_request(method, path, params, arguments[:body]).body
29
+ body = arguments[:body]
30
+ perform_request(method, path, params, body).body
28
31
  end
29
32
 
30
33
  # Register this action with its valid params when the module is loaded.
31
34
  #
32
- # @since 7.4.0
33
- ParamsRegistry.register(:create_api_key, [ :refresh ].freeze)
34
- end
35
+ # @since 6.2.0
36
+ ParamsRegistry.register(:create_api_key, [
37
+ :refresh
38
+ ].freeze)
35
39
  end
36
40
  end
41
+ end
37
42
  end
38
43
  end