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,21 +7,23 @@ module Elasticsearch
7
7
  module API
8
8
  module Security
9
9
  module Actions
10
- # TODO: Description
11
-
10
+ # Removes application privileges.
12
11
  #
13
12
  # @option arguments [String] :application Application name
14
13
  # @option arguments [String] :name Privilege name
15
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.
16
15
  # (options: true,false,wait_for)
17
16
 
17
+ # @option arguments [Hash] :headers Custom HTTP headers
18
18
  #
19
- # @see TODO
19
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-privilege.html
20
20
  #
21
21
  def delete_privileges(arguments = {})
22
22
  raise ArgumentError, "Required argument 'application' missing" unless arguments[:application]
23
23
  raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
24
24
 
25
+ headers = arguments.delete(:headers) || {}
26
+
25
27
  arguments = arguments.clone
26
28
 
27
29
  _application = arguments.delete(:application)
@@ -33,7 +35,7 @@ module Elasticsearch
33
35
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
34
36
 
35
37
  body = nil
36
- perform_request(method, path, params, body).body
38
+ perform_request(method, path, params, body, headers).body
37
39
  end
38
40
 
39
41
  # Register this action with its valid params when the module is loaded.
@@ -7,19 +7,21 @@ module Elasticsearch
7
7
  module API
8
8
  module Security
9
9
  module Actions
10
- # TODO: Description
11
-
10
+ # Removes roles in the native realm.
12
11
  #
13
12
  # @option arguments [String] :name Role name
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
  #
18
18
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html
19
19
  #
20
20
  def delete_role(arguments = {})
21
21
  raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
22
22
 
23
+ headers = arguments.delete(:headers) || {}
24
+
23
25
  arguments = arguments.clone
24
26
 
25
27
  _name = arguments.delete(:name)
@@ -29,7 +31,7 @@ module Elasticsearch
29
31
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
30
32
 
31
33
  body = nil
32
- perform_request(method, path, params, body).body
34
+ perform_request(method, path, params, body, headers).body
33
35
  end
34
36
 
35
37
  # Register this action with its valid params when the module is loaded.
@@ -7,19 +7,21 @@ module Elasticsearch
7
7
  module API
8
8
  module Security
9
9
  module Actions
10
- # TODO: Description
11
-
10
+ # Removes role mappings.
12
11
  #
13
12
  # @option arguments [String] :name Role-mapping name
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
  #
18
18
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html
19
19
  #
20
20
  def delete_role_mapping(arguments = {})
21
21
  raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
22
22
 
23
+ headers = arguments.delete(:headers) || {}
24
+
23
25
  arguments = arguments.clone
24
26
 
25
27
  _name = arguments.delete(:name)
@@ -29,7 +31,7 @@ module Elasticsearch
29
31
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
30
32
 
31
33
  body = nil
32
- perform_request(method, path, params, body).body
34
+ perform_request(method, path, params, body, headers).body
33
35
  end
34
36
 
35
37
  # Register this action with its valid params when the module is loaded.
@@ -7,19 +7,21 @@ module Elasticsearch
7
7
  module API
8
8
  module Security
9
9
  module Actions
10
- # TODO: Description
11
-
10
+ # Deletes users from the native realm.
12
11
  #
13
12
  # @option arguments [String] :username username
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
  #
18
18
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html
19
19
  #
20
20
  def delete_user(arguments = {})
21
21
  raise ArgumentError, "Required argument 'username' missing" unless arguments[:username]
22
22
 
23
+ headers = arguments.delete(:headers) || {}
24
+
23
25
  arguments = arguments.clone
24
26
 
25
27
  _username = arguments.delete(:username)
@@ -29,7 +31,7 @@ module Elasticsearch
29
31
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
30
32
 
31
33
  body = nil
32
- perform_request(method, path, params, body).body
34
+ perform_request(method, path, params, body, headers).body
33
35
  end
34
36
 
35
37
  # Register this action with its valid params when the module is loaded.
@@ -7,19 +7,21 @@ module Elasticsearch
7
7
  module API
8
8
  module Security
9
9
  module Actions
10
- # TODO: Description
11
-
10
+ # Disables users in the native realm.
12
11
  #
13
12
  # @option arguments [String] :username The username of the user to disable
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
  #
18
18
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html
19
19
  #
20
20
  def disable_user(arguments = {})
21
21
  raise ArgumentError, "Required argument 'username' missing" unless arguments[:username]
22
22
 
23
+ headers = arguments.delete(:headers) || {}
24
+
23
25
  arguments = arguments.clone
24
26
 
25
27
  _username = arguments.delete(:username)
@@ -29,7 +31,7 @@ module Elasticsearch
29
31
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
30
32
 
31
33
  body = nil
32
- perform_request(method, path, params, body).body
34
+ perform_request(method, path, params, body, headers).body
33
35
  end
34
36
 
35
37
  # Register this action with its valid params when the module is loaded.
@@ -7,19 +7,21 @@ module Elasticsearch
7
7
  module API
8
8
  module Security
9
9
  module Actions
10
- # TODO: Description
11
-
10
+ # Enables users in the native realm.
12
11
  #
13
12
  # @option arguments [String] :username The username of the user to enable
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
  #
18
18
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html
19
19
  #
20
20
  def enable_user(arguments = {})
21
21
  raise ArgumentError, "Required argument 'username' missing" unless arguments[:username]
22
22
 
23
+ headers = arguments.delete(:headers) || {}
24
+
23
25
  arguments = arguments.clone
24
26
 
25
27
  _username = arguments.delete(:username)
@@ -29,7 +31,7 @@ module Elasticsearch
29
31
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
30
32
 
31
33
  body = nil
32
- perform_request(method, path, params, body).body
34
+ perform_request(method, path, params, body, headers).body
33
35
  end
34
36
 
35
37
  # Register this action with its valid params when the module is loaded.
@@ -7,19 +7,20 @@ module Elasticsearch
7
7
  module API
8
8
  module Security
9
9
  module Actions
10
- # TODO: Description
11
-
10
+ # Retrieves information for one or more API keys.
12
11
  #
13
12
  # @option arguments [String] :id API key id of the API key to be retrieved
14
13
  # @option arguments [String] :name API key name of the API key to be retrieved
15
14
  # @option arguments [String] :username user name of the user who created this API key to be retrieved
16
15
  # @option arguments [String] :realm_name realm name of the user who created this API key to be retrieved
17
16
  # @option arguments [Boolean] :owner flag to query API keys owned by the currently authenticated user
18
-
17
+ # @option arguments [Hash] :headers Custom HTTP headers
19
18
  #
20
19
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html
21
20
  #
22
21
  def get_api_key(arguments = {})
22
+ headers = arguments.delete(:headers) || {}
23
+
23
24
  arguments = arguments.clone
24
25
 
25
26
  method = Elasticsearch::API::HTTP_GET
@@ -27,7 +28,7 @@ module Elasticsearch
27
28
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
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
 
33
34
  # 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
+ # Retrieves the list of cluster privileges and index privileges that are available in this version of Elasticsearch.
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-get-builtin-privileges.html
14
15
  #
15
16
  def get_builtin_privileges(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,16 +7,17 @@ module Elasticsearch
7
7
  module API
8
8
  module Security
9
9
  module Actions
10
- # TODO: Description
11
-
10
+ # Retrieves application privileges.
12
11
  #
13
12
  # @option arguments [String] :application Application name
14
13
  # @option arguments [String] :name Privilege name
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-get-privileges.html
18
17
  #
19
18
  def get_privileges(arguments = {})
19
+ headers = arguments.delete(:headers) || {}
20
+
20
21
  arguments = arguments.clone
21
22
 
22
23
  _application = arguments.delete(:application)
@@ -30,11 +31,11 @@ module Elasticsearch
30
31
  "_security/privilege/#{Elasticsearch::API::Utils.__listify(_application)}"
31
32
  else
32
33
  "_security/privilege"
33
- end
34
+ end
34
35
  params = {}
35
36
 
36
37
  body = nil
37
- perform_request(method, path, params, body).body
38
+ perform_request(method, path, params, body, headers).body
38
39
  end
39
40
  end
40
41
  end
@@ -7,15 +7,16 @@ module Elasticsearch
7
7
  module API
8
8
  module Security
9
9
  module Actions
10
- # TODO: Description
11
-
10
+ # Retrieves roles in the native realm.
12
11
  #
13
12
  # @option arguments [String] :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-get-role.html
17
16
  #
18
17
  def get_role(arguments = {})
18
+ headers = arguments.delete(:headers) || {}
19
+
19
20
  arguments = arguments.clone
20
21
 
21
22
  _name = arguments.delete(:name)
@@ -25,14 +26,14 @@ module Elasticsearch
25
26
  "_security/role/#{Elasticsearch::API::Utils.__listify(_name)}"
26
27
  else
27
28
  "_security/role"
28
- end
29
+ end
29
30
  params = {}
30
31
 
31
32
  body = nil
32
33
  if Array(arguments[:ignore]).include?(404)
33
- Elasticsearch::API::Utils.__rescue_from_not_found { perform_request(method, path, params, body).body }
34
+ Elasticsearch::API::Utils.__rescue_from_not_found { perform_request(method, path, params, body, headers).body }
34
35
  else
35
- perform_request(method, path, params, body).body
36
+ perform_request(method, path, params, body, headers).body
36
37
  end
37
38
  end
38
39
  end
@@ -7,15 +7,16 @@ module Elasticsearch
7
7
  module API
8
8
  module Security
9
9
  module Actions
10
- # TODO: Description
11
-
10
+ # Retrieves role mappings.
12
11
  #
13
12
  # @option arguments [String] :name Role-Mapping 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-get-role-mapping.html
17
16
  #
18
17
  def get_role_mapping(arguments = {})
18
+ headers = arguments.delete(:headers) || {}
19
+
19
20
  arguments = arguments.clone
20
21
 
21
22
  _name = arguments.delete(:name)
@@ -25,11 +26,11 @@ module Elasticsearch
25
26
  "_security/role_mapping/#{Elasticsearch::API::Utils.__listify(_name)}"
26
27
  else
27
28
  "_security/role_mapping"
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,8 +7,9 @@ module Elasticsearch
7
7
  module API
8
8
  module Security
9
9
  module Actions
10
- # TODO: Description
11
-
10
+ # Creates a bearer token for access without requiring basic authentication.
11
+ #
12
+ # @option arguments [Hash] :headers Custom HTTP headers
12
13
  # @option arguments [Hash] :body The token request to get (*Required*)
13
14
  #
14
15
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html
@@ -16,6 +17,8 @@ module Elasticsearch
16
17
  def get_token(arguments = {})
17
18
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
18
19
 
20
+ headers = arguments.delete(:headers) || {}
21
+
19
22
  arguments = arguments.clone
20
23
 
21
24
  method = Elasticsearch::API::HTTP_POST
@@ -23,7 +26,7 @@ module Elasticsearch
23
26
  params = {}
24
27
 
25
28
  body = arguments[:body]
26
- perform_request(method, path, params, body).body
29
+ perform_request(method, path, params, body, headers).body
27
30
  end
28
31
  end
29
32
  end
@@ -7,15 +7,16 @@ module Elasticsearch
7
7
  module API
8
8
  module Security
9
9
  module Actions
10
- # TODO: Description
11
-
10
+ # Retrieves information about users in the native realm and built-in users.
12
11
  #
13
12
  # @option arguments [List] :username A comma-separated list of usernames
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-get-user.html
17
16
  #
18
17
  def get_user(arguments = {})
18
+ headers = arguments.delete(:headers) || {}
19
+
19
20
  arguments = arguments.clone
20
21
 
21
22
  _username = arguments.delete(:username)
@@ -25,14 +26,14 @@ module Elasticsearch
25
26
  "_security/user/#{Elasticsearch::API::Utils.__listify(_username)}"
26
27
  else
27
28
  "_security/user"
28
- end
29
+ end
29
30
  params = {}
30
31
 
31
32
  body = nil
32
33
  if Array(arguments[:ignore]).include?(404)
33
- Elasticsearch::API::Utils.__rescue_from_not_found { perform_request(method, path, params, body).body }
34
+ Elasticsearch::API::Utils.__rescue_from_not_found { perform_request(method, path, params, body, headers).body }
34
35
  else
35
- perform_request(method, path, params, body).body
36
+ perform_request(method, path, params, body, headers).body
36
37
  end
37
38
  end
38
39
  end
@@ -7,12 +7,15 @@ module Elasticsearch
7
7
  module API
8
8
  module Security
9
9
  module Actions
10
- # TODO: Description
11
-
10
+ # Retrieves application privileges.
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-get-privileges.html
14
15
  #
15
16
  def get_user_privileges(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