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
@@ -23,10 +23,10 @@ module ElasticsearchServerless
23
23
  module Connector
24
24
  module Actions
25
25
  # Updates the is_native flag in the connector document
26
- # This functionality is Experimental and may be changed or removed
27
- # completely in a future release. Elastic will take a best effort approach
28
- # to fix any issues, but experimental features are not subject to the
29
- # support SLA of official GA features.
26
+ # This functionality is in Beta and is subject to change. The design and
27
+ # code is less mature than official GA features and is being provided
28
+ # as-is with no warranties. Beta features are not subject to the support
29
+ # SLA of official GA features.
30
30
  #
31
31
  # @option arguments [String] :connector_id The unique identifier of the connector to be updated (*Required*)
32
32
  # @option arguments [Hash] :headers Custom HTTP headers
@@ -35,6 +35,14 @@ module ElasticsearchServerless
35
35
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-native-api.html
36
36
  #
37
37
  def update_native(arguments = {})
38
+ request_opts = { endpoint: arguments[:endpoint] || "connector.update_native" }
39
+
40
+ defined_params = [:connector_id].inject({}) do |set_variables, variable|
41
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
42
+ set_variables
43
+ end
44
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
45
+
38
46
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
39
47
  raise ArgumentError, "Required argument 'connector_id' missing" unless arguments[:connector_id]
40
48
 
@@ -50,7 +58,7 @@ module ElasticsearchServerless
50
58
  params = {}
51
59
 
52
60
  ElasticsearchServerless::API::Response.new(
53
- perform_request(method, path, params, body, headers)
61
+ perform_request(method, path, params, body, headers, request_opts)
54
62
  )
55
63
  end
56
64
  end
@@ -23,10 +23,10 @@ module ElasticsearchServerless
23
23
  module Connector
24
24
  module Actions
25
25
  # Updates the pipeline field in the connector document
26
- # This functionality is Experimental and may be changed or removed
27
- # completely in a future release. Elastic will take a best effort approach
28
- # to fix any issues, but experimental features are not subject to the
29
- # support SLA of official GA features.
26
+ # This functionality is in Beta and is subject to change. The design and
27
+ # code is less mature than official GA features and is being provided
28
+ # as-is with no warranties. Beta features are not subject to the support
29
+ # SLA of official GA features.
30
30
  #
31
31
  # @option arguments [String] :connector_id The unique identifier of the connector to be updated (*Required*)
32
32
  # @option arguments [Hash] :headers Custom HTTP headers
@@ -35,6 +35,14 @@ module ElasticsearchServerless
35
35
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-pipeline-api.html
36
36
  #
37
37
  def update_pipeline(arguments = {})
38
+ request_opts = { endpoint: arguments[:endpoint] || "connector.update_pipeline" }
39
+
40
+ defined_params = [:connector_id].inject({}) do |set_variables, variable|
41
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
42
+ set_variables
43
+ end
44
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
45
+
38
46
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
39
47
  raise ArgumentError, "Required argument 'connector_id' missing" unless arguments[:connector_id]
40
48
 
@@ -50,7 +58,7 @@ module ElasticsearchServerless
50
58
  params = {}
51
59
 
52
60
  ElasticsearchServerless::API::Response.new(
53
- perform_request(method, path, params, body, headers)
61
+ perform_request(method, path, params, body, headers, request_opts)
54
62
  )
55
63
  end
56
64
  end
@@ -23,10 +23,10 @@ module ElasticsearchServerless
23
23
  module Connector
24
24
  module Actions
25
25
  # Updates the scheduling field in the connector document
26
- # This functionality is Experimental and may be changed or removed
27
- # completely in a future release. Elastic will take a best effort approach
28
- # to fix any issues, but experimental features are not subject to the
29
- # support SLA of official GA features.
26
+ # This functionality is in Beta and is subject to change. The design and
27
+ # code is less mature than official GA features and is being provided
28
+ # as-is with no warranties. Beta features are not subject to the support
29
+ # SLA of official GA features.
30
30
  #
31
31
  # @option arguments [String] :connector_id The unique identifier of the connector to be updated (*Required*)
32
32
  # @option arguments [Hash] :headers Custom HTTP headers
@@ -35,6 +35,14 @@ module ElasticsearchServerless
35
35
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-scheduling-api.html
36
36
  #
37
37
  def update_scheduling(arguments = {})
38
+ request_opts = { endpoint: arguments[:endpoint] || "connector.update_scheduling" }
39
+
40
+ defined_params = [:connector_id].inject({}) do |set_variables, variable|
41
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
42
+ set_variables
43
+ end
44
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
45
+
38
46
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
39
47
  raise ArgumentError, "Required argument 'connector_id' missing" unless arguments[:connector_id]
40
48
 
@@ -50,7 +58,7 @@ module ElasticsearchServerless
50
58
  params = {}
51
59
 
52
60
  ElasticsearchServerless::API::Response.new(
53
- perform_request(method, path, params, body, headers)
61
+ perform_request(method, path, params, body, headers, request_opts)
54
62
  )
55
63
  end
56
64
  end
@@ -23,10 +23,10 @@ module ElasticsearchServerless
23
23
  module Connector
24
24
  module Actions
25
25
  # Updates the service type of the connector
26
- # This functionality is Experimental and may be changed or removed
27
- # completely in a future release. Elastic will take a best effort approach
28
- # to fix any issues, but experimental features are not subject to the
29
- # support SLA of official GA features.
26
+ # This functionality is in Beta and is subject to change. The design and
27
+ # code is less mature than official GA features and is being provided
28
+ # as-is with no warranties. Beta features are not subject to the support
29
+ # SLA of official GA features.
30
30
  #
31
31
  # @option arguments [String] :connector_id The unique identifier of the connector to be updated (*Required*)
32
32
  # @option arguments [Hash] :headers Custom HTTP headers
@@ -35,6 +35,14 @@ module ElasticsearchServerless
35
35
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-service-type-api.html
36
36
  #
37
37
  def update_service_type(arguments = {})
38
+ request_opts = { endpoint: arguments[:endpoint] || "connector.update_service_type" }
39
+
40
+ defined_params = [:connector_id].inject({}) do |set_variables, variable|
41
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
42
+ set_variables
43
+ end
44
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
45
+
38
46
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
39
47
  raise ArgumentError, "Required argument 'connector_id' missing" unless arguments[:connector_id]
40
48
 
@@ -50,7 +58,7 @@ module ElasticsearchServerless
50
58
  params = {}
51
59
 
52
60
  ElasticsearchServerless::API::Response.new(
53
- perform_request(method, path, params, body, headers)
61
+ perform_request(method, path, params, body, headers, request_opts)
54
62
  )
55
63
  end
56
64
  end
@@ -35,6 +35,14 @@ module ElasticsearchServerless
35
35
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-status-api.html
36
36
  #
37
37
  def update_status(arguments = {})
38
+ request_opts = { endpoint: arguments[:endpoint] || "connector.update_status" }
39
+
40
+ defined_params = [:connector_id].inject({}) do |set_variables, variable|
41
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
42
+ set_variables
43
+ end
44
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
45
+
38
46
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
39
47
  raise ArgumentError, "Required argument 'connector_id' missing" unless arguments[:connector_id]
40
48
 
@@ -50,7 +58,7 @@ module ElasticsearchServerless
50
58
  params = {}
51
59
 
52
60
  ElasticsearchServerless::API::Response.new(
53
- perform_request(method, path, params, body, headers)
61
+ perform_request(method, path, params, body, headers, request_opts)
54
62
  )
55
63
  end
56
64
  end
@@ -23,20 +23,32 @@ module ElasticsearchServerless
23
23
  module Actions
24
24
  # Returns number of documents matching a query.
25
25
  #
26
- # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (+*+). To search all data streams and indices, omit this parameter or use +*+ or +_all+.
27
- # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. This behavior applies even if the request targets other open indices. Server default: true.
28
- # @option arguments [String] :analyzer Analyzer to use for the query string. This parameter can only be used when the +q+ query string parameter is specified.
29
- # @option arguments [Boolean] :analyze_wildcard If +true+, wildcard and prefix queries are analyzed. This parameter can only be used when the +q+ query string parameter is specified.
30
- # @option arguments [String] :default_operator The default operator for query string query: +AND+ or +OR+. This parameter can only be used when the +q+ query string parameter is specified.
31
- # @option arguments [String] :df Field to use as default where no field prefix is given in the query string. This parameter can only be used when the +q+ query string parameter is specified.
32
- # @option arguments [String, Array<String>] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as +open,hidden+. Server default: open.
26
+ # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases to search.
27
+ # Supports wildcards (+*+).
28
+ # To search all data streams and indices, omit this parameter or use +*+ or +_all+.
29
+ # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices.
30
+ # This behavior applies even if the request targets other open indices. Server default: true.
31
+ # @option arguments [String] :analyzer Analyzer to use for the query string.
32
+ # This parameter can only be used when the +q+ query string parameter is specified.
33
+ # @option arguments [Boolean] :analyze_wildcard If +true+, wildcard and prefix queries are analyzed.
34
+ # This parameter can only be used when the +q+ query string parameter is specified.
35
+ # @option arguments [String] :default_operator The default operator for query string query: +AND+ or +OR+.
36
+ # This parameter can only be used when the +q+ query string parameter is specified.
37
+ # @option arguments [String] :df Field to use as default where no field prefix is given in the query string.
38
+ # This parameter can only be used when the +q+ query string parameter is specified.
39
+ # @option arguments [String, Array<String>] :expand_wildcards Type of index that wildcard patterns can match.
40
+ # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
41
+ # Supports comma-separated values, such as +open,hidden+. Server default: open.
33
42
  # @option arguments [Boolean] :ignore_throttled If +true+, concrete, expanded or aliased indices are ignored when frozen. Server default: true.
34
43
  # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index.
35
44
  # @option arguments [Boolean] :lenient If +true+, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.
36
45
  # @option arguments [Float] :min_score Sets the minimum +_score+ value that documents must have to be included in the result.
37
- # @option arguments [String] :preference Specifies the node or shard the operation should be performed on. Random by default.
46
+ # @option arguments [String] :preference Specifies the node or shard the operation should be performed on.
47
+ # Random by default.
38
48
  # @option arguments [String] :routing Custom value used to route operations to a specific shard.
39
- # @option arguments [Integer] :terminate_after Maximum number of documents to collect for each shard. If a query reaches this limit, Elasticsearch terminates the query early. Elasticsearch collects documents before sorting.
49
+ # @option arguments [Integer] :terminate_after Maximum number of documents to collect for each shard.
50
+ # If a query reaches this limit, Elasticsearch terminates the query early.
51
+ # Elasticsearch collects documents before sorting.
40
52
  # @option arguments [String] :q Query in the Lucene query string syntax.
41
53
  # @option arguments [Hash] :headers Custom HTTP headers
42
54
  # @option arguments [Hash] :body request body
@@ -44,6 +56,14 @@ module ElasticsearchServerless
44
56
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html
45
57
  #
46
58
  def count(arguments = {})
59
+ request_opts = { endpoint: arguments[:endpoint] || "count" }
60
+
61
+ defined_params = [:index].inject({}) do |set_variables, variable|
62
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
63
+ set_variables
64
+ end
65
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
66
+
47
67
  arguments = arguments.clone
48
68
  headers = arguments.delete(:headers) || {}
49
69
 
@@ -65,7 +85,7 @@ module ElasticsearchServerless
65
85
  params = Utils.process_params(arguments)
66
86
 
67
87
  ElasticsearchServerless::API::Response.new(
68
- perform_request(method, path, params, body, headers)
88
+ perform_request(method, path, params, body, headers, request_opts)
69
89
  )
70
90
  end
71
91
  end
@@ -21,24 +21,40 @@
21
21
  module ElasticsearchServerless
22
22
  module API
23
23
  module Actions
24
+ # Index a document.
24
25
  # Adds a JSON document to the specified data stream or index and makes it searchable.
25
26
  # If the target is an index and the document already exists, the request updates the document and increments its version.
26
27
  #
27
28
  # @option arguments [String] :id Unique identifier for the document. (*Required*)
28
- # @option arguments [String] :index Name of the data stream or index to target. If the target doesn’t exist and matches the name or wildcard (+*+) pattern of an index template with a +data_stream+ definition, this request creates the data stream. If the target doesn’t exist and doesn’t match a data stream template, this request creates the index. (*Required*)
29
- # @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.
30
- # @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] :index Name of the data stream or index to target.
30
+ # If the target doesn’t exist and matches the name or wildcard (+*+) pattern of an index template with a +data_stream+ definition, this request creates the data stream.
31
+ # If the target doesn’t exist and doesn’t match a data stream template, this request creates the index. (*Required*)
32
+ # @option arguments [String] :pipeline ID of the pipeline to use to preprocess incoming documents.
33
+ # If the index has a default ingest pipeline specified, then setting the value to +_none+ disables the default ingest pipeline for this request.
34
+ # If a final pipeline is configured it will always run, regardless of the value of this parameter.
35
+ # @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.
36
+ # Valid values: +true+, +false+, +wait_for+. Server default: false.
31
37
  # @option arguments [String] :routing Custom value used to route operations to a specific shard.
32
38
  # @option arguments [Time] :timeout Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. Server default: 1m.
33
- # @option arguments [Integer] :version Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.
39
+ # @option arguments [Integer] :version Explicit version number for concurrency control.
40
+ # The specified version must match the current version of the document for the request to succeed.
34
41
  # @option arguments [String] :version_type Specific version type: +external+, +external_gte+.
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.
42
+ # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation.
43
+ # 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
44
  # @option arguments [Hash] :headers Custom HTTP headers
37
45
  # @option arguments [Hash] :body document
38
46
  #
39
47
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html
40
48
  #
41
49
  def create(arguments = {})
50
+ request_opts = { endpoint: arguments[:endpoint] || "create" }
51
+
52
+ defined_params = [:index, :id].inject({}) do |set_variables, variable|
53
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
54
+ set_variables
55
+ end
56
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
57
+
42
58
  if arguments[:id]
43
59
  index arguments.update op_type: 'create'
44
60
  else
@@ -21,23 +21,35 @@
21
21
  module ElasticsearchServerless
22
22
  module API
23
23
  module Actions
24
+ # Delete a document.
24
25
  # Removes a JSON document from the specified index.
25
26
  #
26
27
  # @option arguments [String] :id Unique identifier for the document. (*Required*)
27
28
  # @option arguments [String] :index Name of the target index. (*Required*)
28
29
  # @option arguments [Integer] :if_primary_term Only perform the operation if the document has this primary term.
29
30
  # @option arguments [Integer] :if_seq_no Only perform the operation if the document has this sequence number.
30
- # @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.
31
+ # @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.
32
+ # Valid values: +true+, +false+, +wait_for+. Server default: false.
31
33
  # @option arguments [String] :routing Custom value used to route operations to a specific shard.
32
34
  # @option arguments [Time] :timeout Period to wait for active shards. Server default: 1m.
33
- # @option arguments [Integer] :version Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.
35
+ # @option arguments [Integer] :version Explicit version number for concurrency control.
36
+ # The specified version must match the current version of the document for the request to succeed.
34
37
  # @option arguments [String] :version_type Specific version type: +external+, +external_gte+.
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.
38
+ # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation.
39
+ # 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
40
  # @option arguments [Hash] :headers Custom HTTP headers
37
41
  #
38
42
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html
39
43
  #
40
44
  def delete(arguments = {})
45
+ request_opts = { endpoint: arguments[:endpoint] || "delete" }
46
+
47
+ defined_params = [:index, :id].inject({}) do |set_variables, variable|
48
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
49
+ set_variables
50
+ end
51
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
52
+
41
53
  raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
42
54
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
43
55
 
@@ -57,12 +69,12 @@ module ElasticsearchServerless
57
69
  if Array(arguments[:ignore]).include?(404)
58
70
  Utils.rescue_from_not_found {
59
71
  ElasticsearchServerless::API::Response.new(
60
- perform_request(method, path, params, body, headers)
72
+ perform_request(method, path, params, body, headers, request_opts)
61
73
  )
62
74
  }
63
75
  else
64
76
  ElasticsearchServerless::API::Response.new(
65
- perform_request(method, path, params, body, headers)
77
+ perform_request(method, path, params, body, headers, request_opts)
66
78
  )
67
79
  end
68
80
  end
@@ -21,37 +21,56 @@
21
21
  module ElasticsearchServerless
22
22
  module API
23
23
  module Actions
24
+ # Delete documents.
24
25
  # Deletes documents that match the specified query.
25
26
  #
26
- # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (+*+). To search all data streams or indices, omit this parameter or use +*+ or +_all+. (*Required*)
27
- # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting +foo*,bar*+ returns an error if an index starts with +foo+ but no index starts with +bar+. Server default: true.
27
+ # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases to search.
28
+ # Supports wildcards (+*+).
29
+ # To search all data streams or indices, omit this parameter or use +*+ or +_all+. (*Required*)
30
+ # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices.
31
+ # This behavior applies even if the request targets other open indices.
32
+ # For example, a request targeting +foo*,bar*+ returns an error if an index starts with +foo+ but no index starts with +bar+. Server default: true.
28
33
  # @option arguments [String] :analyzer Analyzer to use for the query string.
29
34
  # @option arguments [Boolean] :analyze_wildcard If +true+, wildcard and prefix queries are analyzed.
30
35
  # @option arguments [String] :conflicts What to do if delete by query hits version conflicts: +abort+ or +proceed+. Server default: abort.
31
36
  # @option arguments [String] :default_operator The default operator for query string query: +AND+ or +OR+. Server default: OR.
32
37
  # @option arguments [String] :df Field to use as default where no field prefix is given in the query string.
33
- # @option arguments [String, Array<String>] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as +open,hidden+. Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open.
38
+ # @option arguments [String, Array<String>] :expand_wildcards Type of index that wildcard patterns can match.
39
+ # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
40
+ # Supports comma-separated values, such as +open,hidden+. Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open.
34
41
  # @option arguments [Integer] :from Starting offset (default: 0)
35
42
  # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index.
36
43
  # @option arguments [Boolean] :lenient If +true+, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.
37
- # @option arguments [Integer] :max_docs Maximum number of documents to process. Defaults to all documents.
38
- # @option arguments [String] :preference Specifies the node or shard the operation should be performed on. Random by default.
44
+ # @option arguments [Integer] :max_docs Maximum number of documents to process.
45
+ # Defaults to all documents.
46
+ # @option arguments [String] :preference Specifies the node or shard the operation should be performed on.
47
+ # Random by default.
39
48
  # @option arguments [Boolean] :refresh If +true+, Elasticsearch refreshes all shards involved in the delete by query after the request completes.
40
- # @option arguments [Boolean] :request_cache If +true+, the request cache is used for this request. Defaults to the index-level setting.
49
+ # @option arguments [Boolean] :request_cache If +true+, the request cache is used for this request.
50
+ # Defaults to the index-level setting.
41
51
  # @option arguments [Float] :requests_per_second The throttle for this request in sub-requests per second.
42
52
  # @option arguments [String] :routing Custom value used to route operations to a specific shard.
43
53
  # @option arguments [String] :q Query in the Lucene query string syntax.
44
54
  # @option arguments [Time] :scroll Period to retain the search context for scrolling.
45
55
  # @option arguments [Integer] :scroll_size Size of the scroll request that powers the operation. Server default: 1000.
46
- # @option arguments [Time] :search_timeout Explicit timeout for each search request. Defaults to no timeout.
47
- # @option arguments [String] :search_type The type of the search operation. Available options: +query_then_fetch+, +dfs_query_then_fetch+.
56
+ # @option arguments [Time] :search_timeout Explicit timeout for each search request.
57
+ # Defaults to no timeout.
58
+ # @option arguments [String] :search_type The type of the search operation.
59
+ # Available options: +query_then_fetch+, +dfs_query_then_fetch+.
48
60
  # @option arguments [Integer, String] :slices The number of slices this task should be divided into. Server default: 1.
49
61
  # @option arguments [Array<String>] :sort A comma-separated list of <field>:<direction> pairs.
50
62
  # @option arguments [Array<String>] :stats Specific +tag+ of the request for logging and statistical purposes.
51
- # @option arguments [Integer] :terminate_after Maximum number of documents to collect for each shard. If a query reaches this limit, Elasticsearch terminates the query early. Elasticsearch collects documents before sorting. Use with caution. Elasticsearch applies this parameter to each shard handling the request. When possible, let Elasticsearch perform early termination automatically. Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.
63
+ # @option arguments [Integer] :terminate_after Maximum number of documents to collect for each shard.
64
+ # If a query reaches this limit, Elasticsearch terminates the query early.
65
+ # Elasticsearch collects documents before sorting.
66
+ # Use with caution.
67
+ # Elasticsearch applies this parameter to each shard handling the request.
68
+ # When possible, let Elasticsearch perform early termination automatically.
69
+ # Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.
52
70
  # @option arguments [Time] :timeout Period each deletion request waits for active shards. Server default: 1m.
53
71
  # @option arguments [Boolean] :version If +true+, returns the document version as part of a hit.
54
- # @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.
72
+ # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation.
73
+ # Set to all or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). Server default: 1.
55
74
  # @option arguments [Boolean] :wait_for_completion If +true+, the request blocks until the operation is complete. Server default: true.
56
75
  # @option arguments [Hash] :headers Custom HTTP headers
57
76
  # @option arguments [Hash] :body request body
@@ -59,6 +78,14 @@ module ElasticsearchServerless
59
78
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html
60
79
  #
61
80
  def delete_by_query(arguments = {})
81
+ request_opts = { endpoint: arguments[:endpoint] || "delete_by_query" }
82
+
83
+ defined_params = [:index].inject({}) do |set_variables, variable|
84
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
85
+ set_variables
86
+ end
87
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
88
+
62
89
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
63
90
  raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
64
91
 
@@ -74,7 +101,7 @@ module ElasticsearchServerless
74
101
  params = Utils.process_params(arguments)
75
102
 
76
103
  ElasticsearchServerless::API::Response.new(
77
- perform_request(method, path, params, body, headers)
104
+ perform_request(method, path, params, body, headers, request_opts)
78
105
  )
79
106
  end
80
107
  end
@@ -21,16 +21,27 @@
21
21
  module ElasticsearchServerless
22
22
  module API
23
23
  module Actions
24
+ # Delete a script or search template.
24
25
  # Deletes a stored script or search template.
25
26
  #
26
27
  # @option arguments [String] :id Identifier for the stored script or search template. (*Required*)
27
- # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
28
- # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
28
+ # @option arguments [Time] :master_timeout Period to wait for a connection to the master node.
29
+ # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
30
+ # @option arguments [Time] :timeout Period to wait for a response.
31
+ # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
29
32
  # @option arguments [Hash] :headers Custom HTTP headers
30
33
  #
31
34
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
32
35
  #
33
36
  def delete_script(arguments = {})
37
+ request_opts = { endpoint: arguments[:endpoint] || "delete_script" }
38
+
39
+ defined_params = [:id].inject({}) do |set_variables, variable|
40
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
41
+ set_variables
42
+ end
43
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
44
+
34
45
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
35
46
 
36
47
  arguments = arguments.clone
@@ -45,7 +56,7 @@ module ElasticsearchServerless
45
56
  params = Utils.process_params(arguments)
46
57
 
47
58
  ElasticsearchServerless::API::Response.new(
48
- perform_request(method, path, params, body, headers)
59
+ perform_request(method, path, params, body, headers, request_opts)
49
60
  )
50
61
  end
51
62
  end
@@ -22,6 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Enrich
24
24
  module Actions
25
+ # Delete an enrich policy.
25
26
  # Deletes an existing enrich policy and its enrich index.
26
27
  #
27
28
  # @option arguments [String] :name Enrich policy to delete. (*Required*)
@@ -30,6 +31,14 @@ module ElasticsearchServerless
30
31
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-enrich-policy-api.html
31
32
  #
32
33
  def delete_policy(arguments = {})
34
+ request_opts = { endpoint: arguments[:endpoint] || "enrich.delete_policy" }
35
+
36
+ defined_params = [:name].inject({}) do |set_variables, variable|
37
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
38
+ set_variables
39
+ end
40
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
41
+
33
42
  raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
34
43
 
35
44
  arguments = arguments.clone
@@ -44,7 +53,7 @@ module ElasticsearchServerless
44
53
  params = {}
45
54
 
46
55
  ElasticsearchServerless::API::Response.new(
47
- perform_request(method, path, params, body, headers)
56
+ perform_request(method, path, params, body, headers, request_opts)
48
57
  )
49
58
  end
50
59
  end
@@ -31,6 +31,14 @@ module ElasticsearchServerless
31
31
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/execute-enrich-policy-api.html
32
32
  #
33
33
  def execute_policy(arguments = {})
34
+ request_opts = { endpoint: arguments[:endpoint] || "enrich.execute_policy" }
35
+
36
+ defined_params = [:name].inject({}) do |set_variables, variable|
37
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
38
+ set_variables
39
+ end
40
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
41
+
34
42
  raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
35
43
 
36
44
  arguments = arguments.clone
@@ -45,7 +53,7 @@ module ElasticsearchServerless
45
53
  params = Utils.process_params(arguments)
46
54
 
47
55
  ElasticsearchServerless::API::Response.new(
48
- perform_request(method, path, params, body, headers)
56
+ perform_request(method, path, params, body, headers, request_opts)
49
57
  )
50
58
  end
51
59
  end
@@ -22,14 +22,24 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Enrich
24
24
  module Actions
25
+ # Get an enrich policy.
25
26
  # Returns information about an enrich policy.
26
27
  #
27
- # @option arguments [String, Array<String>] :name Comma-separated list of enrich policy names used to limit the request. To return information for all enrich policies, omit this parameter.
28
+ # @option arguments [String, Array<String>] :name Comma-separated list of enrich policy names used to limit the request.
29
+ # To return information for all enrich policies, omit this parameter.
28
30
  # @option arguments [Hash] :headers Custom HTTP headers
29
31
  #
30
32
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-enrich-policy-api.html
31
33
  #
32
34
  def get_policy(arguments = {})
35
+ request_opts = { endpoint: arguments[:endpoint] || "enrich.get_policy" }
36
+
37
+ defined_params = [:name].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
+
33
43
  arguments = arguments.clone
34
44
  headers = arguments.delete(:headers) || {}
35
45
 
@@ -46,7 +56,7 @@ module ElasticsearchServerless
46
56
  params = {}
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,6 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Enrich
24
24
  module Actions
25
+ # Create an enrich policy.
25
26
  # Creates an enrich policy.
26
27
  #
27
28
  # @option arguments [String] :name Name of the enrich policy to create or update. (*Required*)
@@ -31,6 +32,14 @@ module ElasticsearchServerless
31
32
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-enrich-policy-api.html
32
33
  #
33
34
  def put_policy(arguments = {})
35
+ request_opts = { endpoint: arguments[:endpoint] || "enrich.put_policy" }
36
+
37
+ defined_params = [:name].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
+
34
43
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
35
44
  raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
36
45
 
@@ -46,7 +55,7 @@ module ElasticsearchServerless
46
55
  params = {}
47
56
 
48
57
  ElasticsearchServerless::API::Response.new(
49
- perform_request(method, path, params, body, headers)
58
+ perform_request(method, path, params, body, headers, request_opts)
50
59
  )
51
60
  end
52
61
  end