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.
Files changed (164) hide show
  1. checksums.yaml +4 -4
  2. data/lib/elasticsearch/xpack.rb +12 -0
  3. data/lib/elasticsearch/xpack/api/actions/async_search/delete.rb +37 -0
  4. data/lib/elasticsearch/xpack/api/actions/async_search/get.rb +49 -0
  5. data/lib/elasticsearch/xpack/api/actions/async_search/params_registry.rb +49 -0
  6. data/lib/elasticsearch/xpack/api/actions/async_search/submit.rb +136 -0
  7. data/lib/elasticsearch/xpack/api/actions/cat/ml_data_frame_analytics.rb +65 -0
  8. data/lib/elasticsearch/xpack/api/actions/cat/ml_datafeeds.rb +61 -0
  9. data/lib/elasticsearch/xpack/api/actions/cat/ml_jobs.rb +65 -0
  10. data/lib/elasticsearch/xpack/api/actions/cat/ml_trained_models.rb +69 -0
  11. data/lib/elasticsearch/xpack/api/actions/cat/params_registry.rb +49 -0
  12. data/lib/elasticsearch/xpack/api/actions/cat/transform.rb +64 -0
  13. data/lib/elasticsearch/xpack/api/actions/cat/transforms.rb +65 -0
  14. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/delete_transform.rb +5 -4
  15. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/get_transform.rb +6 -5
  16. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/get_transform_stats.rb +5 -4
  17. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/preview_transform.rb +6 -3
  18. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/put_transform.rb +5 -4
  19. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/start_transform.rb +5 -4
  20. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/stop_transform.rb +5 -4
  21. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/update_transform.rb +5 -4
  22. data/lib/elasticsearch/xpack/api/actions/graph/explore.rb +5 -4
  23. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/delete_lifecycle.rb +5 -4
  24. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/explain_lifecycle.rb +5 -4
  25. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/get_lifecycle.rb +6 -5
  26. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/get_status.rb +6 -3
  27. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/move_to_step.rb +5 -4
  28. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/put_lifecycle.rb +5 -4
  29. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/remove_policy.rb +5 -4
  30. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/retry.rb +5 -4
  31. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/start.rb +6 -3
  32. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/stop.rb +6 -3
  33. data/lib/elasticsearch/xpack/api/actions/info.rb +5 -4
  34. data/lib/elasticsearch/xpack/api/actions/license/delete.rb +6 -3
  35. data/lib/elasticsearch/xpack/api/actions/license/get.rb +5 -4
  36. data/lib/elasticsearch/xpack/api/actions/license/get_basic_status.rb +6 -3
  37. data/lib/elasticsearch/xpack/api/actions/license/get_trial_status.rb +6 -3
  38. data/lib/elasticsearch/xpack/api/actions/license/post.rb +5 -4
  39. data/lib/elasticsearch/xpack/api/actions/license/post_start_basic.rb +5 -4
  40. data/lib/elasticsearch/xpack/api/actions/license/post_start_trial.rb +5 -4
  41. data/lib/elasticsearch/xpack/api/actions/machine_learning/close_job.rb +6 -5
  42. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_calendar.rb +6 -5
  43. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_calendar_event.rb +6 -5
  44. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_calendar_job.rb +6 -5
  45. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_data_frame_analytics.rb +6 -5
  46. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_datafeed.rb +6 -5
  47. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_expired_data.rb +7 -4
  48. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_filter.rb +6 -5
  49. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_forecast.rb +6 -5
  50. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_job.rb +6 -5
  51. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_model_snapshot.rb +6 -5
  52. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_trained_model.rb +5 -4
  53. data/lib/elasticsearch/xpack/api/actions/machine_learning/estimate_model_memory.rb +35 -0
  54. data/lib/elasticsearch/xpack/api/actions/machine_learning/evaluate_data_frame.rb +7 -4
  55. data/lib/elasticsearch/xpack/api/actions/machine_learning/explain_data_frame_analytics.rb +6 -5
  56. data/lib/elasticsearch/xpack/api/actions/machine_learning/find_file_structure.rb +6 -5
  57. data/lib/elasticsearch/xpack/api/actions/machine_learning/flush_job.rb +6 -5
  58. data/lib/elasticsearch/xpack/api/actions/machine_learning/forecast.rb +6 -5
  59. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_buckets.rb +6 -5
  60. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_calendar_events.rb +6 -5
  61. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_calendars.rb +7 -6
  62. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_categories.rb +6 -5
  63. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_data_frame_analytics.rb +7 -6
  64. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_data_frame_analytics_stats.rb +7 -6
  65. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_datafeed_stats.rb +7 -6
  66. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_datafeeds.rb +7 -6
  67. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_filters.rb +7 -6
  68. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_influencers.rb +7 -6
  69. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_job_stats.rb +7 -6
  70. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_jobs.rb +7 -6
  71. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_model_snapshots.rb +6 -5
  72. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_overall_buckets.rb +6 -5
  73. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_records.rb +8 -7
  74. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_trained_models.rb +9 -6
  75. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_trained_models_stats.rb +6 -5
  76. data/lib/elasticsearch/xpack/api/actions/machine_learning/info.rb +7 -4
  77. data/lib/elasticsearch/xpack/api/actions/machine_learning/open_job.rb +6 -5
  78. data/lib/elasticsearch/xpack/api/actions/machine_learning/post_calendar_events.rb +6 -5
  79. data/lib/elasticsearch/xpack/api/actions/machine_learning/post_data.rb +6 -5
  80. data/lib/elasticsearch/xpack/api/actions/machine_learning/preview_datafeed.rb +6 -5
  81. data/lib/elasticsearch/xpack/api/actions/machine_learning/put_calendar.rb +6 -5
  82. data/lib/elasticsearch/xpack/api/actions/machine_learning/put_calendar_job.rb +6 -5
  83. data/lib/elasticsearch/xpack/api/actions/machine_learning/put_data_frame_analytics.rb +6 -5
  84. data/lib/elasticsearch/xpack/api/actions/machine_learning/put_datafeed.rb +22 -5
  85. data/lib/elasticsearch/xpack/api/actions/machine_learning/put_filter.rb +6 -5
  86. data/lib/elasticsearch/xpack/api/actions/machine_learning/put_job.rb +6 -5
  87. data/lib/elasticsearch/xpack/api/actions/machine_learning/put_trained_model.rb +6 -5
  88. data/lib/elasticsearch/xpack/api/actions/machine_learning/revert_model_snapshot.rb +6 -5
  89. data/lib/elasticsearch/xpack/api/actions/machine_learning/set_upgrade_mode.rb +6 -5
  90. data/lib/elasticsearch/xpack/api/actions/machine_learning/start_data_frame_analytics.rb +6 -5
  91. data/lib/elasticsearch/xpack/api/actions/machine_learning/start_datafeed.rb +6 -5
  92. data/lib/elasticsearch/xpack/api/actions/machine_learning/stop_data_frame_analytics.rb +6 -5
  93. data/lib/elasticsearch/xpack/api/actions/machine_learning/stop_datafeed.rb +6 -5
  94. data/lib/elasticsearch/xpack/api/actions/machine_learning/update_datafeed.rb +22 -5
  95. data/lib/elasticsearch/xpack/api/actions/machine_learning/update_filter.rb +6 -5
  96. data/lib/elasticsearch/xpack/api/actions/machine_learning/update_job.rb +6 -5
  97. data/lib/elasticsearch/xpack/api/actions/machine_learning/update_model_snapshot.rb +6 -5
  98. data/lib/elasticsearch/xpack/api/actions/machine_learning/validate.rb +6 -3
  99. data/lib/elasticsearch/xpack/api/actions/machine_learning/validate_detector.rb +6 -3
  100. data/lib/elasticsearch/xpack/api/actions/migration/deprecations.rb +7 -6
  101. data/lib/elasticsearch/xpack/api/actions/monitoring/bulk.rb +6 -4
  102. data/lib/elasticsearch/xpack/api/actions/rollup/delete_job.rb +6 -5
  103. data/lib/elasticsearch/xpack/api/actions/rollup/get_jobs.rb +7 -6
  104. data/lib/elasticsearch/xpack/api/actions/rollup/get_rollup_caps.rb +7 -6
  105. data/lib/elasticsearch/xpack/api/actions/rollup/get_rollup_index_caps.rb +6 -5
  106. data/lib/elasticsearch/xpack/api/actions/rollup/put_job.rb +6 -5
  107. data/lib/elasticsearch/xpack/api/actions/rollup/rollup_search.rb +6 -5
  108. data/lib/elasticsearch/xpack/api/actions/rollup/start_job.rb +6 -5
  109. data/lib/elasticsearch/xpack/api/actions/rollup/stop_job.rb +6 -5
  110. data/lib/elasticsearch/xpack/api/actions/security/authenticate.rb +6 -3
  111. data/lib/elasticsearch/xpack/api/actions/security/change_password.rb +5 -3
  112. data/lib/elasticsearch/xpack/api/actions/security/clear_cached_realms.rb +5 -4
  113. data/lib/elasticsearch/xpack/api/actions/security/clear_cached_roles.rb +5 -4
  114. data/lib/elasticsearch/xpack/api/actions/security/create_api_key.rb +5 -3
  115. data/lib/elasticsearch/xpack/api/actions/security/delete_privileges.rb +6 -4
  116. data/lib/elasticsearch/xpack/api/actions/security/delete_role.rb +5 -3
  117. data/lib/elasticsearch/xpack/api/actions/security/delete_role_mapping.rb +5 -3
  118. data/lib/elasticsearch/xpack/api/actions/security/delete_user.rb +5 -3
  119. data/lib/elasticsearch/xpack/api/actions/security/disable_user.rb +5 -3
  120. data/lib/elasticsearch/xpack/api/actions/security/enable_user.rb +5 -3
  121. data/lib/elasticsearch/xpack/api/actions/security/get_api_key.rb +5 -4
  122. data/lib/elasticsearch/xpack/api/actions/security/get_builtin_privileges.rb +6 -3
  123. data/lib/elasticsearch/xpack/api/actions/security/get_privileges.rb +6 -5
  124. data/lib/elasticsearch/xpack/api/actions/security/get_role.rb +7 -6
  125. data/lib/elasticsearch/xpack/api/actions/security/get_role_mapping.rb +6 -5
  126. data/lib/elasticsearch/xpack/api/actions/security/get_token.rb +6 -3
  127. data/lib/elasticsearch/xpack/api/actions/security/get_user.rb +7 -6
  128. data/lib/elasticsearch/xpack/api/actions/security/get_user_privileges.rb +6 -3
  129. data/lib/elasticsearch/xpack/api/actions/security/has_privileges.rb +5 -4
  130. data/lib/elasticsearch/xpack/api/actions/security/invalidate_api_key.rb +6 -3
  131. data/lib/elasticsearch/xpack/api/actions/security/invalidate_token.rb +6 -3
  132. data/lib/elasticsearch/xpack/api/actions/security/put_privileges.rb +6 -4
  133. data/lib/elasticsearch/xpack/api/actions/security/put_role.rb +5 -3
  134. data/lib/elasticsearch/xpack/api/actions/security/put_role_mapping.rb +5 -3
  135. data/lib/elasticsearch/xpack/api/actions/security/put_user.rb +5 -3
  136. data/lib/elasticsearch/xpack/api/actions/sql/clear_cursor.rb +7 -4
  137. data/lib/elasticsearch/xpack/api/actions/sql/query.rb +6 -5
  138. data/lib/elasticsearch/xpack/api/actions/sql/translate.rb +7 -4
  139. data/lib/elasticsearch/xpack/api/actions/ssl/certificates.rb +6 -3
  140. data/lib/elasticsearch/xpack/api/actions/transform/delete_transform.rb +45 -0
  141. data/lib/elasticsearch/xpack/api/actions/transform/get_transform.rb +51 -0
  142. data/lib/elasticsearch/xpack/api/actions/transform/get_transform_stats.rb +49 -0
  143. data/lib/elasticsearch/xpack/api/actions/transform/params_registry.rb +49 -0
  144. data/lib/elasticsearch/xpack/api/actions/transform/preview_transform.rb +35 -0
  145. data/lib/elasticsearch/xpack/api/actions/transform/put_transform.rb +47 -0
  146. data/lib/elasticsearch/xpack/api/actions/transform/start_transform.rb +45 -0
  147. data/lib/elasticsearch/xpack/api/actions/transform/stop_transform.rb +53 -0
  148. data/lib/elasticsearch/xpack/api/actions/transform/update_transform.rb +47 -0
  149. data/lib/elasticsearch/xpack/api/actions/usage.rb +5 -4
  150. data/lib/elasticsearch/xpack/api/actions/watcher/ack_watch.rb +6 -5
  151. data/lib/elasticsearch/xpack/api/actions/watcher/activate_watch.rb +5 -4
  152. data/lib/elasticsearch/xpack/api/actions/watcher/deactivate_watch.rb +5 -4
  153. data/lib/elasticsearch/xpack/api/actions/watcher/delete_watch.rb +7 -6
  154. data/lib/elasticsearch/xpack/api/actions/watcher/execute_watch.rb +7 -6
  155. data/lib/elasticsearch/xpack/api/actions/watcher/get_watch.rb +6 -5
  156. data/lib/elasticsearch/xpack/api/actions/watcher/put_watch.rb +6 -5
  157. data/lib/elasticsearch/xpack/api/actions/watcher/start.rb +7 -4
  158. data/lib/elasticsearch/xpack/api/actions/watcher/stats.rb +7 -6
  159. data/lib/elasticsearch/xpack/api/actions/watcher/stop.rb +7 -4
  160. data/lib/elasticsearch/xpack/api/namespace/async_search.rb +22 -0
  161. data/lib/elasticsearch/xpack/api/namespace/cat.rb +21 -0
  162. data/lib/elasticsearch/xpack/api/namespace/transform.rb +22 -0
  163. data/lib/elasticsearch/xpack/version.rb +1 -1
  164. metadata +28 -4
@@ -7,14 +7,13 @@ module Elasticsearch
7
7
  module API
8
8
  module Monitoring
9
9
  module Actions
10
- # TODO: Description
11
-
10
+ # Used by the monitoring features to send monitoring data.
12
11
  #
13
12
  # @option arguments [String] :type Default document type for items which don't provide one *Deprecated*
14
13
  # @option arguments [String] :system_id Identifier of the monitored system
15
14
  # @option arguments [String] :system_api_version API Version of the monitored system
16
15
  # @option arguments [String] :interval Collection interval (e.g., '10s' or '10000ms') of the payload
17
-
16
+ # @option arguments [Hash] :headers Custom HTTP headers
18
17
  # @option arguments [Hash] :body The operation definition and data (action-data pairs), separated by newlines (*Required*)
19
18
  #
20
19
  # *Deprecation notice*:
@@ -27,6 +26,8 @@ module Elasticsearch
27
26
  def bulk(arguments = {})
28
27
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
29
28
 
29
+ headers = arguments.delete(:headers) || {}
30
+
30
31
  arguments = arguments.clone
31
32
 
32
33
  _type = arguments.delete(:type)
@@ -46,7 +47,8 @@ module Elasticsearch
46
47
  payload = body
47
48
  end
48
49
 
49
- perform_request(method, path, params, payload, { "Content-Type" => "application/x-ndjson" }).body
50
+ headers.merge!("Content-Type" => "application/x-ndjson")
51
+ perform_request(method, path, params, payload, headers).body
50
52
  end
51
53
 
52
54
  # Register this action with its valid params when the module is loaded.
@@ -7,17 +7,18 @@ module Elasticsearch
7
7
  module API
8
8
  module Rollup
9
9
  module Actions
10
- # TODO: Description
11
-
10
+ # Deletes an existing rollup job.
12
11
  #
13
12
  # @option arguments [String] :id The ID of the job to delete
14
-
13
+ # @option arguments [Hash] :headers Custom HTTP headers
15
14
  #
16
- # @see
15
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-delete-job.html
17
16
  #
18
17
  def delete_job(arguments = {})
19
18
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
20
19
 
20
+ headers = arguments.delete(:headers) || {}
21
+
21
22
  arguments = arguments.clone
22
23
 
23
24
  _id = arguments.delete(:id)
@@ -27,7 +28,7 @@ module Elasticsearch
27
28
  params = {}
28
29
 
29
30
  body = nil
30
- perform_request(method, path, params, body).body
31
+ perform_request(method, path, params, body, headers).body
31
32
  end
32
33
  end
33
34
  end
@@ -7,15 +7,16 @@ module Elasticsearch
7
7
  module API
8
8
  module Rollup
9
9
  module Actions
10
- # TODO: Description
11
-
10
+ # Retrieves the configuration, stats, and status of rollup jobs.
12
11
  #
13
12
  # @option arguments [String] :id The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs
14
-
13
+ # @option arguments [Hash] :headers Custom HTTP headers
15
14
  #
16
- # @see
15
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-get-job.html
17
16
  #
18
17
  def get_jobs(arguments = {})
18
+ headers = arguments.delete(:headers) || {}
19
+
19
20
  arguments = arguments.clone
20
21
 
21
22
  _id = arguments.delete(:id)
@@ -25,11 +26,11 @@ module Elasticsearch
25
26
  "_rollup/job/#{Elasticsearch::API::Utils.__listify(_id)}"
26
27
  else
27
28
  "_rollup/job"
28
- end
29
+ end
29
30
  params = {}
30
31
 
31
32
  body = nil
32
- perform_request(method, path, params, body).body
33
+ perform_request(method, path, params, body, headers).body
33
34
  end
34
35
  end
35
36
  end
@@ -7,15 +7,16 @@ module Elasticsearch
7
7
  module API
8
8
  module Rollup
9
9
  module Actions
10
- # TODO: Description
11
-
10
+ # Returns the capabilities of any rollup jobs that have been configured for a specific index or index pattern.
12
11
  #
13
12
  # @option arguments [String] :id The ID of the index to check rollup capabilities on, or left blank for all jobs
14
-
13
+ # @option arguments [Hash] :headers Custom HTTP headers
15
14
  #
16
- # @see
15
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-get-rollup-caps.html
17
16
  #
18
17
  def get_rollup_caps(arguments = {})
18
+ headers = arguments.delete(:headers) || {}
19
+
19
20
  arguments = arguments.clone
20
21
 
21
22
  _id = arguments.delete(:id)
@@ -25,11 +26,11 @@ module Elasticsearch
25
26
  "_rollup/data/#{Elasticsearch::API::Utils.__listify(_id)}"
26
27
  else
27
28
  "_rollup/data"
28
- end
29
+ end
29
30
  params = {}
30
31
 
31
32
  body = nil
32
- perform_request(method, path, params, body).body
33
+ perform_request(method, path, params, body, headers).body
33
34
  end
34
35
  end
35
36
  end
@@ -7,17 +7,18 @@ module Elasticsearch
7
7
  module API
8
8
  module Rollup
9
9
  module Actions
10
- # TODO: Description
11
-
10
+ # Returns the rollup capabilities of all jobs inside of a rollup index (e.g. the index where rollup data is stored).
12
11
  #
13
12
  # @option arguments [String] :index The rollup index or index pattern to obtain rollup capabilities from.
14
-
13
+ # @option arguments [Hash] :headers Custom HTTP headers
15
14
  #
16
- # @see
15
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-get-rollup-index-caps.html
17
16
  #
18
17
  def get_rollup_index_caps(arguments = {})
19
18
  raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
20
19
 
20
+ headers = arguments.delete(:headers) || {}
21
+
21
22
  arguments = arguments.clone
22
23
 
23
24
  _index = arguments.delete(:index)
@@ -27,7 +28,7 @@ module Elasticsearch
27
28
  params = {}
28
29
 
29
30
  body = nil
30
- perform_request(method, path, params, body).body
31
+ perform_request(method, path, params, body, headers).body
31
32
  end
32
33
  end
33
34
  end
@@ -7,19 +7,20 @@ module Elasticsearch
7
7
  module API
8
8
  module Rollup
9
9
  module Actions
10
- # TODO: Description
11
-
10
+ # Creates a rollup job.
12
11
  #
13
12
  # @option arguments [String] :id The ID of the job to create
14
-
13
+ # @option arguments [Hash] :headers Custom HTTP headers
15
14
  # @option arguments [Hash] :body The job configuration (*Required*)
16
15
  #
17
- # @see
16
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-put-job.html
18
17
  #
19
18
  def put_job(arguments = {})
20
19
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
21
20
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
22
21
 
22
+ headers = arguments.delete(:headers) || {}
23
+
23
24
  arguments = arguments.clone
24
25
 
25
26
  _id = arguments.delete(:id)
@@ -29,7 +30,7 @@ module Elasticsearch
29
30
  params = {}
30
31
 
31
32
  body = arguments[:body]
32
- perform_request(method, path, params, body).body
33
+ perform_request(method, path, params, body, headers).body
33
34
  end
34
35
  end
35
36
  end
@@ -7,14 +7,13 @@ module Elasticsearch
7
7
  module API
8
8
  module Rollup
9
9
  module Actions
10
- # TODO: Description
11
-
10
+ # Enables searching rolled-up data using the standard query DSL.
12
11
  #
13
12
  # @option arguments [List] :index The indices or index-pattern(s) (containing rollup or regular data) that should be searched
14
13
  # @option arguments [String] :type The doc type inside the index *Deprecated*
15
14
  # @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response
16
15
  # @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
-
16
+ # @option arguments [Hash] :headers Custom HTTP headers
18
17
  # @option arguments [Hash] :body The search request body (*Required*)
19
18
  #
20
19
  # *Deprecation notice*:
@@ -22,12 +21,14 @@ module Elasticsearch
22
21
  # Deprecated since version 7.0.0
23
22
  #
24
23
  #
25
- # @see
24
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-search.html
26
25
  #
27
26
  def rollup_search(arguments = {})
28
27
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
29
28
  raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
30
29
 
30
+ headers = arguments.delete(:headers) || {}
31
+
31
32
  arguments = arguments.clone
32
33
 
33
34
  _index = arguments.delete(:index)
@@ -43,7 +44,7 @@ module Elasticsearch
43
44
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
44
45
 
45
46
  body = arguments[:body]
46
- perform_request(method, path, params, body).body
47
+ perform_request(method, path, params, body, headers).body
47
48
  end
48
49
 
49
50
  # Register this action with its valid params when the module is loaded.
@@ -7,17 +7,18 @@ module Elasticsearch
7
7
  module API
8
8
  module Rollup
9
9
  module Actions
10
- # TODO: Description
11
-
10
+ # Starts an existing, stopped rollup job.
12
11
  #
13
12
  # @option arguments [String] :id The ID of the job to start
14
-
13
+ # @option arguments [Hash] :headers Custom HTTP headers
15
14
  #
16
- # @see
15
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-start-job.html
17
16
  #
18
17
  def start_job(arguments = {})
19
18
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
20
19
 
20
+ headers = arguments.delete(:headers) || {}
21
+
21
22
  arguments = arguments.clone
22
23
 
23
24
  _id = arguments.delete(:id)
@@ -27,7 +28,7 @@ module Elasticsearch
27
28
  params = {}
28
29
 
29
30
  body = nil
30
- perform_request(method, path, params, body).body
31
+ perform_request(method, path, params, body, headers).body
31
32
  end
32
33
  end
33
34
  end
@@ -7,19 +7,20 @@ module Elasticsearch
7
7
  module API
8
8
  module Rollup
9
9
  module Actions
10
- # TODO: Description
11
-
10
+ # Stops an existing, started rollup job.
12
11
  #
13
12
  # @option arguments [String] :id The ID of the job to stop
14
13
  # @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
14
  # @option arguments [Time] :timeout Block for (at maximum) the specified duration while waiting for the job to stop. Defaults to 30s.
16
-
15
+ # @option arguments [Hash] :headers Custom HTTP headers
17
16
  #
18
- # @see
17
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-stop-job.html
19
18
  #
20
19
  def stop_job(arguments = {})
21
20
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
22
21
 
22
+ headers = arguments.delete(:headers) || {}
23
+
23
24
  arguments = arguments.clone
24
25
 
25
26
  _id = arguments.delete(:id)
@@ -29,7 +30,7 @@ module Elasticsearch
29
30
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
30
31
 
31
32
  body = nil
32
- perform_request(method, path, params, body).body
33
+ perform_request(method, path, params, body, headers).body
33
34
  end
34
35
 
35
36
  # Register this action with its valid params when the module is loaded.
@@ -7,12 +7,15 @@ module Elasticsearch
7
7
  module API
8
8
  module Security
9
9
  module Actions
10
- # TODO: Description
11
-
10
+ # Enables authentication as a user and retrieve information about the authenticated user.
11
+ #
12
+ # @option arguments [Hash] :headers Custom HTTP headers
12
13
  #
13
14
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html
14
15
  #
15
16
  def authenticate(arguments = {})
17
+ headers = arguments.delete(:headers) || {}
18
+
16
19
  arguments = arguments.clone
17
20
 
18
21
  method = Elasticsearch::API::HTTP_GET
@@ -20,7 +23,7 @@ module Elasticsearch
20
23
  params = {}
21
24
 
22
25
  body = nil
23
- perform_request(method, path, params, body).body
26
+ perform_request(method, path, params, body, headers).body
24
27
  end
25
28
  end
26
29
  end
@@ -7,13 +7,13 @@ module Elasticsearch
7
7
  module API
8
8
  module Security
9
9
  module Actions
10
- # TODO: Description
11
-
10
+ # Changes the passwords of users in the native realm and built-in users.
12
11
  #
13
12
  # @option arguments [String] :username The username of the user to change the password for
14
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.
15
14
  # (options: true,false,wait_for)
16
15
 
16
+ # @option arguments [Hash] :headers Custom HTTP headers
17
17
  # @option arguments [Hash] :body the new password for the user (*Required*)
18
18
  #
19
19
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html
@@ -21,6 +21,8 @@ module Elasticsearch
21
21
  def change_password(arguments = {})
22
22
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
23
23
 
24
+ headers = arguments.delete(:headers) || {}
25
+
24
26
  arguments = arguments.clone
25
27
 
26
28
  _username = arguments.delete(:username)
@@ -34,7 +36,7 @@ module Elasticsearch
34
36
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
35
37
 
36
38
  body = arguments[:body]
37
- perform_request(method, path, params, body).body
39
+ perform_request(method, path, params, body, headers).body
38
40
  end
39
41
 
40
42
  # Register this action with its valid params when the module is loaded.
@@ -7,18 +7,19 @@ module Elasticsearch
7
7
  module API
8
8
  module Security
9
9
  module Actions
10
- # TODO: Description
11
-
10
+ # Evicts users from the user cache. Can completely clear the cache or evict specific users.
12
11
  #
13
12
  # @option arguments [List] :realms Comma-separated list of realms to clear
14
13
  # @option arguments [List] :usernames Comma-separated list of usernames to clear from the cache
15
-
14
+ # @option arguments [Hash] :headers Custom HTTP headers
16
15
  #
17
16
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html
18
17
  #
19
18
  def clear_cached_realms(arguments = {})
20
19
  raise ArgumentError, "Required argument 'realms' missing" unless arguments[:realms]
21
20
 
21
+ headers = arguments.delete(:headers) || {}
22
+
22
23
  arguments = arguments.clone
23
24
 
24
25
  _realms = arguments.delete(:realms)
@@ -28,7 +29,7 @@ module Elasticsearch
28
29
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
29
30
 
30
31
  body = nil
31
- perform_request(method, path, params, body).body
32
+ perform_request(method, path, params, body, headers).body
32
33
  end
33
34
 
34
35
  # Register this action with its valid params when the module is loaded.
@@ -7,17 +7,18 @@ module Elasticsearch
7
7
  module API
8
8
  module Security
9
9
  module Actions
10
- # TODO: Description
11
-
10
+ # Evicts roles from the native role cache.
12
11
  #
13
12
  # @option arguments [List] :name Role name
14
-
13
+ # @option arguments [Hash] :headers Custom HTTP headers
15
14
  #
16
15
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html
17
16
  #
18
17
  def clear_cached_roles(arguments = {})
19
18
  raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
20
19
 
20
+ headers = arguments.delete(:headers) || {}
21
+
21
22
  arguments = arguments.clone
22
23
 
23
24
  _name = arguments.delete(:name)
@@ -27,7 +28,7 @@ module Elasticsearch
27
28
  params = {}
28
29
 
29
30
  body = nil
30
- perform_request(method, path, params, body).body
31
+ perform_request(method, path, params, body, headers).body
31
32
  end
32
33
  end
33
34
  end
@@ -7,12 +7,12 @@ module Elasticsearch
7
7
  module API
8
8
  module Security
9
9
  module Actions
10
- # TODO: Description
11
-
10
+ # Creates an API key for access without requiring basic authentication.
12
11
  #
13
12
  # @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
13
  # (options: true,false,wait_for)
15
14
 
15
+ # @option arguments [Hash] :headers Custom HTTP headers
16
16
  # @option arguments [Hash] :body The api key request to create an API key (*Required*)
17
17
  #
18
18
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html
@@ -20,6 +20,8 @@ module Elasticsearch
20
20
  def create_api_key(arguments = {})
21
21
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
22
22
 
23
+ headers = arguments.delete(:headers) || {}
24
+
23
25
  arguments = arguments.clone
24
26
 
25
27
  method = Elasticsearch::API::HTTP_PUT
@@ -27,7 +29,7 @@ module Elasticsearch
27
29
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
28
30
 
29
31
  body = arguments[:body]
30
- perform_request(method, path, params, body).body
32
+ perform_request(method, path, params, body, headers).body
31
33
  end
32
34
 
33
35
  # Register this action with its valid params when the module is loaded.