elasticsearch-serverless 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (242) hide show
  1. checksums.yaml +4 -4
  2. data/lib/elasticsearch-serverless/api/async_search/delete.rb +9 -1
  3. data/lib/elasticsearch-serverless/api/async_search/get.rb +17 -3
  4. data/lib/elasticsearch-serverless/api/async_search/status.rb +9 -1
  5. data/lib/elasticsearch-serverless/api/async_search/submit.rb +15 -4
  6. data/lib/elasticsearch-serverless/api/bulk.rb +17 -4
  7. data/lib/elasticsearch-serverless/api/cat/aliases.rb +22 -6
  8. data/lib/elasticsearch-serverless/api/cat/component_templates.rb +22 -6
  9. data/lib/elasticsearch-serverless/api/cat/count.rb +25 -8
  10. data/lib/elasticsearch-serverless/api/cat/help.rb +16 -6
  11. data/lib/elasticsearch-serverless/api/cat/indices.rb +31 -9
  12. data/lib/elasticsearch-serverless/api/cat/ml_data_frame_analytics.rb +24 -8
  13. data/lib/elasticsearch-serverless/api/cat/ml_datafeeds.rb +29 -8
  14. data/lib/elasticsearch-serverless/api/cat/ml_jobs.rb +29 -8
  15. data/lib/elasticsearch-serverless/api/cat/ml_trained_models.rb +25 -8
  16. data/lib/elasticsearch-serverless/api/cat/transforms.rb +27 -9
  17. data/lib/elasticsearch-serverless/api/clear_scroll.rb +12 -3
  18. data/lib/elasticsearch-serverless/api/close_point_in_time.rb +3 -1
  19. data/lib/elasticsearch-serverless/api/cluster/delete_component_template.rb +14 -3
  20. data/lib/elasticsearch-serverless/api/cluster/exists_component_template.rb +18 -5
  21. data/lib/elasticsearch-serverless/api/cluster/get_component_template.rb +16 -4
  22. data/lib/elasticsearch-serverless/api/cluster/info.rb +11 -2
  23. data/lib/elasticsearch-serverless/api/cluster/put_component_template.rb +17 -7
  24. data/lib/elasticsearch-serverless/api/connector/check_in.rb +9 -1
  25. data/lib/elasticsearch-serverless/api/connector/delete.rb +14 -6
  26. data/lib/elasticsearch-serverless/api/connector/get.rb +13 -5
  27. data/lib/elasticsearch-serverless/api/connector/list.rb +7 -5
  28. data/lib/elasticsearch-serverless/api/connector/post.rb +7 -5
  29. data/lib/elasticsearch-serverless/api/connector/put.rb +14 -6
  30. data/lib/elasticsearch-serverless/api/connector/sync_job_cancel.rb +13 -5
  31. data/lib/elasticsearch-serverless/api/connector/sync_job_delete.rb +13 -5
  32. data/lib/elasticsearch-serverless/api/connector/sync_job_get.rb +13 -5
  33. data/lib/elasticsearch-serverless/api/connector/sync_job_list.rb +8 -6
  34. data/lib/elasticsearch-serverless/api/connector/sync_job_post.rb +7 -5
  35. data/lib/elasticsearch-serverless/api/connector/update_active_filtering.rb +9 -1
  36. data/lib/elasticsearch-serverless/api/connector/update_api_key_id.rb +13 -5
  37. data/lib/elasticsearch-serverless/api/connector/update_configuration.rb +13 -5
  38. data/lib/elasticsearch-serverless/api/connector/update_error.rb +9 -1
  39. data/lib/elasticsearch-serverless/api/connector/update_filtering.rb +13 -5
  40. data/lib/elasticsearch-serverless/api/connector/update_filtering_validation.rb +9 -1
  41. data/lib/elasticsearch-serverless/api/connector/update_index_name.rb +13 -5
  42. data/lib/elasticsearch-serverless/api/connector/update_name.rb +13 -5
  43. data/lib/elasticsearch-serverless/api/connector/update_native.rb +13 -5
  44. data/lib/elasticsearch-serverless/api/connector/update_pipeline.rb +13 -5
  45. data/lib/elasticsearch-serverless/api/connector/update_scheduling.rb +13 -5
  46. data/lib/elasticsearch-serverless/api/connector/update_service_type.rb +13 -5
  47. data/lib/elasticsearch-serverless/api/connector/update_status.rb +9 -1
  48. data/lib/elasticsearch-serverless/api/count.rb +30 -10
  49. data/lib/elasticsearch-serverless/api/create.rb +21 -5
  50. data/lib/elasticsearch-serverless/api/delete.rb +17 -5
  51. data/lib/elasticsearch-serverless/api/delete_by_query.rb +38 -11
  52. data/lib/elasticsearch-serverless/api/delete_script.rb +14 -3
  53. data/lib/elasticsearch-serverless/api/enrich/delete_policy.rb +10 -1
  54. data/lib/elasticsearch-serverless/api/enrich/execute_policy.rb +9 -1
  55. data/lib/elasticsearch-serverless/api/enrich/get_policy.rb +12 -2
  56. data/lib/elasticsearch-serverless/api/enrich/put_policy.rb +10 -1
  57. data/lib/elasticsearch-serverless/api/enrich/stats.rb +4 -1
  58. data/lib/elasticsearch-serverless/api/eql/delete.rb +12 -2
  59. data/lib/elasticsearch-serverless/api/eql/get.rb +13 -3
  60. data/lib/elasticsearch-serverless/api/eql/get_status.rb +9 -1
  61. data/lib/elasticsearch-serverless/api/eql/search.rb +9 -1
  62. data/lib/elasticsearch-serverless/api/exists.rb +20 -6
  63. data/lib/elasticsearch-serverless/api/exists_source.rb +16 -4
  64. data/lib/elasticsearch-serverless/api/explain.rb +17 -5
  65. data/lib/elasticsearch-serverless/api/field_caps.rb +12 -2
  66. data/lib/elasticsearch-serverless/api/get.rb +18 -5
  67. data/lib/elasticsearch-serverless/api/get_script.rb +10 -1
  68. data/lib/elasticsearch-serverless/api/get_source.rb +10 -1
  69. data/lib/elasticsearch-serverless/api/graph/explore.rb +12 -2
  70. data/lib/elasticsearch-serverless/api/index.rb +25 -6
  71. data/lib/elasticsearch-serverless/api/indices/add_block.rb +11 -2
  72. data/lib/elasticsearch-serverless/api/indices/analyze.rb +12 -2
  73. data/lib/elasticsearch-serverless/api/indices/create.rb +16 -4
  74. data/lib/elasticsearch-serverless/api/indices/create_data_stream.rb +16 -2
  75. data/lib/elasticsearch-serverless/api/indices/data_streams_stats.rb +15 -3
  76. data/lib/elasticsearch-serverless/api/indices/delete.rb +25 -7
  77. data/lib/elasticsearch-serverless/api/indices/delete_alias.rb +18 -5
  78. data/lib/elasticsearch-serverless/api/indices/delete_data_lifecycle.rb +11 -2
  79. data/lib/elasticsearch-serverless/api/indices/delete_data_stream.rb +10 -1
  80. data/lib/elasticsearch-serverless/api/indices/delete_index_template.rb +9 -1
  81. data/lib/elasticsearch-serverless/api/indices/exists.rb +17 -4
  82. data/lib/elasticsearch-serverless/api/indices/exists_alias.rb +19 -5
  83. data/lib/elasticsearch-serverless/api/indices/exists_index_template.rb +9 -1
  84. data/lib/elasticsearch-serverless/api/indices/explain_data_lifecycle.rb +11 -2
  85. data/lib/elasticsearch-serverless/api/indices/get.rb +18 -4
  86. data/lib/elasticsearch-serverless/api/indices/get_alias.rb +23 -6
  87. data/lib/elasticsearch-serverless/api/indices/get_data_lifecycle.rb +16 -3
  88. data/lib/elasticsearch-serverless/api/indices/get_data_stream.rb +14 -3
  89. data/lib/elasticsearch-serverless/api/indices/get_index_template.rb +9 -1
  90. data/lib/elasticsearch-serverless/api/indices/get_mapping.rb +21 -5
  91. data/lib/elasticsearch-serverless/api/indices/get_settings.rb +26 -6
  92. data/lib/elasticsearch-serverless/api/indices/migrate_to_data_stream.rb +10 -1
  93. data/lib/elasticsearch-serverless/api/indices/modify_data_stream.rb +4 -1
  94. data/lib/elasticsearch-serverless/api/indices/put_alias.rb +20 -5
  95. data/lib/elasticsearch-serverless/api/indices/put_data_lifecycle.rb +22 -6
  96. data/lib/elasticsearch-serverless/api/indices/put_index_template.rb +11 -2
  97. data/lib/elasticsearch-serverless/api/indices/put_mapping.rb +20 -5
  98. data/lib/elasticsearch-serverless/api/indices/put_settings.rb +28 -7
  99. data/lib/elasticsearch-serverless/api/indices/put_template.rb +14 -3
  100. data/lib/elasticsearch-serverless/api/indices/refresh.rb +19 -4
  101. data/lib/elasticsearch-serverless/api/indices/resolve_index.rb +15 -3
  102. data/lib/elasticsearch-serverless/api/indices/rollover.rb +19 -5
  103. data/lib/elasticsearch-serverless/api/indices/simulate_index_template.rb +9 -1
  104. data/lib/elasticsearch-serverless/api/indices/simulate_template.rb +11 -2
  105. data/lib/elasticsearch-serverless/api/indices/update_aliases.rb +8 -3
  106. data/lib/elasticsearch-serverless/api/indices/validate_query.rb +24 -7
  107. data/lib/elasticsearch-serverless/api/inference/delete.rb +9 -1
  108. data/lib/elasticsearch-serverless/api/inference/get.rb +9 -1
  109. data/lib/elasticsearch-serverless/api/inference/inference.rb +9 -1
  110. data/lib/elasticsearch-serverless/api/inference/put.rb +9 -1
  111. data/lib/elasticsearch-serverless/api/info.rb +4 -1
  112. data/lib/elasticsearch-serverless/api/ingest/delete_pipeline.rb +15 -4
  113. data/lib/elasticsearch-serverless/api/ingest/get_pipeline.rb +14 -3
  114. data/lib/elasticsearch-serverless/api/ingest/processor_grok.rb +3 -1
  115. data/lib/elasticsearch-serverless/api/ingest/put_pipeline.rb +9 -1
  116. data/lib/elasticsearch-serverless/api/ingest/simulate.rb +11 -2
  117. data/lib/elasticsearch-serverless/api/license/get.rb +8 -4
  118. data/lib/elasticsearch-serverless/api/logstash/delete_pipeline.rb +9 -1
  119. data/lib/elasticsearch-serverless/api/logstash/get_pipeline.rb +9 -1
  120. data/lib/elasticsearch-serverless/api/logstash/put_pipeline.rb +9 -1
  121. data/lib/elasticsearch-serverless/api/machine_learning/close_job.rb +14 -4
  122. data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar.rb +10 -1
  123. data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_event.rb +12 -3
  124. data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_job.rb +12 -3
  125. data/lib/elasticsearch-serverless/api/machine_learning/delete_data_frame_analytics.rb +10 -2
  126. data/lib/elasticsearch-serverless/api/machine_learning/delete_datafeed.rb +16 -4
  127. data/lib/elasticsearch-serverless/api/machine_learning/delete_filter.rb +10 -2
  128. data/lib/elasticsearch-serverless/api/machine_learning/delete_job.rb +17 -6
  129. data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model.rb +11 -3
  130. data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model_alias.rb +10 -2
  131. data/lib/elasticsearch-serverless/api/machine_learning/estimate_model_memory.rb +4 -1
  132. data/lib/elasticsearch-serverless/api/machine_learning/evaluate_data_frame.rb +4 -2
  133. data/lib/elasticsearch-serverless/api/machine_learning/flush_job.rb +19 -6
  134. data/lib/elasticsearch-serverless/api/machine_learning/get_calendar_events.rb +9 -1
  135. data/lib/elasticsearch-serverless/api/machine_learning/get_calendars.rb +9 -1
  136. data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics.rb +24 -4
  137. data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics_stats.rb +21 -3
  138. data/lib/elasticsearch-serverless/api/machine_learning/get_datafeed_stats.rb +20 -3
  139. data/lib/elasticsearch-serverless/api/machine_learning/get_datafeeds.rb +23 -4
  140. data/lib/elasticsearch-serverless/api/machine_learning/get_filters.rb +9 -1
  141. data/lib/elasticsearch-serverless/api/machine_learning/get_job_stats.rb +21 -3
  142. data/lib/elasticsearch-serverless/api/machine_learning/get_jobs.rb +23 -4
  143. data/lib/elasticsearch-serverless/api/machine_learning/get_overall_buckets.rb +30 -7
  144. data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models.rb +28 -7
  145. data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models_stats.rb +17 -3
  146. data/lib/elasticsearch-serverless/api/machine_learning/infer_trained_model.rb +9 -1
  147. data/lib/elasticsearch-serverless/api/machine_learning/open_job.rb +10 -2
  148. data/lib/elasticsearch-serverless/api/machine_learning/post_calendar_events.rb +9 -1
  149. data/lib/elasticsearch-serverless/api/machine_learning/preview_data_frame_analytics.rb +9 -1
  150. data/lib/elasticsearch-serverless/api/machine_learning/preview_datafeed.rb +13 -2
  151. data/lib/elasticsearch-serverless/api/machine_learning/put_calendar.rb +9 -1
  152. data/lib/elasticsearch-serverless/api/machine_learning/put_calendar_job.rb +9 -1
  153. data/lib/elasticsearch-serverless/api/machine_learning/put_data_frame_analytics.rb +12 -2
  154. data/lib/elasticsearch-serverless/api/machine_learning/put_datafeed.rb +17 -5
  155. data/lib/elasticsearch-serverless/api/machine_learning/put_filter.rb +9 -1
  156. data/lib/elasticsearch-serverless/api/machine_learning/put_job.rb +11 -2
  157. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model.rb +14 -3
  158. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_alias.rb +12 -2
  159. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_definition_part.rb +11 -2
  160. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_vocabulary.rb +9 -1
  161. data/lib/elasticsearch-serverless/api/machine_learning/reset_job.rb +14 -3
  162. data/lib/elasticsearch-serverless/api/machine_learning/start_data_frame_analytics.rb +14 -3
  163. data/lib/elasticsearch-serverless/api/machine_learning/start_datafeed.rb +27 -8
  164. data/lib/elasticsearch-serverless/api/machine_learning/start_trained_model_deployment.rb +25 -5
  165. data/lib/elasticsearch-serverless/api/machine_learning/stop_data_frame_analytics.rb +23 -4
  166. data/lib/elasticsearch-serverless/api/machine_learning/stop_datafeed.rb +19 -3
  167. data/lib/elasticsearch-serverless/api/machine_learning/stop_trained_model_deployment.rb +15 -3
  168. data/lib/elasticsearch-serverless/api/machine_learning/update_data_frame_analytics.rb +12 -2
  169. data/lib/elasticsearch-serverless/api/machine_learning/update_datafeed.rb +21 -4
  170. data/lib/elasticsearch-serverless/api/machine_learning/update_filter.rb +9 -1
  171. data/lib/elasticsearch-serverless/api/machine_learning/update_job.rb +9 -1
  172. data/lib/elasticsearch-serverless/api/machine_learning/update_trained_model_deployment.rb +15 -2
  173. data/lib/elasticsearch-serverless/api/mget.rb +17 -4
  174. data/lib/elasticsearch-serverless/api/msearch.rb +15 -1
  175. data/lib/elasticsearch-serverless/api/msearch_template.rb +16 -4
  176. data/lib/elasticsearch-serverless/api/mtermvectors.rb +14 -8
  177. data/lib/elasticsearch-serverless/api/open_point_in_time.rb +14 -3
  178. data/lib/elasticsearch-serverless/api/ping.rb +4 -1
  179. data/lib/elasticsearch-serverless/api/put_script.rb +18 -5
  180. data/lib/elasticsearch-serverless/api/query_rules/delete_rule.rb +9 -1
  181. data/lib/elasticsearch-serverless/api/query_rules/delete_ruleset.rb +9 -1
  182. data/lib/elasticsearch-serverless/api/query_rules/get_rule.rb +9 -1
  183. data/lib/elasticsearch-serverless/api/query_rules/get_ruleset.rb +9 -1
  184. data/lib/elasticsearch-serverless/api/query_rules/list_rulesets.rb +3 -1
  185. data/lib/elasticsearch-serverless/api/query_rules/put_rule.rb +9 -1
  186. data/lib/elasticsearch-serverless/api/query_rules/put_ruleset.rb +9 -1
  187. data/lib/elasticsearch-serverless/api/rank_eval.rb +11 -2
  188. data/lib/elasticsearch-serverless/api/reindex.rb +11 -7
  189. data/lib/elasticsearch-serverless/api/render_search_template.rb +11 -2
  190. data/lib/elasticsearch-serverless/api/scripts_painless_execute.rb +4 -1
  191. data/lib/elasticsearch-serverless/api/scroll.rb +9 -1
  192. data/lib/elasticsearch-serverless/api/search.rb +107 -30
  193. data/lib/elasticsearch-serverless/api/search_application/delete.rb +9 -1
  194. data/lib/elasticsearch-serverless/api/search_application/delete_behavioral_analytics.rb +9 -1
  195. data/lib/elasticsearch-serverless/api/search_application/get.rb +9 -1
  196. data/lib/elasticsearch-serverless/api/search_application/get_behavioral_analytics.rb +9 -1
  197. data/lib/elasticsearch-serverless/api/search_application/list.rb +3 -1
  198. data/lib/elasticsearch-serverless/api/search_application/put.rb +9 -1
  199. data/lib/elasticsearch-serverless/api/search_application/put_behavioral_analytics.rb +9 -1
  200. data/lib/elasticsearch-serverless/api/search_application/search.rb +9 -1
  201. data/lib/elasticsearch-serverless/api/search_mvt.rb +27 -7
  202. data/lib/elasticsearch-serverless/api/search_template.rb +22 -6
  203. data/lib/elasticsearch-serverless/api/security/authenticate.rb +6 -2
  204. data/lib/elasticsearch-serverless/api/security/create_api_key.rb +4 -1
  205. data/lib/elasticsearch-serverless/api/security/get_api_key.rb +19 -7
  206. data/lib/elasticsearch-serverless/api/security/has_privileges.rb +10 -1
  207. data/lib/elasticsearch-serverless/api/security/invalidate_api_key.rb +4 -1
  208. data/lib/elasticsearch-serverless/api/security/query_api_keys.rb +7 -3
  209. data/lib/elasticsearch-serverless/api/security/update_api_key.rb +10 -1
  210. data/lib/elasticsearch-serverless/api/sql/clear_cursor.rb +3 -1
  211. data/lib/elasticsearch-serverless/api/sql/delete_async.rb +9 -1
  212. data/lib/elasticsearch-serverless/api/sql/get_async.rb +15 -4
  213. data/lib/elasticsearch-serverless/api/sql/get_async_status.rb +9 -1
  214. data/lib/elasticsearch-serverless/api/sql/query.rb +3 -1
  215. data/lib/elasticsearch-serverless/api/sql/translate.rb +3 -1
  216. data/lib/elasticsearch-serverless/api/synonyms/delete_synonym.rb +9 -1
  217. data/lib/elasticsearch-serverless/api/synonyms/delete_synonym_rule.rb +9 -1
  218. data/lib/elasticsearch-serverless/api/synonyms/get_synonym.rb +9 -1
  219. data/lib/elasticsearch-serverless/api/synonyms/get_synonym_rule.rb +9 -1
  220. data/lib/elasticsearch-serverless/api/synonyms/get_synonyms_sets.rb +3 -1
  221. data/lib/elasticsearch-serverless/api/synonyms/put_synonym.rb +9 -1
  222. data/lib/elasticsearch-serverless/api/synonyms/put_synonym_rule.rb +9 -1
  223. data/lib/elasticsearch-serverless/api/tasks/get.rb +13 -3
  224. data/lib/elasticsearch-serverless/api/terms_enum.rb +9 -1
  225. data/lib/elasticsearch-serverless/api/termvectors.rb +21 -9
  226. data/lib/elasticsearch-serverless/api/transform/delete_transform.rb +14 -3
  227. data/lib/elasticsearch-serverless/api/transform/get_transform.rb +23 -4
  228. data/lib/elasticsearch-serverless/api/transform/get_transform_stats.rb +20 -3
  229. data/lib/elasticsearch-serverless/api/transform/preview_transform.rb +15 -5
  230. data/lib/elasticsearch-serverless/api/transform/put_transform.rb +17 -7
  231. data/lib/elasticsearch-serverless/api/transform/reset_transform.rb +14 -3
  232. data/lib/elasticsearch-serverless/api/transform/schedule_now_transform.rb +11 -3
  233. data/lib/elasticsearch-serverless/api/transform/start_transform.rb +10 -3
  234. data/lib/elasticsearch-serverless/api/transform/stop_transform.rb +23 -6
  235. data/lib/elasticsearch-serverless/api/transform/update_transform.rb +15 -4
  236. data/lib/elasticsearch-serverless/api/update.rb +23 -7
  237. data/lib/elasticsearch-serverless/api/update_by_query.rb +36 -9
  238. data/lib/elasticsearch-serverless/api.rb +3 -2
  239. data/lib/elasticsearch-serverless/version.rb +1 -1
  240. data/lib/elasticsearch-serverless.rb +4 -3
  241. metadata +5 -76
  242. data/lib/elasticsearch-serverless/api/connector/last_sync.rb +0 -59
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f39ec61d8f616ba72ee40490819cf6db4ead4f658f404f7c376757f4b41c1bcb
4
- data.tar.gz: caab7748047b2dc329dba48297a8b5cc8999ec2b0ebed705766a4f73a1506060
3
+ metadata.gz: f65fea7b65dd1eae81bcd4369221d71d2809895df40f168196005179f10a6c05
4
+ data.tar.gz: 4a958e6a4bf23122ba8709c89fa82e932ec240f18146a07f5dc8cde39c0dffa7
5
5
  SHA512:
6
- metadata.gz: d9c0bc7a1bc9b768e99b34f2319b79415cf5ffa3247df6d284b31280fbd2d8c24101ed01956492759beeb4f08bfb5f7f86ed3eb629b5f60773e2ac39caae9c69
7
- data.tar.gz: 0ad8a1c51a4ad84d941b5c72dd561c49354eda3e3412e1a040168da554a8cd4c51aa2852e413b08a3d5480bc7bcc64f567c2f0ba5580cc8cc9eb63553b938cbc
6
+ metadata.gz: f913a7e87f209fc6190a2fa18fd59036ddff358b08a05a333f530cb55134c6b2a067463311948cda968118b99c03bb72c5d3b4550e8c4e6f18c2a337e439acc2
7
+ data.tar.gz: d274e0623ae7970d614631f0a57ea518fdbb108f340557d5e9faac7621516c4d6e2247cd700837a00452577a8632022485101cafe4140217b6117814ef410c4e
@@ -33,6 +33,14 @@ module ElasticsearchServerless
33
33
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html
34
34
  #
35
35
  def delete(arguments = {})
36
+ request_opts = { endpoint: arguments[:endpoint] || "async_search.delete" }
37
+
38
+ defined_params = [:id].inject({}) do |set_variables, variable|
39
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
40
+ set_variables
41
+ end
42
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
43
+
36
44
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
37
45
 
38
46
  arguments = arguments.clone
@@ -47,7 +55,7 @@ module ElasticsearchServerless
47
55
  params = {}
48
56
 
49
57
  ElasticsearchServerless::API::Response.new(
50
- perform_request(method, path, params, body, headers)
58
+ perform_request(method, path, params, body, headers, request_opts)
51
59
  )
52
60
  end
53
61
  end
@@ -26,14 +26,28 @@ module ElasticsearchServerless
26
26
  # If the Elasticsearch security features are enabled, access to the results of a specific async search is restricted to the user or API key that submitted it.
27
27
  #
28
28
  # @option arguments [String] :id A unique identifier for the async search. (*Required*)
29
- # @option arguments [Time] :keep_alive Specifies how long the async search should be available in the cluster. When not specified, the +keep_alive+ set with the corresponding submit async request will be used. Otherwise, it is possible to override the value and extend the validity of the request. When this period expires, the search, if still running, is cancelled. If the search is completed, its saved results are deleted.
29
+ # @option arguments [Time] :keep_alive Specifies how long the async search should be available in the cluster.
30
+ # When not specified, the +keep_alive+ set with the corresponding submit async request will be used.
31
+ # Otherwise, it is possible to override the value and extend the validity of the request.
32
+ # When this period expires, the search, if still running, is cancelled.
33
+ # If the search is completed, its saved results are deleted.
30
34
  # @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response
31
- # @option arguments [Time] :wait_for_completion_timeout Specifies to wait for the search to be completed up until the provided timeout. Final results will be returned if available before the timeout expires, otherwise the currently available results will be returned once the timeout expires. By default no timeout is set meaning that the currently available results will be returned without any additional wait.
35
+ # @option arguments [Time] :wait_for_completion_timeout Specifies to wait for the search to be completed up until the provided timeout.
36
+ # Final results will be returned if available before the timeout expires, otherwise the currently available results will be returned once the timeout expires.
37
+ # By default no timeout is set meaning that the currently available results will be returned without any additional wait.
32
38
  # @option arguments [Hash] :headers Custom HTTP headers
33
39
  #
34
40
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html
35
41
  #
36
42
  def get(arguments = {})
43
+ request_opts = { endpoint: arguments[:endpoint] || "async_search.get" }
44
+
45
+ defined_params = [:id].inject({}) do |set_variables, variable|
46
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
47
+ set_variables
48
+ end
49
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
50
+
37
51
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
38
52
 
39
53
  arguments = arguments.clone
@@ -48,7 +62,7 @@ module ElasticsearchServerless
48
62
  params = Utils.process_params(arguments)
49
63
 
50
64
  ElasticsearchServerless::API::Response.new(
51
- perform_request(method, path, params, body, headers)
65
+ perform_request(method, path, params, body, headers, request_opts)
52
66
  )
53
67
  end
54
68
  end
@@ -32,6 +32,14 @@ module ElasticsearchServerless
32
32
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html
33
33
  #
34
34
  def status(arguments = {})
35
+ request_opts = { endpoint: arguments[:endpoint] || "async_search.status" }
36
+
37
+ defined_params = [:id].inject({}) do |set_variables, variable|
38
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
39
+ set_variables
40
+ end
41
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
42
+
35
43
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
36
44
 
37
45
  arguments = arguments.clone
@@ -46,7 +54,7 @@ module ElasticsearchServerless
46
54
  params = {}
47
55
 
48
56
  ElasticsearchServerless::API::Response.new(
49
- perform_request(method, path, params, body, headers)
57
+ perform_request(method, path, params, body, headers, request_opts)
50
58
  )
51
59
  end
52
60
  end
@@ -29,14 +29,17 @@ module ElasticsearchServerless
29
29
  # The maximum allowed size for a stored async search response can be set by changing the +search.max_async_search_response_size+ cluster level setting.
30
30
  #
31
31
  # @option arguments [String, Array] :index A comma-separated list of index names to search; use +_all+ or empty string to perform the operation on all indices
32
- # @option arguments [Time] :wait_for_completion_timeout Blocks and waits until the search is completed up to a certain timeout. When the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster. Server default: 1s.
32
+ # @option arguments [Time] :wait_for_completion_timeout Blocks and waits until the search is completed up to a certain timeout.
33
+ # When the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster. Server default: 1s.
33
34
  # @option arguments [Boolean] :keep_on_completion If +true+, results are stored for later retrieval when the search completes within the +wait_for_completion_timeout+.
34
- # @option arguments [Time] :keep_alive Specifies how long the async search needs to be available. Ongoing async searches and any saved search results are deleted after this period. Server default: 5d.
35
+ # @option arguments [Time] :keep_alive Specifies how long the async search needs to be available.
36
+ # Ongoing async searches and any saved search results are deleted after this period. Server default: 5d.
35
37
  # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes +_all+ string or when no indices have been specified)
36
38
  # @option arguments [Boolean] :allow_partial_search_results Indicate if an error should be returned if there is a partial search failure or timeout
37
39
  # @option arguments [String] :analyzer The analyzer to use for the query string
38
40
  # @option arguments [Boolean] :analyze_wildcard Specify whether wildcard and prefix queries should be analyzed (default: false)
39
- # @option arguments [Integer] :batched_reduce_size Affects how often partial results become available, which happens whenever shard results are reduced. A partial reduction is performed every time the coordinating node has received a certain number of new shard responses (5 by default). Server default: 5.
41
+ # @option arguments [Integer] :batched_reduce_size Affects how often partial results become available, which happens whenever shard results are reduced.
42
+ # A partial reduction is performed every time the coordinating node has received a certain number of new shard responses (5 by default). Server default: 5.
40
43
  # @option arguments [Boolean] :ccs_minimize_roundtrips The default value is the only supported value.
41
44
  # @option arguments [String] :default_operator The default operator for query string query (AND or OR)
42
45
  # @option arguments [String] :df The field to use as default where no field prefix is given in the query string
@@ -81,6 +84,14 @@ module ElasticsearchServerless
81
84
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html
82
85
  #
83
86
  def submit(arguments = {})
87
+ request_opts = { endpoint: arguments[:endpoint] || "async_search.submit" }
88
+
89
+ defined_params = [:index].inject({}) do |set_variables, variable|
90
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
91
+ set_variables
92
+ end
93
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
94
+
84
95
  arguments = arguments.clone
85
96
  headers = arguments.delete(:headers) || {}
86
97
 
@@ -97,7 +108,7 @@ module ElasticsearchServerless
97
108
  params = Utils.process_params(arguments)
98
109
 
99
110
  ElasticsearchServerless::API::Response.new(
100
- perform_request(method, path, params, body, headers)
111
+ perform_request(method, path, params, body, headers, request_opts)
101
112
  )
102
113
  end
103
114
  end
@@ -21,18 +21,23 @@
21
21
  module ElasticsearchServerless
22
22
  module API
23
23
  module Actions
24
+ # Bulk index or delete documents.
24
25
  # Performs multiple indexing or delete operations in a single API call.
25
26
  # This reduces overhead and can greatly increase indexing speed.
26
27
  #
27
28
  # @option arguments [String] :index Name of the data stream, index, or index alias to perform bulk actions on.
28
- # @option arguments [String] :pipeline ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, then setting the value to +_none+ disables the default ingest pipeline for this request. If a final pipeline is configured it will always run, regardless of the value of this parameter.
29
- # @option arguments [String] :refresh If +true+, Elasticsearch refreshes 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+ do nothing with refreshes. Valid values: +true+, +false+, +wait_for+. Server default: false.
29
+ # @option arguments [String] :pipeline ID of the pipeline to use to preprocess incoming documents.
30
+ # If the index has a default ingest pipeline specified, then setting the value to +_none+ disables the default ingest pipeline for this request.
31
+ # If a final pipeline is configured it will always run, regardless of the value of this parameter.
32
+ # @option arguments [String] :refresh If +true+, Elasticsearch refreshes 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+ do nothing with refreshes.
33
+ # Valid values: +true+, +false+, +wait_for+. Server default: false.
30
34
  # @option arguments [String] :routing Custom value used to route operations to a specific shard.
31
35
  # @option arguments [Boolean, String, Array<String>] :_source +true+ or +false+ to return the +_source+ field or not, or a list of fields to return.
32
36
  # @option arguments [String, Array<String>] :_source_excludes A comma-separated list of source fields to exclude from the response.
33
37
  # @option arguments [String, Array<String>] :_source_includes A comma-separated list of source fields to include in the response.
34
38
  # @option arguments [Time] :timeout Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. Server default: 1m.
35
- # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation. Set to all or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). Server default: 1.
39
+ # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation.
40
+ # Set to all or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). Server default: 1.
36
41
  # @option arguments [Boolean] :require_alias If +true+, the request’s actions must target an index alias.
37
42
  # @option arguments [Hash] :headers Custom HTTP headers
38
43
  # @option arguments [String|Array] :body operations. Array of Strings, Header/Data pairs, or the conveniency "combined" format can be passed, refer to ElasticsearchServerless::API::Utils.bulkify documentation.
@@ -40,6 +45,14 @@ module ElasticsearchServerless
40
45
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html
41
46
  #
42
47
  def bulk(arguments = {})
48
+ request_opts = { endpoint: arguments[:endpoint] || "bulk" }
49
+
50
+ defined_params = [:index].inject({}) do |set_variables, variable|
51
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
52
+ set_variables
53
+ end
54
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
55
+
43
56
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
44
57
 
45
58
  arguments = arguments.clone
@@ -65,7 +78,7 @@ module ElasticsearchServerless
65
78
 
66
79
  headers.merge!("Content-Type" => "application/x-ndjson")
67
80
  ElasticsearchServerless::API::Response.new(
68
- perform_request(method, path, params, payload, headers)
81
+ perform_request(method, path, params, payload, headers, request_opts)
69
82
  )
70
83
  end
71
84
  end
@@ -22,24 +22,40 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Cat
24
24
  module Actions
25
+ # Get aliases.
25
26
  # Retrieves the cluster’s index aliases, including filter and routing information.
26
27
  # The API does not return data stream aliases.
27
- # IMPORTANT: cat APIs are only intended for human consumption using the command line or the Kibana console. They are not intended for use by applications. For application consumption, use the aliases API.
28
+ # CAT APIs are only intended for human consumption using the command line or the Kibana console. They are not intended for use by applications. For application consumption, use the aliases API.
28
29
  #
29
30
  # @option arguments [String, Array<String>] :name A comma-separated list of aliases to retrieve. Supports wildcards (+*+). To retrieve all aliases, omit this parameter or use +*+ or +_all+.
30
31
  # @option arguments [String, Array<String>] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both.
31
- # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.
32
+ # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to
33
+ # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.
32
34
  # @option arguments [String, Array<String>] :h List of columns to appear in the response. Supports simple wildcards.
33
- # @option arguments [Boolean] :help When set to +true+ will output available columns. This option can't be combined with any other query string option.
34
- # @option arguments [Boolean] :local If +true+, the request computes the list of selected nodes from the local cluster state. If +false+ the list of selected nodes are computed from the cluster state of the master node. In both cases the coordinating node will send requests for further information to each selected node.
35
+ # @option arguments [Boolean] :help When set to +true+ will output available columns. This option
36
+ # can't be combined with any other query string option.
37
+ # @option arguments [Boolean] :local If +true+, the request computes the list of selected nodes from the
38
+ # local cluster state. If +false+ the list of selected nodes are computed
39
+ # from the cluster state of the master node. In both cases the coordinating
40
+ # node will send requests for further information to each selected node.
35
41
  # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s.
36
- # @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting +:asc+ or +:desc+ as a suffix to the column name.
42
+ # @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
43
+ # Sorting defaults to ascending and can be changed by setting +:asc+
44
+ # or +:desc+ as a suffix to the column name.
37
45
  # @option arguments [Boolean] :v When set to +true+ will enable verbose output.
38
46
  # @option arguments [Hash] :headers Custom HTTP headers
39
47
  #
40
48
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-alias.html
41
49
  #
42
50
  def aliases(arguments = {})
51
+ request_opts = { endpoint: arguments[:endpoint] || "cat.aliases" }
52
+
53
+ defined_params = [:name].inject({}) do |set_variables, variable|
54
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
55
+ set_variables
56
+ end
57
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
58
+
43
59
  arguments = arguments.clone
44
60
  headers = arguments.delete(:headers) || {}
45
61
 
@@ -57,7 +73,7 @@ module ElasticsearchServerless
57
73
  params[:h] = Utils.listify(params[:h]) if params[:h]
58
74
 
59
75
  ElasticsearchServerless::API::Response.new(
60
- perform_request(method, path, params, body, headers)
76
+ perform_request(method, path, params, body, headers, request_opts)
61
77
  )
62
78
  end
63
79
  end
@@ -22,24 +22,40 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Cat
24
24
  module Actions
25
+ # Get component templates.
25
26
  # Returns information about component templates in a cluster.
26
27
  # Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.
27
- # IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console.
28
+ # CAT APIs are only intended for human consumption using the command line or Kibana console.
28
29
  # They are not intended for use by applications. For application consumption, use the get component template API.
29
30
  #
30
31
  # @option arguments [String] :name The name of the component template. Accepts wildcard expressions. If omitted, all component templates are returned.
31
- # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.
32
+ # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to
33
+ # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.
32
34
  # @option arguments [String, Array<String>] :h List of columns to appear in the response. Supports simple wildcards.
33
- # @option arguments [Boolean] :help When set to +true+ will output available columns. This option can't be combined with any other query string option.
34
- # @option arguments [Boolean] :local If +true+, the request computes the list of selected nodes from the local cluster state. If +false+ the list of selected nodes are computed from the cluster state of the master node. In both cases the coordinating node will send requests for further information to each selected node.
35
+ # @option arguments [Boolean] :help When set to +true+ will output available columns. This option
36
+ # can't be combined with any other query string option.
37
+ # @option arguments [Boolean] :local If +true+, the request computes the list of selected nodes from the
38
+ # local cluster state. If +false+ the list of selected nodes are computed
39
+ # from the cluster state of the master node. In both cases the coordinating
40
+ # node will send requests for further information to each selected node.
35
41
  # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s.
36
- # @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting +:asc+ or +:desc+ as a suffix to the column name.
42
+ # @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
43
+ # Sorting defaults to ascending and can be changed by setting +:asc+
44
+ # or +:desc+ as a suffix to the column name.
37
45
  # @option arguments [Boolean] :v When set to +true+ will enable verbose output.
38
46
  # @option arguments [Hash] :headers Custom HTTP headers
39
47
  #
40
48
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-component-templates.html
41
49
  #
42
50
  def component_templates(arguments = {})
51
+ request_opts = { endpoint: arguments[:endpoint] || "cat.component_templates" }
52
+
53
+ defined_params = [:name].inject({}) do |set_variables, variable|
54
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
55
+ set_variables
56
+ end
57
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
58
+
43
59
  arguments = arguments.clone
44
60
  headers = arguments.delete(:headers) || {}
45
61
 
@@ -56,7 +72,7 @@ module ElasticsearchServerless
56
72
  params = Utils.process_params(arguments)
57
73
 
58
74
  ElasticsearchServerless::API::Response.new(
59
- perform_request(method, path, params, body, headers)
75
+ perform_request(method, path, params, body, headers, request_opts)
60
76
  )
61
77
  end
62
78
  end
@@ -22,24 +22,41 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Cat
24
24
  module Actions
25
+ # Get a document count.
25
26
  # Provides quick access to a document count for a data stream, an index, or an entire cluster.
26
- # NOTE: The document count only includes live documents, not deleted documents which have not yet been removed by the merge process.
27
- # IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console.
27
+ # The document count only includes live documents, not deleted documents which have not yet been removed by the merge process.
28
+ # CAT APIs are only intended for human consumption using the command line or Kibana console.
28
29
  # They are not intended for use by applications. For application consumption, use the count API.
29
30
  #
30
- # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (+*+). To target all data streams and indices, omit this parameter or use +*+ or +_all+.
31
- # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.
31
+ # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit the request.
32
+ # Supports wildcards (+*+). To target all data streams and indices, omit this parameter or use +*+ or +_all+.
33
+ # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to
34
+ # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.
32
35
  # @option arguments [String, Array<String>] :h List of columns to appear in the response. Supports simple wildcards.
33
- # @option arguments [Boolean] :help When set to +true+ will output available columns. This option can't be combined with any other query string option.
34
- # @option arguments [Boolean] :local If +true+, the request computes the list of selected nodes from the local cluster state. If +false+ the list of selected nodes are computed from the cluster state of the master node. In both cases the coordinating node will send requests for further information to each selected node.
36
+ # @option arguments [Boolean] :help When set to +true+ will output available columns. This option
37
+ # can't be combined with any other query string option.
38
+ # @option arguments [Boolean] :local If +true+, the request computes the list of selected nodes from the
39
+ # local cluster state. If +false+ the list of selected nodes are computed
40
+ # from the cluster state of the master node. In both cases the coordinating
41
+ # node will send requests for further information to each selected node.
35
42
  # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s.
36
- # @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting +:asc+ or +:desc+ as a suffix to the column name.
43
+ # @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
44
+ # Sorting defaults to ascending and can be changed by setting +:asc+
45
+ # or +:desc+ as a suffix to the column name.
37
46
  # @option arguments [Boolean] :v When set to +true+ will enable verbose output.
38
47
  # @option arguments [Hash] :headers Custom HTTP headers
39
48
  #
40
49
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-count.html
41
50
  #
42
51
  def count(arguments = {})
52
+ request_opts = { endpoint: arguments[:endpoint] || "cat.count" }
53
+
54
+ defined_params = [:index].inject({}) do |set_variables, variable|
55
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
56
+ set_variables
57
+ end
58
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
59
+
43
60
  arguments = arguments.clone
44
61
  headers = arguments.delete(:headers) || {}
45
62
 
@@ -57,7 +74,7 @@ module ElasticsearchServerless
57
74
  params[:h] = Utils.listify(params[:h]) if params[:h]
58
75
 
59
76
  ElasticsearchServerless::API::Response.new(
60
- perform_request(method, path, params, body, headers)
77
+ perform_request(method, path, params, body, headers, request_opts)
61
78
  )
62
79
  end
63
80
  end
@@ -22,20 +22,30 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Cat
24
24
  module Actions
25
- # Returns help for the Cat APIs.
25
+ # Get CAT help.
26
+ # Returns help for the CAT APIs.
26
27
  #
27
- # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.
28
+ # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to
29
+ # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.
28
30
  # @option arguments [String, Array<String>] :h List of columns to appear in the response. Supports simple wildcards.
29
- # @option arguments [Boolean] :help When set to +true+ will output available columns. This option can't be combined with any other query string option.
30
- # @option arguments [Boolean] :local If +true+, the request computes the list of selected nodes from the local cluster state. If +false+ the list of selected nodes are computed from the cluster state of the master node. In both cases the coordinating node will send requests for further information to each selected node.
31
+ # @option arguments [Boolean] :help When set to +true+ will output available columns. This option
32
+ # can't be combined with any other query string option.
33
+ # @option arguments [Boolean] :local If +true+, the request computes the list of selected nodes from the
34
+ # local cluster state. If +false+ the list of selected nodes are computed
35
+ # from the cluster state of the master node. In both cases the coordinating
36
+ # node will send requests for further information to each selected node.
31
37
  # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s.
32
- # @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting +:asc+ or +:desc+ as a suffix to the column name.
38
+ # @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
39
+ # Sorting defaults to ascending and can be changed by setting +:asc+
40
+ # or +:desc+ as a suffix to the column name.
33
41
  # @option arguments [Boolean] :v When set to +true+ will enable verbose output.
34
42
  # @option arguments [Hash] :headers Custom HTTP headers
35
43
  #
36
44
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat.html
37
45
  #
38
46
  def help(arguments = {})
47
+ request_opts = { endpoint: arguments[:endpoint] || "cat.help" }
48
+
39
49
  arguments = arguments.clone
40
50
  headers = arguments.delete(:headers) || {}
41
51
 
@@ -46,7 +56,7 @@ module ElasticsearchServerless
46
56
  params = Utils.process_params(arguments)
47
57
 
48
58
  ElasticsearchServerless::API::Response.new(
49
- perform_request(method, path, params, body, headers)
59
+ perform_request(method, path, params, body, headers, request_opts)
50
60
  )
51
61
  end
52
62
  end
@@ -22,32 +22,54 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Cat
24
24
  module Actions
25
+ # Get index information.
25
26
  # Returns high-level information about indices in a cluster, including backing indices for data streams.
26
- # IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console.
27
- # They are not intended for use by applications. For application consumption, use the get index API.
28
- # Use the cat indices API to get the following information for each index in a cluster: shard count; document count; deleted document count; primary store size; total store size of all shards, including shard replicas.
27
+ # Use this request to get the following information for each index in a cluster:
28
+ # - shard count
29
+ # - document count
30
+ # - deleted document count
31
+ # - primary store size
32
+ # - total store size of all shards, including shard replicas
29
33
  # These metrics are retrieved directly from Lucene, which Elasticsearch uses internally to power indexing and search. As a result, all document counts include hidden nested documents.
30
34
  # To get an accurate count of Elasticsearch documents, use the cat count or count APIs.
35
+ # CAT APIs are only intended for human consumption using the command line or Kibana console.
36
+ # They are not intended for use by applications. For application consumption, use an index endpoint.
31
37
  #
32
- # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (+*+). To target all data streams and indices, omit this parameter or use +*+ or +_all+.
38
+ # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit the request.
39
+ # Supports wildcards (+*+). To target all data streams and indices, omit this parameter or use +*+ or +_all+.
33
40
  # @option arguments [String] :bytes The unit used to display byte values.
34
41
  # @option arguments [String, Array<String>] :expand_wildcards The type of index that wildcard patterns can match.
35
42
  # @option arguments [String] :health The health status used to limit returned indices. By default, the response includes indices of any health status.
36
43
  # @option arguments [Boolean] :include_unloaded_segments If true, the response includes information from segments that are not loaded into memory.
37
44
  # @option arguments [Boolean] :pri If true, the response only includes information from primary shards.
38
45
  # @option arguments [String] :time The unit used to display time values.
39
- # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.
46
+ # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to
47
+ # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.
40
48
  # @option arguments [String, Array<String>] :h List of columns to appear in the response. Supports simple wildcards.
41
- # @option arguments [Boolean] :help When set to +true+ will output available columns. This option can't be combined with any other query string option.
42
- # @option arguments [Boolean] :local If +true+, the request computes the list of selected nodes from the local cluster state. If +false+ the list of selected nodes are computed from the cluster state of the master node. In both cases the coordinating node will send requests for further information to each selected node.
49
+ # @option arguments [Boolean] :help When set to +true+ will output available columns. This option
50
+ # can't be combined with any other query string option.
51
+ # @option arguments [Boolean] :local If +true+, the request computes the list of selected nodes from the
52
+ # local cluster state. If +false+ the list of selected nodes are computed
53
+ # from the cluster state of the master node. In both cases the coordinating
54
+ # node will send requests for further information to each selected node.
43
55
  # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s.
44
- # @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting +:asc+ or +:desc+ as a suffix to the column name.
56
+ # @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
57
+ # Sorting defaults to ascending and can be changed by setting +:asc+
58
+ # or +:desc+ as a suffix to the column name.
45
59
  # @option arguments [Boolean] :v When set to +true+ will enable verbose output.
46
60
  # @option arguments [Hash] :headers Custom HTTP headers
47
61
  #
48
62
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-indices.html
49
63
  #
50
64
  def indices(arguments = {})
65
+ request_opts = { endpoint: arguments[:endpoint] || "cat.indices" }
66
+
67
+ defined_params = [:index].inject({}) do |set_variables, variable|
68
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
69
+ set_variables
70
+ end
71
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
72
+
51
73
  arguments = arguments.clone
52
74
  headers = arguments.delete(:headers) || {}
53
75
 
@@ -65,7 +87,7 @@ module ElasticsearchServerless
65
87
  params[:h] = Utils.listify(params[:h]) if params[:h]
66
88
 
67
89
  ElasticsearchServerless::API::Response.new(
68
- perform_request(method, path, params, body, headers)
90
+ perform_request(method, path, params, body, headers, request_opts)
69
91
  )
70
92
  end
71
93
  end
@@ -22,9 +22,9 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Cat
24
24
  module Actions
25
+ # Get data frame analytics jobs.
25
26
  # Returns configuration and usage information about data frame analytics jobs.
26
- #
27
- # IMPORTANT: cat APIs are only intended for human consumption using the Kibana
27
+ # CAT APIs are only intended for human consumption using the Kibana
28
28
  # console or command line. They are not intended for use by applications. For
29
29
  # application consumption, use the get data frame analytics jobs statistics API.
30
30
  #
@@ -32,20 +32,36 @@ module ElasticsearchServerless
32
32
  # @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no configs. (This includes +_all+ string or when no configs have been specified)
33
33
  # @option arguments [String] :bytes The unit in which to display byte values
34
34
  # @option arguments [String, Array<String>] :h Comma-separated list of column names to display. Server default: create_time,id,state,type.
35
- # @option arguments [String, Array<String>] :s Comma-separated list of column names or column aliases used to sort the response.
35
+ # @option arguments [String, Array<String>] :s Comma-separated list of column names or column aliases used to sort the
36
+ # response.
36
37
  # @option arguments [Time] :time Unit used to display time values.
37
- # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.
38
+ # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to
39
+ # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.
38
40
  # @option arguments [String, Array<String>] :h List of columns to appear in the response. Supports simple wildcards.
39
- # @option arguments [Boolean] :help When set to +true+ will output available columns. This option can't be combined with any other query string option.
40
- # @option arguments [Boolean] :local If +true+, the request computes the list of selected nodes from the local cluster state. If +false+ the list of selected nodes are computed from the cluster state of the master node. In both cases the coordinating node will send requests for further information to each selected node.
41
+ # @option arguments [Boolean] :help When set to +true+ will output available columns. This option
42
+ # can't be combined with any other query string option.
43
+ # @option arguments [Boolean] :local If +true+, the request computes the list of selected nodes from the
44
+ # local cluster state. If +false+ the list of selected nodes are computed
45
+ # from the cluster state of the master node. In both cases the coordinating
46
+ # node will send requests for further information to each selected node.
41
47
  # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s.
42
- # @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting +:asc+ or +:desc+ as a suffix to the column name.
48
+ # @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
49
+ # Sorting defaults to ascending and can be changed by setting +:asc+
50
+ # or +:desc+ as a suffix to the column name.
43
51
  # @option arguments [Boolean] :v When set to +true+ will enable verbose output.
44
52
  # @option arguments [Hash] :headers Custom HTTP headers
45
53
  #
46
54
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-dfanalytics.html
47
55
  #
48
56
  def ml_data_frame_analytics(arguments = {})
57
+ request_opts = { endpoint: arguments[:endpoint] || "cat.ml_data_frame_analytics" }
58
+
59
+ defined_params = [:id].inject({}) do |set_variables, variable|
60
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
61
+ set_variables
62
+ end
63
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
64
+
49
65
  arguments = arguments.clone
50
66
  headers = arguments.delete(:headers) || {}
51
67
 
@@ -62,7 +78,7 @@ module ElasticsearchServerless
62
78
  params = Utils.process_params(arguments)
63
79
 
64
80
  ElasticsearchServerless::API::Response.new(
65
- perform_request(method, path, params, body, headers)
81
+ perform_request(method, path, params, body, headers, request_opts)
66
82
  )
67
83
  end
68
84
  end