elasticsearch-api 7.6.0 → 7.7.0.pre

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) hide show
  1. checksums.yaml +4 -4
  2. data/lib/elasticsearch/api/actions/bulk.rb +6 -3
  3. data/lib/elasticsearch/api/actions/cat/aliases.rb +10 -4
  4. data/lib/elasticsearch/api/actions/cat/allocation.rb +6 -4
  5. data/lib/elasticsearch/api/actions/cat/count.rb +6 -4
  6. data/lib/elasticsearch/api/actions/cat/fielddata.rb +6 -4
  7. data/lib/elasticsearch/api/actions/cat/health.rb +6 -4
  8. data/lib/elasticsearch/api/actions/cat/help.rb +5 -3
  9. data/lib/elasticsearch/api/actions/cat/indices.rb +11 -5
  10. data/lib/elasticsearch/api/actions/cat/master.rb +5 -3
  11. data/lib/elasticsearch/api/actions/cat/nodeattrs.rb +5 -3
  12. data/lib/elasticsearch/api/actions/cat/nodes.rb +6 -4
  13. data/lib/elasticsearch/api/actions/cat/pending_tasks.rb +6 -4
  14. data/lib/elasticsearch/api/actions/cat/plugins.rb +5 -3
  15. data/lib/elasticsearch/api/actions/cat/recovery.rb +7 -5
  16. data/lib/elasticsearch/api/actions/cat/repositories.rb +5 -3
  17. data/lib/elasticsearch/api/actions/cat/segments.rb +6 -4
  18. data/lib/elasticsearch/api/actions/cat/shards.rb +7 -5
  19. data/lib/elasticsearch/api/actions/cat/snapshots.rb +7 -5
  20. data/lib/elasticsearch/api/actions/cat/tasks.rb +6 -4
  21. data/lib/elasticsearch/api/actions/cat/templates.rb +6 -4
  22. data/lib/elasticsearch/api/actions/cat/thread_pool.rb +6 -4
  23. data/lib/elasticsearch/api/actions/clear_scroll.rb +6 -4
  24. data/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +5 -3
  25. data/lib/elasticsearch/api/actions/cluster/delete_component_template.rb +45 -0
  26. data/lib/elasticsearch/api/actions/cluster/get_component_template.rb +47 -0
  27. data/lib/elasticsearch/api/actions/cluster/get_settings.rb +5 -3
  28. data/lib/elasticsearch/api/actions/cluster/health.rb +7 -4
  29. data/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +5 -3
  30. data/lib/elasticsearch/api/actions/cluster/put_component_template.rb +49 -0
  31. data/lib/elasticsearch/api/actions/cluster/put_settings.rb +5 -3
  32. data/lib/elasticsearch/api/actions/cluster/remote_info.rb +5 -3
  33. data/lib/elasticsearch/api/actions/cluster/reroute.rb +5 -3
  34. data/lib/elasticsearch/api/actions/cluster/state.rb +7 -4
  35. data/lib/elasticsearch/api/actions/cluster/stats.rb +6 -4
  36. data/lib/elasticsearch/api/actions/count.rb +8 -6
  37. data/lib/elasticsearch/api/actions/create.rb +2 -2
  38. data/lib/elasticsearch/api/actions/delete.rb +6 -3
  39. data/lib/elasticsearch/api/actions/delete_by_query.rb +7 -5
  40. data/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb +5 -3
  41. data/lib/elasticsearch/api/actions/delete_script.rb +5 -3
  42. data/lib/elasticsearch/api/actions/exists.rb +5 -2
  43. data/lib/elasticsearch/api/actions/exists_source.rb +5 -2
  44. data/lib/elasticsearch/api/actions/explain.rb +5 -3
  45. data/lib/elasticsearch/api/actions/field_caps.rb +7 -5
  46. data/lib/elasticsearch/api/actions/get.rb +6 -3
  47. data/lib/elasticsearch/api/actions/get_script.rb +5 -3
  48. data/lib/elasticsearch/api/actions/get_script_context.rb +5 -3
  49. data/lib/elasticsearch/api/actions/get_script_languages.rb +5 -3
  50. data/lib/elasticsearch/api/actions/get_source.rb +5 -2
  51. data/lib/elasticsearch/api/actions/index.rb +5 -3
  52. data/lib/elasticsearch/api/actions/indices/analyze.rb +6 -4
  53. data/lib/elasticsearch/api/actions/indices/clear_cache.rb +7 -5
  54. data/lib/elasticsearch/api/actions/indices/clone.rb +5 -3
  55. data/lib/elasticsearch/api/actions/indices/close.rb +6 -4
  56. data/lib/elasticsearch/api/actions/indices/create.rb +5 -3
  57. data/lib/elasticsearch/api/actions/indices/create_data_stream.rb +37 -0
  58. data/lib/elasticsearch/api/actions/indices/delete.rb +7 -4
  59. data/lib/elasticsearch/api/actions/indices/delete_alias.rb +5 -3
  60. data/lib/elasticsearch/api/actions/indices/delete_data_stream.rb +35 -0
  61. data/lib/elasticsearch/api/actions/indices/delete_template.rb +6 -4
  62. data/lib/elasticsearch/api/actions/indices/exists.rb +6 -4
  63. data/lib/elasticsearch/api/actions/indices/exists_alias.rb +6 -4
  64. data/lib/elasticsearch/api/actions/indices/exists_template.rb +5 -3
  65. data/lib/elasticsearch/api/actions/indices/exists_type.rb +6 -4
  66. data/lib/elasticsearch/api/actions/indices/flush.rb +7 -4
  67. data/lib/elasticsearch/api/actions/indices/flush_synced.rb +7 -4
  68. data/lib/elasticsearch/api/actions/indices/forcemerge.rb +7 -5
  69. data/lib/elasticsearch/api/actions/indices/get.rb +6 -4
  70. data/lib/elasticsearch/api/actions/indices/get_alias.rb +7 -5
  71. data/lib/elasticsearch/api/actions/indices/get_data_streams.rb +37 -0
  72. data/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +6 -4
  73. data/lib/elasticsearch/api/actions/indices/get_mapping.rb +7 -5
  74. data/lib/elasticsearch/api/actions/indices/get_settings.rb +7 -5
  75. data/lib/elasticsearch/api/actions/indices/get_template.rb +6 -4
  76. data/lib/elasticsearch/api/actions/indices/get_upgrade.rb +7 -4
  77. data/lib/elasticsearch/api/actions/indices/open.rb +6 -4
  78. data/lib/elasticsearch/api/actions/indices/put_alias.rb +5 -3
  79. data/lib/elasticsearch/api/actions/indices/put_mapping.rb +6 -3
  80. data/lib/elasticsearch/api/actions/indices/put_settings.rb +6 -4
  81. data/lib/elasticsearch/api/actions/indices/put_template.rb +5 -3
  82. data/lib/elasticsearch/api/actions/indices/recovery.rb +6 -4
  83. data/lib/elasticsearch/api/actions/indices/refresh.rb +7 -4
  84. data/lib/elasticsearch/api/actions/indices/rollover.rb +5 -3
  85. data/lib/elasticsearch/api/actions/indices/segments.rb +7 -5
  86. data/lib/elasticsearch/api/actions/indices/shard_stores.rb +7 -4
  87. data/lib/elasticsearch/api/actions/indices/shrink.rb +5 -3
  88. data/lib/elasticsearch/api/actions/indices/split.rb +5 -3
  89. data/lib/elasticsearch/api/actions/indices/stats.rb +6 -4
  90. data/lib/elasticsearch/api/actions/indices/update_aliases.rb +5 -3
  91. data/lib/elasticsearch/api/actions/indices/upgrade.rb +7 -5
  92. data/lib/elasticsearch/api/actions/indices/validate_query.rb +7 -5
  93. data/lib/elasticsearch/api/actions/info.rb +5 -3
  94. data/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +5 -3
  95. data/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +6 -4
  96. data/lib/elasticsearch/api/actions/ingest/processor_grok.rb +5 -3
  97. data/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +5 -3
  98. data/lib/elasticsearch/api/actions/ingest/simulate.rb +5 -3
  99. data/lib/elasticsearch/api/actions/mget.rb +5 -3
  100. data/lib/elasticsearch/api/actions/msearch.rb +7 -4
  101. data/lib/elasticsearch/api/actions/msearch_template.rb +6 -3
  102. data/lib/elasticsearch/api/actions/mtermvectors.rb +6 -3
  103. data/lib/elasticsearch/api/actions/nodes/hot_threads.rb +6 -4
  104. data/lib/elasticsearch/api/actions/nodes/info.rb +6 -4
  105. data/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +6 -4
  106. data/lib/elasticsearch/api/actions/nodes/stats.rb +6 -4
  107. data/lib/elasticsearch/api/actions/nodes/usage.rb +6 -4
  108. data/lib/elasticsearch/api/actions/ping.rb +5 -3
  109. data/lib/elasticsearch/api/actions/put_script.rb +5 -3
  110. data/lib/elasticsearch/api/actions/rank_eval.rb +6 -3
  111. data/lib/elasticsearch/api/actions/reindex.rb +6 -4
  112. data/lib/elasticsearch/api/actions/reindex_rethrottle.rb +5 -3
  113. data/lib/elasticsearch/api/actions/render_search_template.rb +6 -4
  114. data/lib/elasticsearch/api/actions/scripts_painless_execute.rb +5 -3
  115. data/lib/elasticsearch/api/actions/scroll.rb +6 -4
  116. data/lib/elasticsearch/api/actions/search.rb +8 -6
  117. data/lib/elasticsearch/api/actions/search_shards.rb +7 -4
  118. data/lib/elasticsearch/api/actions/search_template.rb +6 -4
  119. data/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb +6 -5
  120. data/lib/elasticsearch/api/actions/snapshot/create.rb +5 -3
  121. data/lib/elasticsearch/api/actions/snapshot/create_repository.rb +5 -3
  122. data/lib/elasticsearch/api/actions/snapshot/delete.rb +6 -4
  123. data/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +6 -4
  124. data/lib/elasticsearch/api/actions/snapshot/get.rb +6 -4
  125. data/lib/elasticsearch/api/actions/snapshot/get_repository.rb +7 -5
  126. data/lib/elasticsearch/api/actions/snapshot/restore.rb +5 -3
  127. data/lib/elasticsearch/api/actions/snapshot/status.rb +7 -5
  128. data/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +5 -3
  129. data/lib/elasticsearch/api/actions/tasks/cancel.rb +6 -4
  130. data/lib/elasticsearch/api/actions/tasks/get.rb +5 -3
  131. data/lib/elasticsearch/api/actions/tasks/list.rb +5 -3
  132. data/lib/elasticsearch/api/actions/termvectors.rb +5 -2
  133. data/lib/elasticsearch/api/actions/update.rb +6 -4
  134. data/lib/elasticsearch/api/actions/update_by_query.rb +7 -5
  135. data/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +5 -3
  136. data/lib/elasticsearch/api/version.rb +1 -1
  137. data/spec/elasticsearch/api/actions/cat/aliases_spec.rb +1 -1
  138. data/spec/elasticsearch/api/actions/cat/allocation_spec.rb +1 -1
  139. data/spec/elasticsearch/api/actions/cat/count_spec.rb +1 -1
  140. data/spec/elasticsearch/api/actions/cat/fielddata_spec.rb +2 -2
  141. data/spec/elasticsearch/api/actions/cat/health_spec.rb +1 -1
  142. data/spec/elasticsearch/api/actions/cat/help_spec.rb +1 -1
  143. data/spec/elasticsearch/api/actions/cat/indices_spec.rb +1 -1
  144. data/spec/elasticsearch/api/actions/cat/master_spec.rb +1 -1
  145. data/spec/elasticsearch/api/actions/cat/nodeattrs_spec.rb +1 -1
  146. data/spec/elasticsearch/api/actions/cat/nodes_spec.rb +1 -1
  147. data/spec/elasticsearch/api/actions/cat/pending_tasks_spec.rb +1 -1
  148. data/spec/elasticsearch/api/actions/cat/plugins_spec.rb +1 -1
  149. data/spec/elasticsearch/api/actions/cat/recovery_spec.rb +1 -1
  150. data/spec/elasticsearch/api/actions/cat/repositories_spec.rb +1 -1
  151. data/spec/elasticsearch/api/actions/cat/segments_spec.rb +1 -1
  152. data/spec/elasticsearch/api/actions/cat/shards_spec.rb +1 -1
  153. data/spec/elasticsearch/api/actions/cat/snapshot_spec.rb +1 -1
  154. data/spec/elasticsearch/api/actions/cat/tasks_spec.rb +1 -1
  155. data/spec/elasticsearch/api/actions/cat/templates_spec.rb +1 -1
  156. data/spec/elasticsearch/api/actions/cat/thread_pool_spec.rb +1 -1
  157. data/spec/elasticsearch/api/actions/clear_scroll_spec.rb +4 -2
  158. data/spec/elasticsearch/api/actions/cluster/allocation_explain_spec.rb +1 -1
  159. data/spec/elasticsearch/api/actions/cluster/get_settings_spec.rb +1 -1
  160. data/spec/elasticsearch/api/actions/cluster/health_spec.rb +3 -3
  161. data/spec/elasticsearch/api/actions/cluster/pending_tasks_spec.rb +1 -1
  162. data/spec/elasticsearch/api/actions/cluster/put_settings_spec.rb +1 -1
  163. data/spec/elasticsearch/api/actions/cluster/remote_info_spec.rb +1 -1
  164. data/spec/elasticsearch/api/actions/cluster/reroute_spec.rb +2 -2
  165. data/spec/elasticsearch/api/actions/cluster/state_spec.rb +2 -2
  166. data/spec/elasticsearch/api/actions/cluster/stats_spec.rb +1 -1
  167. data/spec/elasticsearch/api/actions/count_spec.rb +6 -3
  168. data/spec/elasticsearch/api/actions/create_document_spec.rb +8 -4
  169. data/spec/elasticsearch/api/actions/delete_by_query_spec.rb +6 -3
  170. data/spec/elasticsearch/api/actions/delete_document_spec.rb +4 -2
  171. data/spec/elasticsearch/api/actions/delete_script_spec.rb +2 -1
  172. data/spec/elasticsearch/api/actions/exists_document_spec.rb +2 -1
  173. data/spec/elasticsearch/api/actions/explain_document_spec.rb +2 -1
  174. data/spec/elasticsearch/api/actions/field_caps_spec.rb +2 -1
  175. data/spec/elasticsearch/api/actions/get_document_source_spec.rb +2 -1
  176. data/spec/elasticsearch/api/actions/get_document_spec.rb +2 -1
  177. data/spec/elasticsearch/api/actions/get_script_spec.rb +2 -1
  178. data/spec/elasticsearch/api/actions/index_document_spec.rb +2 -1
  179. data/spec/elasticsearch/api/actions/indices/analyze_spec.rb +1 -1
  180. data/spec/elasticsearch/api/actions/indices/clear_cache_spec.rb +1 -1
  181. data/spec/elasticsearch/api/actions/indices/clone_spec.rb +1 -1
  182. data/spec/elasticsearch/api/actions/indices/close_spec.rb +1 -1
  183. data/spec/elasticsearch/api/actions/indices/create_spec.rb +1 -1
  184. data/spec/elasticsearch/api/actions/indices/delete_alias_spec.rb +1 -1
  185. data/spec/elasticsearch/api/actions/indices/delete_spec.rb +1 -1
  186. data/spec/elasticsearch/api/actions/indices/delete_template_spec.rb +1 -1
  187. data/spec/elasticsearch/api/actions/indices/exists_alias_spec.rb +1 -1
  188. data/spec/elasticsearch/api/actions/indices/exists_spec.rb +1 -1
  189. data/spec/elasticsearch/api/actions/indices/exists_template_spec.rb +1 -1
  190. data/spec/elasticsearch/api/actions/indices/exists_type_spec.rb +1 -1
  191. data/spec/elasticsearch/api/actions/indices/flush_spec.rb +1 -1
  192. data/spec/elasticsearch/api/actions/indices/flush_synced_spec.rb +1 -1
  193. data/spec/elasticsearch/api/actions/indices/forcemerge_spec.rb +1 -1
  194. data/spec/elasticsearch/api/actions/indices/get_alias_spec.rb +1 -1
  195. data/spec/elasticsearch/api/actions/indices/get_field_mapping_spec.rb +1 -1
  196. data/spec/elasticsearch/api/actions/indices/get_mapping_spec.rb +1 -1
  197. data/spec/elasticsearch/api/actions/indices/get_settings_spec.rb +1 -1
  198. data/spec/elasticsearch/api/actions/indices/get_spec.rb +1 -1
  199. data/spec/elasticsearch/api/actions/indices/open_spec.rb +1 -1
  200. data/spec/elasticsearch/api/actions/indices/put_alias_spec.rb +1 -1
  201. data/spec/elasticsearch/api/actions/indices/put_mapping_spec.rb +1 -1
  202. data/spec/elasticsearch/api/actions/indices/put_settings_spec.rb +1 -1
  203. data/spec/elasticsearch/api/actions/indices/put_template_spec.rb +1 -1
  204. data/spec/elasticsearch/api/actions/indices/recovery_spec.rb +1 -1
  205. data/spec/elasticsearch/api/actions/indices/refresh_spec.rb +1 -1
  206. data/spec/elasticsearch/api/actions/indices/rollover_spec.rb +1 -1
  207. data/spec/elasticsearch/api/actions/indices/segments_spec.rb +1 -1
  208. data/spec/elasticsearch/api/actions/indices/shard_stores_spec.rb +1 -1
  209. data/spec/elasticsearch/api/actions/indices/shrink_spec.rb +1 -1
  210. data/spec/elasticsearch/api/actions/indices/split_spec.rb +1 -1
  211. data/spec/elasticsearch/api/actions/indices/stats_spec.rb +1 -1
  212. data/spec/elasticsearch/api/actions/indices/update_aliases_spec.rb +1 -1
  213. data/spec/elasticsearch/api/actions/indices/upgrade_spec.rb +1 -1
  214. data/spec/elasticsearch/api/actions/indices/validate_query_spec.rb +1 -1
  215. data/spec/elasticsearch/api/actions/info_spec.rb +2 -1
  216. data/spec/elasticsearch/api/actions/ingest/delete_pipeline_spec.rb +1 -1
  217. data/spec/elasticsearch/api/actions/ingest/get_pipeline_spec.rb +1 -1
  218. data/spec/elasticsearch/api/actions/ingest/put_pipeline_spec.rb +1 -1
  219. data/spec/elasticsearch/api/actions/ingest/simulate_spec.rb +1 -1
  220. data/spec/elasticsearch/api/actions/json_builders_spec.rb +4 -2
  221. data/spec/elasticsearch/api/actions/mget_spec.rb +2 -1
  222. data/spec/elasticsearch/api/actions/mtermvectors_spec.rb +3 -2
  223. data/spec/elasticsearch/api/actions/nodes/hot_threads_spec.rb +1 -1
  224. data/spec/elasticsearch/api/actions/nodes/info_spec.rb +1 -1
  225. data/spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb +1 -1
  226. data/spec/elasticsearch/api/actions/nodes/stats_spec.rb +1 -1
  227. data/spec/elasticsearch/api/actions/ping_spec.rb +3 -2
  228. data/spec/elasticsearch/api/actions/put_script_spec.rb +4 -2
  229. data/spec/elasticsearch/api/actions/reindex_spec.rb +3 -2
  230. data/spec/elasticsearch/api/actions/render_search_template_spec.rb +4 -2
  231. data/spec/elasticsearch/api/actions/scroll_spec.rb +4 -2
  232. data/spec/elasticsearch/api/actions/search_shards_spec.rb +3 -2
  233. data/spec/elasticsearch/api/actions/search_spec.rb +2 -1
  234. data/spec/elasticsearch/api/actions/search_template_spec.rb +2 -1
  235. data/spec/elasticsearch/api/actions/snapshot/create_repository_spec.rb +1 -1
  236. data/spec/elasticsearch/api/actions/snapshot/create_spec.rb +1 -1
  237. data/spec/elasticsearch/api/actions/snapshot/delete_repository_spec.rb +1 -1
  238. data/spec/elasticsearch/api/actions/snapshot/delete_spec.rb +1 -1
  239. data/spec/elasticsearch/api/actions/snapshot/get_repository_spec.rb +1 -1
  240. data/spec/elasticsearch/api/actions/snapshot/get_spec.rb +1 -1
  241. data/spec/elasticsearch/api/actions/snapshot/restore_spec.rb +1 -1
  242. data/spec/elasticsearch/api/actions/snapshot/status_spec.rb +1 -1
  243. data/spec/elasticsearch/api/actions/snapshot/verify_repository_spec.rb +1 -1
  244. data/spec/elasticsearch/api/actions/tasks/cancel_spec.rb +1 -1
  245. data/spec/elasticsearch/api/actions/tasks/get_spec.rb +1 -1
  246. data/spec/elasticsearch/api/actions/tasks/list_spec.rb +1 -1
  247. data/spec/elasticsearch/api/actions/termvectors_spec.rb +2 -1
  248. data/spec/elasticsearch/api/actions/update_by_query_spec.rb +3 -2
  249. data/spec/elasticsearch/api/actions/update_document_spec.rb +2 -1
  250. data/utils/thor/generator/endpoint_specifics.rb +1 -1
  251. data/utils/thor/templates/_documentation_top.erb +3 -2
  252. data/utils/thor/templates/_perform_request.erb +6 -5
  253. data/utils/thor/templates/method.erb +2 -1
  254. metadata +10 -17
  255. data/lib/elasticsearch/api/actions/abort_benchmark.rb +0 -28
  256. data/lib/elasticsearch/api/actions/benchmark.rb +0 -68
  257. data/lib/elasticsearch/api/actions/delete_by_rethrottle.rb +0 -34
  258. data/lib/elasticsearch/api/actions/nodes/shutdown.rb +0 -43
  259. data/lib/elasticsearch/api/actions/remote/info.rb +0 -24
  260. data/spec/elasticsearch/api/actions/abort_benchmark_spec.rb +0 -21
  261. data/spec/elasticsearch/api/actions/benchmark_spec.rb +0 -21
  262. data/spec/elasticsearch/api/actions/nodes/shutdown_spec.rb +0 -63
  263. data/spec/elasticsearch/api/actions/remote/info_spec.rb +0 -22
@@ -15,11 +15,13 @@ module Elasticsearch
15
15
  # @option arguments [Boolean] :help Return help information
16
16
  # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
17
17
  # @option arguments [Boolean] :v Verbose mode. Display column headers
18
-
18
+ # @option arguments [Hash] :headers Custom HTTP headers
19
19
  #
20
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/cat-repositories.html
20
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html
21
21
  #
22
22
  def repositories(arguments = {})
23
+ headers = arguments.delete(:headers) || {}
24
+
23
25
  arguments = arguments.clone
24
26
 
25
27
  method = Elasticsearch::API::HTTP_GET
@@ -27,7 +29,7 @@ module Elasticsearch
27
29
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
28
30
 
29
31
  body = nil
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.
@@ -17,11 +17,13 @@ module Elasticsearch
17
17
  # @option arguments [Boolean] :help Return help information
18
18
  # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
19
19
  # @option arguments [Boolean] :v Verbose mode. Display column headers
20
-
20
+ # @option arguments [Hash] :headers Custom HTTP headers
21
21
  #
22
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/cat-segments.html
22
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html
23
23
  #
24
24
  def segments(arguments = {})
25
+ headers = arguments.delete(:headers) || {}
26
+
25
27
  arguments = arguments.clone
26
28
 
27
29
  _index = arguments.delete(:index)
@@ -31,11 +33,11 @@ module Elasticsearch
31
33
  "_cat/segments/#{Utils.__listify(_index)}"
32
34
  else
33
35
  "_cat/segments"
34
- end
36
+ end
35
37
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
36
38
 
37
39
  body = nil
38
- perform_request(method, path, params, body).body
40
+ perform_request(method, path, params, body, headers).body
39
41
  end
40
42
 
41
43
  # Register this action with its valid params when the module is loaded.
@@ -19,14 +19,16 @@ module Elasticsearch
19
19
  # @option arguments [Boolean] :help Return help information
20
20
  # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
21
21
  # @option arguments [String] :time The unit in which to display time values
22
- # (options: d (Days),h (Hours),m (Minutes),s (Seconds),ms (Milliseconds),micros (Microseconds),nanos (Nanoseconds))
22
+ # (options: d,h,m,s,ms,micros,nanos)
23
23
 
24
24
  # @option arguments [Boolean] :v Verbose mode. Display column headers
25
-
25
+ # @option arguments [Hash] :headers Custom HTTP headers
26
26
  #
27
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/cat-shards.html
27
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html
28
28
  #
29
29
  def shards(arguments = {})
30
+ headers = arguments.delete(:headers) || {}
31
+
30
32
  arguments = arguments.clone
31
33
 
32
34
  _index = arguments.delete(:index)
@@ -36,12 +38,12 @@ module Elasticsearch
36
38
  "_cat/shards/#{Utils.__listify(_index)}"
37
39
  else
38
40
  "_cat/shards"
39
- end
41
+ end
40
42
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
41
43
  params[:h] = Utils.__listify(params[:h]) if params[:h]
42
44
 
43
45
  body = nil
44
- perform_request(method, path, params, body).body
46
+ perform_request(method, path, params, body, headers).body
45
47
  end
46
48
 
47
49
  # Register this action with its valid params when the module is loaded.
@@ -16,14 +16,16 @@ module Elasticsearch
16
16
  # @option arguments [Boolean] :help Return help information
17
17
  # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
18
18
  # @option arguments [String] :time The unit in which to display time values
19
- # (options: d (Days),h (Hours),m (Minutes),s (Seconds),ms (Milliseconds),micros (Microseconds),nanos (Nanoseconds))
19
+ # (options: d,h,m,s,ms,micros,nanos)
20
20
 
21
21
  # @option arguments [Boolean] :v Verbose mode. Display column headers
22
-
22
+ # @option arguments [Hash] :headers Custom HTTP headers
23
23
  #
24
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/cat-snapshots.html
24
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html
25
25
  #
26
26
  def snapshots(arguments = {})
27
+ headers = arguments.delete(:headers) || {}
28
+
27
29
  arguments = arguments.clone
28
30
 
29
31
  _repository = arguments.delete(:repository)
@@ -33,11 +35,11 @@ module Elasticsearch
33
35
  "_cat/snapshots/#{Utils.__listify(_repository)}"
34
36
  else
35
37
  "_cat/snapshots"
36
- end
38
+ end
37
39
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
38
40
 
39
41
  body = nil
40
- perform_request(method, path, params, body).body
42
+ perform_request(method, path, params, body, headers).body
41
43
  end
42
44
 
43
45
  # Register this action with its valid params when the module is loaded.
@@ -17,14 +17,16 @@ module Elasticsearch
17
17
  # @option arguments [Boolean] :help Return help information
18
18
  # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
19
19
  # @option arguments [String] :time The unit in which to display time values
20
- # (options: d (Days),h (Hours),m (Minutes),s (Seconds),ms (Milliseconds),micros (Microseconds),nanos (Nanoseconds))
20
+ # (options: d,h,m,s,ms,micros,nanos)
21
21
 
22
22
  # @option arguments [Boolean] :v Verbose mode. Display column headers
23
-
23
+ # @option arguments [Hash] :headers Custom HTTP headers
24
24
  #
25
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/tasks.html
25
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html
26
26
  #
27
27
  def tasks(arguments = {})
28
+ headers = arguments.delete(:headers) || {}
29
+
28
30
  arguments = arguments.clone
29
31
 
30
32
  method = Elasticsearch::API::HTTP_GET
@@ -32,7 +34,7 @@ module Elasticsearch
32
34
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
33
35
 
34
36
  body = nil
35
- perform_request(method, path, params, body).body
37
+ perform_request(method, path, params, body, headers).body
36
38
  end
37
39
 
38
40
  # Register this action with its valid params when the module is loaded.
@@ -16,11 +16,13 @@ module Elasticsearch
16
16
  # @option arguments [Boolean] :help Return help information
17
17
  # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
18
18
  # @option arguments [Boolean] :v Verbose mode. Display column headers
19
-
19
+ # @option arguments [Hash] :headers Custom HTTP headers
20
20
  #
21
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/cat-templates.html
21
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html
22
22
  #
23
23
  def templates(arguments = {})
24
+ headers = arguments.delete(:headers) || {}
25
+
24
26
  arguments = arguments.clone
25
27
 
26
28
  _name = arguments.delete(:name)
@@ -30,11 +32,11 @@ module Elasticsearch
30
32
  "_cat/templates/#{Utils.__listify(_name)}"
31
33
  else
32
34
  "_cat/templates"
33
- end
35
+ end
34
36
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
35
37
 
36
38
  body = nil
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.
@@ -20,11 +20,13 @@ module Elasticsearch
20
20
  # @option arguments [Boolean] :help Return help information
21
21
  # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
22
22
  # @option arguments [Boolean] :v Verbose mode. Display column headers
23
-
23
+ # @option arguments [Hash] :headers Custom HTTP headers
24
24
  #
25
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/cat-thread-pool.html
25
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html
26
26
  #
27
27
  def thread_pool(arguments = {})
28
+ headers = arguments.delete(:headers) || {}
29
+
28
30
  arguments = arguments.clone
29
31
 
30
32
  _thread_pool_patterns = arguments.delete(:thread_pool_patterns)
@@ -34,12 +36,12 @@ module Elasticsearch
34
36
  "_cat/thread_pool/#{Utils.__listify(_thread_pool_patterns)}"
35
37
  else
36
38
  "_cat/thread_pool"
37
- end
39
+ end
38
40
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
39
41
  params[:h] = Utils.__listify(params[:h]) if params[:h]
40
42
 
41
43
  body = nil
42
- perform_request(method, path, params, body).body
44
+ perform_request(method, path, params, body, headers).body
43
45
  end
44
46
 
45
47
  # Register this action with its valid params when the module is loaded.
@@ -8,7 +8,7 @@ module Elasticsearch
8
8
  # Explicitly clears the search context for a scroll.
9
9
  #
10
10
  # @option arguments [List] :scroll_id A comma-separated list of scroll IDs to clear *Deprecated*
11
-
11
+ # @option arguments [Hash] :headers Custom HTTP headers
12
12
  # @option arguments [Hash] :body A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter
13
13
  #
14
14
  # *Deprecation notice*:
@@ -16,9 +16,11 @@ module Elasticsearch
16
16
  # Deprecated since version 7.0.0
17
17
  #
18
18
  #
19
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/search-request-body.html#_clear_scroll_api
19
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#_clear_scroll_api
20
20
  #
21
21
  def clear_scroll(arguments = {})
22
+ headers = arguments.delete(:headers) || {}
23
+
22
24
  arguments = arguments.clone
23
25
 
24
26
  _scroll_id = arguments.delete(:scroll_id)
@@ -28,11 +30,11 @@ module Elasticsearch
28
30
  "_search/scroll/#{Utils.__listify(_scroll_id)}"
29
31
  else
30
32
  "_search/scroll"
31
- end
33
+ end
32
34
  params = {}
33
35
 
34
36
  body = arguments[:body]
35
- perform_request(method, path, params, body).body
37
+ perform_request(method, path, params, body, headers).body
36
38
  end
37
39
  end
38
40
  end
@@ -10,12 +10,14 @@ module Elasticsearch
10
10
  #
11
11
  # @option arguments [Boolean] :include_yes_decisions Return 'YES' decisions in explanation (default: false)
12
12
  # @option arguments [Boolean] :include_disk_info Return information about disk usage and shard sizes (default: false)
13
-
13
+ # @option arguments [Hash] :headers Custom HTTP headers
14
14
  # @option arguments [Hash] :body The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard'
15
15
  #
16
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/cluster-allocation-explain.html
16
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html
17
17
  #
18
18
  def allocation_explain(arguments = {})
19
+ headers = arguments.delete(:headers) || {}
20
+
19
21
  arguments = arguments.clone
20
22
 
21
23
  method = Elasticsearch::API::HTTP_GET
@@ -23,7 +25,7 @@ module Elasticsearch
23
25
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
24
26
 
25
27
  body = arguments[:body]
26
- perform_request(method, path, params, body).body
28
+ perform_request(method, path, params, body, headers).body
27
29
  end
28
30
 
29
31
  # Register this action with its valid params when the module is loaded.
@@ -0,0 +1,45 @@
1
+ # Licensed to Elasticsearch B.V under one or more agreements.
2
+ # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
+ # See the LICENSE file in the project root for more information
4
+
5
+ module Elasticsearch
6
+ module API
7
+ module Cluster
8
+ module Actions
9
+ # Deletes a component template
10
+ #
11
+ # @option arguments [String] :name The name of the template
12
+ # @option arguments [Time] :timeout Explicit operation timeout
13
+ # @option arguments [Time] :master_timeout Specify timeout for connection to master
14
+ # @option arguments [Hash] :headers Custom HTTP headers
15
+ #
16
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-templates.html
17
+ #
18
+ def delete_component_template(arguments = {})
19
+ raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
20
+
21
+ headers = arguments.delete(:headers) || {}
22
+
23
+ arguments = arguments.clone
24
+
25
+ _name = arguments.delete(:name)
26
+
27
+ method = Elasticsearch::API::HTTP_DELETE
28
+ path = "_component_template/#{Utils.__listify(_name)}"
29
+ params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
30
+
31
+ body = nil
32
+ perform_request(method, path, params, body, headers).body
33
+ end
34
+
35
+ # Register this action with its valid params when the module is loaded.
36
+ #
37
+ # @since 6.2.0
38
+ ParamsRegistry.register(:delete_component_template, [
39
+ :timeout,
40
+ :master_timeout
41
+ ].freeze)
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,47 @@
1
+ # Licensed to Elasticsearch B.V under one or more agreements.
2
+ # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
+ # See the LICENSE file in the project root for more information
4
+
5
+ module Elasticsearch
6
+ module API
7
+ module Cluster
8
+ module Actions
9
+ # Returns one or more component templates
10
+ #
11
+ # @option arguments [List] :name The comma separated names of the component templates
12
+ # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
13
+ # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
14
+ # @option arguments [Hash] :headers Custom HTTP headers
15
+ #
16
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-templates.html
17
+ #
18
+ def get_component_template(arguments = {})
19
+ headers = arguments.delete(:headers) || {}
20
+
21
+ arguments = arguments.clone
22
+
23
+ _name = arguments.delete(:name)
24
+
25
+ method = Elasticsearch::API::HTTP_GET
26
+ path = if _name
27
+ "_component_template/#{Utils.__listify(_name)}"
28
+ else
29
+ "_component_template"
30
+ end
31
+ params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
32
+
33
+ body = nil
34
+ perform_request(method, path, params, body, headers).body
35
+ end
36
+
37
+ # Register this action with its valid params when the module is loaded.
38
+ #
39
+ # @since 6.2.0
40
+ ParamsRegistry.register(:get_component_template, [
41
+ :master_timeout,
42
+ :local
43
+ ].freeze)
44
+ end
45
+ end
46
+ end
47
+ end
@@ -12,11 +12,13 @@ module Elasticsearch
12
12
  # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
13
13
  # @option arguments [Time] :timeout Explicit operation timeout
14
14
  # @option arguments [Boolean] :include_defaults Whether to return all default clusters setting.
15
-
15
+ # @option arguments [Hash] :headers Custom HTTP headers
16
16
  #
17
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/cluster-update-settings.html
17
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html
18
18
  #
19
19
  def get_settings(arguments = {})
20
+ headers = arguments.delete(:headers) || {}
21
+
20
22
  arguments = arguments.clone
21
23
 
22
24
  method = Elasticsearch::API::HTTP_GET
@@ -24,7 +26,7 @@ module Elasticsearch
24
26
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
25
27
 
26
28
  body = nil
27
- perform_request(method, path, params, body).body
29
+ perform_request(method, path, params, body, headers).body
28
30
  end
29
31
 
30
32
  # Register this action with its valid params when the module is loaded.
@@ -10,7 +10,7 @@ module Elasticsearch
10
10
  #
11
11
  # @option arguments [List] :index Limit the information returned to a specific index
12
12
  # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both.
13
- # (options: open,closed,none,all)
13
+ # (options: open,closed,hidden,none,all)
14
14
 
15
15
  # @option arguments [String] :level Specify the level of detail for returned information
16
16
  # (options: cluster,indices,shards)
@@ -28,10 +28,13 @@ module Elasticsearch
28
28
  # @option arguments [String] :wait_for_status Wait until cluster is in a specific state
29
29
  # (options: green,yellow,red)
30
30
 
31
+ # @option arguments [Hash] :headers Custom HTTP headers
31
32
  #
32
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/cluster-health.html
33
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html
33
34
  #
34
35
  def health(arguments = {})
36
+ headers = arguments.delete(:headers) || {}
37
+
35
38
  arguments = arguments.clone
36
39
 
37
40
  _index = arguments.delete(:index)
@@ -41,11 +44,11 @@ module Elasticsearch
41
44
  "_cluster/health/#{Utils.__listify(_index)}"
42
45
  else
43
46
  "_cluster/health"
44
- end
47
+ end
45
48
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
46
49
 
47
50
  body = nil
48
- perform_request(method, path, params, body).body
51
+ perform_request(method, path, params, body, headers).body
49
52
  end
50
53
 
51
54
  # Register this action with its valid params when the module is loaded.
@@ -11,11 +11,13 @@ module Elasticsearch
11
11
  #
12
12
  # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
13
13
  # @option arguments [Time] :master_timeout Specify timeout for connection to master
14
-
14
+ # @option arguments [Hash] :headers Custom HTTP headers
15
15
  #
16
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/cluster-pending.html
16
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html
17
17
  #
18
18
  def pending_tasks(arguments = {})
19
+ headers = arguments.delete(:headers) || {}
20
+
19
21
  arguments = arguments.clone
20
22
 
21
23
  method = Elasticsearch::API::HTTP_GET
@@ -23,7 +25,7 @@ module Elasticsearch
23
25
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
24
26
 
25
27
  body = nil
26
- perform_request(method, path, params, body).body
28
+ perform_request(method, path, params, body, headers).body
27
29
  end
28
30
 
29
31
  # Register this action with its valid params when the module is loaded.