elasticsearch-serverless 0.2.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (243) 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 +19 -3
  75. data/lib/elasticsearch-serverless/api/indices/delete.rb +25 -7
  76. data/lib/elasticsearch-serverless/api/indices/delete_alias.rb +18 -5
  77. data/lib/elasticsearch-serverless/api/indices/delete_data_lifecycle.rb +11 -2
  78. data/lib/elasticsearch-serverless/api/indices/delete_data_stream.rb +11 -1
  79. data/lib/elasticsearch-serverless/api/indices/delete_index_template.rb +9 -1
  80. data/lib/elasticsearch-serverless/api/indices/exists.rb +17 -4
  81. data/lib/elasticsearch-serverless/api/indices/exists_alias.rb +19 -5
  82. data/lib/elasticsearch-serverless/api/indices/exists_index_template.rb +9 -1
  83. data/lib/elasticsearch-serverless/api/indices/explain_data_lifecycle.rb +11 -2
  84. data/lib/elasticsearch-serverless/api/indices/get.rb +18 -4
  85. data/lib/elasticsearch-serverless/api/indices/get_alias.rb +23 -6
  86. data/lib/elasticsearch-serverless/api/indices/get_data_lifecycle.rb +17 -3
  87. data/lib/elasticsearch-serverless/api/indices/get_data_stream.rb +16 -3
  88. data/lib/elasticsearch-serverless/api/indices/get_index_template.rb +9 -1
  89. data/lib/elasticsearch-serverless/api/indices/get_mapping.rb +21 -5
  90. data/lib/elasticsearch-serverless/api/indices/get_settings.rb +26 -6
  91. data/lib/elasticsearch-serverless/api/indices/migrate_to_data_stream.rb +13 -2
  92. data/lib/elasticsearch-serverless/api/indices/modify_data_stream.rb +4 -1
  93. data/lib/elasticsearch-serverless/api/indices/put_alias.rb +20 -5
  94. data/lib/elasticsearch-serverless/api/indices/put_data_lifecycle.rb +22 -6
  95. data/lib/elasticsearch-serverless/api/indices/put_index_template.rb +11 -2
  96. data/lib/elasticsearch-serverless/api/indices/put_mapping.rb +20 -5
  97. data/lib/elasticsearch-serverless/api/indices/put_settings.rb +28 -7
  98. data/lib/elasticsearch-serverless/api/indices/refresh.rb +19 -4
  99. data/lib/elasticsearch-serverless/api/indices/resolve_index.rb +19 -3
  100. data/lib/elasticsearch-serverless/api/indices/rollover.rb +19 -5
  101. data/lib/elasticsearch-serverless/api/indices/simulate_index_template.rb +9 -1
  102. data/lib/elasticsearch-serverless/api/indices/simulate_template.rb +11 -2
  103. data/lib/elasticsearch-serverless/api/indices/update_aliases.rb +8 -3
  104. data/lib/elasticsearch-serverless/api/indices/validate_query.rb +24 -7
  105. data/lib/elasticsearch-serverless/api/inference/delete.rb +9 -1
  106. data/lib/elasticsearch-serverless/api/inference/get.rb +9 -1
  107. data/lib/elasticsearch-serverless/api/inference/inference.rb +9 -1
  108. data/lib/elasticsearch-serverless/api/inference/put.rb +9 -1
  109. data/lib/elasticsearch-serverless/api/info.rb +4 -1
  110. data/lib/elasticsearch-serverless/api/ingest/delete_pipeline.rb +15 -4
  111. data/lib/elasticsearch-serverless/api/ingest/get_pipeline.rb +14 -3
  112. data/lib/elasticsearch-serverless/api/ingest/processor_grok.rb +3 -1
  113. data/lib/elasticsearch-serverless/api/ingest/put_pipeline.rb +9 -1
  114. data/lib/elasticsearch-serverless/api/ingest/simulate.rb +11 -2
  115. data/lib/elasticsearch-serverless/api/license/get.rb +8 -4
  116. data/lib/elasticsearch-serverless/api/logstash/delete_pipeline.rb +9 -1
  117. data/lib/elasticsearch-serverless/api/logstash/get_pipeline.rb +9 -1
  118. data/lib/elasticsearch-serverless/api/logstash/put_pipeline.rb +9 -1
  119. data/lib/elasticsearch-serverless/api/machine_learning/close_job.rb +14 -4
  120. data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar.rb +10 -1
  121. data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_event.rb +12 -3
  122. data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_job.rb +12 -3
  123. data/lib/elasticsearch-serverless/api/machine_learning/delete_data_frame_analytics.rb +10 -2
  124. data/lib/elasticsearch-serverless/api/machine_learning/delete_datafeed.rb +16 -4
  125. data/lib/elasticsearch-serverless/api/machine_learning/delete_filter.rb +10 -2
  126. data/lib/elasticsearch-serverless/api/machine_learning/delete_job.rb +17 -6
  127. data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model.rb +11 -3
  128. data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model_alias.rb +10 -2
  129. data/lib/elasticsearch-serverless/api/machine_learning/estimate_model_memory.rb +4 -1
  130. data/lib/elasticsearch-serverless/api/machine_learning/evaluate_data_frame.rb +4 -2
  131. data/lib/elasticsearch-serverless/api/machine_learning/flush_job.rb +20 -7
  132. data/lib/elasticsearch-serverless/api/machine_learning/get_calendar_events.rb +10 -2
  133. data/lib/elasticsearch-serverless/api/machine_learning/get_calendars.rb +10 -2
  134. data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics.rb +25 -5
  135. data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics_stats.rb +22 -4
  136. data/lib/elasticsearch-serverless/api/machine_learning/get_datafeed_stats.rb +21 -4
  137. data/lib/elasticsearch-serverless/api/machine_learning/get_datafeeds.rb +24 -5
  138. data/lib/elasticsearch-serverless/api/machine_learning/get_filters.rb +10 -2
  139. data/lib/elasticsearch-serverless/api/machine_learning/get_job_stats.rb +22 -4
  140. data/lib/elasticsearch-serverless/api/machine_learning/get_jobs.rb +24 -5
  141. data/lib/elasticsearch-serverless/api/machine_learning/get_overall_buckets.rb +32 -8
  142. data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models.rb +29 -8
  143. data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models_stats.rb +19 -4
  144. data/lib/elasticsearch-serverless/api/machine_learning/open_job.rb +12 -5
  145. data/lib/elasticsearch-serverless/api/machine_learning/post_calendar_events.rb +10 -2
  146. data/lib/elasticsearch-serverless/api/machine_learning/preview_data_frame_analytics.rb +10 -1
  147. data/lib/elasticsearch-serverless/api/machine_learning/preview_datafeed.rb +14 -3
  148. data/lib/elasticsearch-serverless/api/machine_learning/put_calendar.rb +10 -2
  149. data/lib/elasticsearch-serverless/api/machine_learning/put_calendar_job.rb +10 -2
  150. data/lib/elasticsearch-serverless/api/machine_learning/put_data_frame_analytics.rb +13 -3
  151. data/lib/elasticsearch-serverless/api/machine_learning/put_datafeed.rb +18 -6
  152. data/lib/elasticsearch-serverless/api/machine_learning/put_filter.rb +10 -2
  153. data/lib/elasticsearch-serverless/api/machine_learning/put_job.rb +11 -2
  154. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model.rb +16 -4
  155. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_alias.rb +15 -4
  156. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_definition_part.rb +12 -3
  157. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_vocabulary.rb +10 -2
  158. data/lib/elasticsearch-serverless/api/machine_learning/reset_job.rb +15 -4
  159. data/lib/elasticsearch-serverless/api/machine_learning/start_data_frame_analytics.rb +15 -4
  160. data/lib/elasticsearch-serverless/api/machine_learning/start_datafeed.rb +28 -9
  161. data/lib/elasticsearch-serverless/api/machine_learning/start_trained_model_deployment.rb +27 -6
  162. data/lib/elasticsearch-serverless/api/machine_learning/stop_data_frame_analytics.rb +24 -5
  163. data/lib/elasticsearch-serverless/api/machine_learning/stop_datafeed.rb +20 -4
  164. data/lib/elasticsearch-serverless/api/machine_learning/stop_trained_model_deployment.rb +16 -4
  165. data/lib/elasticsearch-serverless/api/machine_learning/update_data_frame_analytics.rb +13 -3
  166. data/lib/elasticsearch-serverless/api/machine_learning/update_datafeed.rb +22 -5
  167. data/lib/elasticsearch-serverless/api/machine_learning/update_filter.rb +10 -1
  168. data/lib/elasticsearch-serverless/api/machine_learning/update_job.rb +10 -1
  169. data/lib/elasticsearch-serverless/api/machine_learning/update_trained_model_deployment.rb +16 -3
  170. data/lib/elasticsearch-serverless/api/mget.rb +17 -4
  171. data/lib/elasticsearch-serverless/api/msearch.rb +22 -10
  172. data/lib/elasticsearch-serverless/api/msearch_template.rb +16 -4
  173. data/lib/elasticsearch-serverless/api/mtermvectors.rb +14 -8
  174. data/lib/elasticsearch-serverless/api/open_point_in_time.rb +16 -4
  175. data/lib/elasticsearch-serverless/api/ping.rb +4 -1
  176. data/lib/elasticsearch-serverless/api/put_script.rb +18 -5
  177. data/lib/elasticsearch-serverless/api/query_rules/delete_rule.rb +9 -1
  178. data/lib/elasticsearch-serverless/api/query_rules/delete_ruleset.rb +9 -1
  179. data/lib/elasticsearch-serverless/api/query_rules/get_rule.rb +9 -1
  180. data/lib/elasticsearch-serverless/api/query_rules/get_ruleset.rb +9 -1
  181. data/lib/elasticsearch-serverless/api/query_rules/list_rulesets.rb +3 -1
  182. data/lib/elasticsearch-serverless/api/query_rules/put_rule.rb +9 -1
  183. data/lib/elasticsearch-serverless/api/query_rules/put_ruleset.rb +9 -1
  184. data/lib/elasticsearch-serverless/api/rank_eval.rb +11 -2
  185. data/lib/elasticsearch-serverless/api/reindex.rb +11 -7
  186. data/lib/elasticsearch-serverless/api/render_search_template.rb +11 -2
  187. data/lib/elasticsearch-serverless/api/scripts_painless_execute.rb +4 -1
  188. data/lib/elasticsearch-serverless/api/scroll.rb +9 -1
  189. data/lib/elasticsearch-serverless/api/search.rb +107 -30
  190. data/lib/elasticsearch-serverless/api/search_application/delete.rb +11 -2
  191. data/lib/elasticsearch-serverless/api/search_application/delete_behavioral_analytics.rb +10 -1
  192. data/lib/elasticsearch-serverless/api/search_application/get.rb +10 -2
  193. data/lib/elasticsearch-serverless/api/search_application/get_behavioral_analytics.rb +10 -2
  194. data/lib/elasticsearch-serverless/api/search_application/list.rb +3 -1
  195. data/lib/elasticsearch-serverless/api/search_application/put.rb +10 -2
  196. data/lib/elasticsearch-serverless/api/search_application/put_behavioral_analytics.rb +10 -2
  197. data/lib/elasticsearch-serverless/api/search_application/search.rb +12 -2
  198. data/lib/elasticsearch-serverless/api/search_mvt.rb +27 -7
  199. data/lib/elasticsearch-serverless/api/search_template.rb +22 -6
  200. data/lib/elasticsearch-serverless/api/security/authenticate.rb +6 -2
  201. data/lib/elasticsearch-serverless/api/security/create_api_key.rb +4 -1
  202. data/lib/elasticsearch-serverless/api/security/get_api_key.rb +19 -7
  203. data/lib/elasticsearch-serverless/api/security/has_privileges.rb +10 -1
  204. data/lib/elasticsearch-serverless/api/security/invalidate_api_key.rb +4 -1
  205. data/lib/elasticsearch-serverless/api/security/query_api_keys.rb +7 -3
  206. data/lib/elasticsearch-serverless/api/sql/clear_cursor.rb +3 -1
  207. data/lib/elasticsearch-serverless/api/sql/delete_async.rb +9 -1
  208. data/lib/elasticsearch-serverless/api/sql/get_async.rb +15 -4
  209. data/lib/elasticsearch-serverless/api/sql/get_async_status.rb +9 -1
  210. data/lib/elasticsearch-serverless/api/sql/query.rb +3 -1
  211. data/lib/elasticsearch-serverless/api/sql/translate.rb +3 -1
  212. data/lib/elasticsearch-serverless/api/synonyms/delete_synonym.rb +9 -1
  213. data/lib/elasticsearch-serverless/api/synonyms/delete_synonym_rule.rb +9 -1
  214. data/lib/elasticsearch-serverless/api/synonyms/get_synonym.rb +9 -1
  215. data/lib/elasticsearch-serverless/api/synonyms/get_synonym_rule.rb +9 -1
  216. data/lib/elasticsearch-serverless/api/synonyms/get_synonyms_sets.rb +3 -1
  217. data/lib/elasticsearch-serverless/api/synonyms/put_synonym.rb +9 -1
  218. data/lib/elasticsearch-serverless/api/synonyms/put_synonym_rule.rb +9 -1
  219. data/lib/elasticsearch-serverless/api/terms_enum.rb +9 -1
  220. data/lib/elasticsearch-serverless/api/termvectors.rb +21 -9
  221. data/lib/elasticsearch-serverless/api/transform/delete_transform.rb +14 -3
  222. data/lib/elasticsearch-serverless/api/transform/get_transform.rb +23 -4
  223. data/lib/elasticsearch-serverless/api/transform/get_transform_stats.rb +20 -3
  224. data/lib/elasticsearch-serverless/api/transform/preview_transform.rb +15 -5
  225. data/lib/elasticsearch-serverless/api/transform/put_transform.rb +17 -7
  226. data/lib/elasticsearch-serverless/api/transform/reset_transform.rb +14 -3
  227. data/lib/elasticsearch-serverless/api/transform/schedule_now_transform.rb +11 -3
  228. data/lib/elasticsearch-serverless/api/transform/start_transform.rb +10 -3
  229. data/lib/elasticsearch-serverless/api/transform/stop_transform.rb +23 -6
  230. data/lib/elasticsearch-serverless/api/transform/update_transform.rb +15 -4
  231. data/lib/elasticsearch-serverless/api/update.rb +23 -7
  232. data/lib/elasticsearch-serverless/api/update_by_query.rb +37 -9
  233. data/lib/elasticsearch-serverless/api.rb +3 -3
  234. data/lib/elasticsearch-serverless/version.rb +1 -1
  235. data/lib/elasticsearch-serverless.rb +4 -3
  236. metadata +9 -86
  237. data/lib/elasticsearch-serverless/api/connector/last_sync.rb +0 -59
  238. data/lib/elasticsearch-serverless/api/esql/query.rb +0 -57
  239. data/lib/elasticsearch-serverless/api/indices/data_streams_stats.rb +0 -56
  240. data/lib/elasticsearch-serverless/api/indices/put_template.rb +0 -60
  241. data/lib/elasticsearch-serverless/api/machine_learning/infer_trained_model.rb +0 -63
  242. data/lib/elasticsearch-serverless/api/security/update_api_key.rb +0 -66
  243. data/lib/elasticsearch-serverless/api/tasks/get.rb +0 -57
@@ -22,8 +22,8 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Transform
24
24
  module Actions
25
+ # Update a transform.
25
26
  # Updates certain properties of a transform.
26
- #
27
27
  # All updated properties except +description+ do not take effect until after the transform starts the next checkpoint,
28
28
  # thus there is data consistency in each checkpoint. To use this API, you must have +read+ and +view_index_metadata+
29
29
  # privileges for the source indices. You must also have +index+ and +read+ privileges for the destination index. When
@@ -31,14 +31,25 @@ module ElasticsearchServerless
31
31
  # time of update and runs with those privileges.
32
32
  #
33
33
  # @option arguments [String] :transform_id Identifier for the transform. (*Required*)
34
- # @option arguments [Boolean] :defer_validation When true, deferrable validations are not run. This behavior may be desired if the source index does not exist until after the transform is created.
35
- # @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.
34
+ # @option arguments [Boolean] :defer_validation When true, deferrable validations are not run. This behavior may be
35
+ # desired if the source index does not exist until after the transform is
36
+ # created.
37
+ # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the
38
+ # timeout expires, the request fails and returns an error. Server default: 30s.
36
39
  # @option arguments [Hash] :headers Custom HTTP headers
37
40
  # @option arguments [Hash] :body request body
38
41
  #
39
42
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-transform.html
40
43
  #
41
44
  def update_transform(arguments = {})
45
+ request_opts = { endpoint: arguments[:endpoint] || "transform.update_transform" }
46
+
47
+ defined_params = [:transform_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
+
42
53
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
43
54
  raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id]
44
55
 
@@ -54,7 +65,7 @@ module ElasticsearchServerless
54
65
  params = Utils.process_params(arguments)
55
66
 
56
67
  ElasticsearchServerless::API::Response.new(
57
- perform_request(method, path, params, body, headers)
68
+ perform_request(method, path, params, body, headers, request_opts)
58
69
  )
59
70
  end
60
71
  end
@@ -21,20 +21,28 @@
21
21
  module ElasticsearchServerless
22
22
  module API
23
23
  module Actions
24
- # Updates a document with a script or partial document.
24
+ # Update a document.
25
+ # Updates a document by running a script or passing a partial document.
25
26
  #
26
27
  # @option arguments [String] :id Document ID (*Required*)
27
28
  # @option arguments [String] :index The name of the 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
31
  # @option arguments [String] :lang The script language. Server default: painless.
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. Server default: false.
32
+ # @option arguments [String] :refresh If 'true', Elasticsearch refreshes the affected shards to make this operation
33
+ # visible to search, if 'wait_for' then wait for a refresh to make this operation
34
+ # visible to search, if 'false' do nothing with refreshes. Server default: false.
32
35
  # @option arguments [Boolean] :require_alias If true, the destination must be an index alias.
33
36
  # @option arguments [Integer] :retry_on_conflict Specify how many times should the operation be retried when a conflict occurs. Server default: 0.
34
37
  # @option arguments [String] :routing Custom value used to route operations to a specific shard.
35
- # @option arguments [Time] :timeout Period to wait for dynamic mapping updates and active shards. This guarantees Elasticsearch waits for at least the timeout before failing. The actual wait time could be longer, particularly when multiple waits occur. Server default: 1m.
36
- # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operations. Set to 'all' or any positive integer up to the total number of shards in the index (number_of_replicas+1). Defaults to 1 meaning the primary shard. Server default: 1.
37
- # @option arguments [Boolean, String, Array<String>] :_source Set to false to disable source retrieval. You can also specify a comma-separated list of the fields you want to retrieve. Server default: true.
38
+ # @option arguments [Time] :timeout Period to wait for dynamic mapping updates and active shards.
39
+ # This guarantees Elasticsearch waits for at least the timeout before failing.
40
+ # The actual wait time could be longer, particularly when multiple waits occur. Server default: 1m.
41
+ # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operations.
42
+ # Set to 'all' or any positive integer up to the total number of shards in the index
43
+ # (number_of_replicas+1). Defaults to 1 meaning the primary shard. Server default: 1.
44
+ # @option arguments [Boolean, String, Array<String>] :_source Set to false to disable source retrieval. You can also specify a comma-separated
45
+ # list of the fields you want to retrieve. Server default: true.
38
46
  # @option arguments [String, Array<String>] :_source_excludes Specify the source fields you want to exclude.
39
47
  # @option arguments [String, Array<String>] :_source_includes Specify the source fields you want to retrieve.
40
48
  # @option arguments [Hash] :headers Custom HTTP headers
@@ -43,6 +51,14 @@ module ElasticsearchServerless
43
51
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html
44
52
  #
45
53
  def update(arguments = {})
54
+ request_opts = { endpoint: arguments[:endpoint] || "update" }
55
+
56
+ defined_params = [:index, :id].inject({}) do |set_variables, variable|
57
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
58
+ set_variables
59
+ end
60
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
61
+
46
62
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
47
63
  raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
48
64
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
@@ -63,12 +79,12 @@ module ElasticsearchServerless
63
79
  if Array(arguments[:ignore]).include?(404)
64
80
  Utils.rescue_from_not_found {
65
81
  ElasticsearchServerless::API::Response.new(
66
- perform_request(method, path, params, body, headers)
82
+ perform_request(method, path, params, body, headers, request_opts)
67
83
  )
68
84
  }
69
85
  else
70
86
  ElasticsearchServerless::API::Response.new(
71
- perform_request(method, path, params, body, headers)
87
+ perform_request(method, path, params, body, headers, request_opts)
72
88
  )
73
89
  end
74
90
  end
@@ -21,23 +21,36 @@
21
21
  module ElasticsearchServerless
22
22
  module API
23
23
  module Actions
24
+ # Update documents.
24
25
  # Updates documents that match the specified query.
25
26
  # If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes.
26
27
  #
27
- # @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*)
28
- # @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.
28
+ # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases to search.
29
+ # Supports wildcards (+*+).
30
+ # To search all data streams or indices, omit this parameter or use +*+ or +_all+. (*Required*)
31
+ # @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.
32
+ # This behavior applies even if the request targets other open indices.
33
+ # 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.
29
34
  # @option arguments [String] :analyzer Analyzer to use for the query string.
30
35
  # @option arguments [Boolean] :analyze_wildcard If +true+, wildcard and prefix queries are analyzed.
31
36
  # @option arguments [String] :conflicts What to do if update by query hits version conflicts: +abort+ or +proceed+. Server default: abort.
32
37
  # @option arguments [String] :default_operator The default operator for query string query: +AND+ or +OR+. Server default: OR.
33
38
  # @option arguments [String] :df Field to use as default where no field prefix is given in the query string.
34
- # @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+.
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+.
42
+ # Valid values are: +all+, +open+, +closed+, +hidden+, +none+.
35
43
  # @option arguments [Integer] :from Starting offset (default: 0)
36
44
  # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index.
37
45
  # @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.
38
- # @option arguments [Integer] :max_docs Maximum number of documents to process. Defaults to all documents.
39
- # @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.
40
- # @option arguments [String] :preference Specifies the node or shard the operation should be performed on. Random by default.
46
+ # @option arguments [Integer] :max_docs Maximum number of documents to process.
47
+ # Defaults to all documents.
48
+ # @option arguments [String] :pipeline ID of the pipeline to use to preprocess incoming documents.
49
+ # If the index has a default ingest pipeline specified, then setting the value to +_none+ disables the default ingest pipeline for this request.
50
+ # If a final pipeline is configured it will always run, regardless of the value of this parameter.
51
+ # @option arguments [String] :preference Specifies the node or shard the operation should be performed on.
52
+ # Random by default.
53
+ # @option arguments [String] :q Query in the Lucene query string syntax.
41
54
  # @option arguments [Boolean] :refresh If +true+, Elasticsearch refreshes affected shards to make the operation visible to search.
42
55
  # @option arguments [Boolean] :request_cache If +true+, the request cache is used for this request.
43
56
  # @option arguments [Float] :requests_per_second The throttle for this request in sub-requests per second. Server default: -1.
@@ -49,11 +62,18 @@ module ElasticsearchServerless
49
62
  # @option arguments [Integer, String] :slices The number of slices this task should be divided into. Server default: 1.
50
63
  # @option arguments [Array<String>] :sort A comma-separated list of <field>:<direction> pairs.
51
64
  # @option arguments [Array<String>] :stats Specific +tag+ of the request for logging and statistical purposes.
52
- # @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.
65
+ # @option arguments [Integer] :terminate_after Maximum number of documents to collect for each shard.
66
+ # If a query reaches this limit, Elasticsearch terminates the query early.
67
+ # Elasticsearch collects documents before sorting.
68
+ # Use with caution.
69
+ # Elasticsearch applies this parameter to each shard handling the request.
70
+ # When possible, let Elasticsearch perform early termination automatically.
71
+ # Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.
53
72
  # @option arguments [Time] :timeout Period each update request waits for the following operations: dynamic mapping updates, waiting for active shards. Server default: 1m.
54
73
  # @option arguments [Boolean] :version If +true+, returns the document version as part of a hit.
55
74
  # @option arguments [Boolean] :version_type Should the document increment the version number (internal) on hit or not (reindex)
56
- # @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.
75
+ # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation.
76
+ # Set to +all+ or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). Server default: 1.
57
77
  # @option arguments [Boolean] :wait_for_completion If +true+, the request blocks until the operation is complete. Server default: true.
58
78
  # @option arguments [Hash] :headers Custom HTTP headers
59
79
  # @option arguments [Hash] :body request body
@@ -61,6 +81,14 @@ module ElasticsearchServerless
61
81
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html
62
82
  #
63
83
  def update_by_query(arguments = {})
84
+ request_opts = { endpoint: arguments[:endpoint] || "update_by_query" }
85
+
86
+ defined_params = [:index].inject({}) do |set_variables, variable|
87
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
88
+ set_variables
89
+ end
90
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
91
+
64
92
  raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
65
93
 
66
94
  arguments = arguments.clone
@@ -75,7 +103,7 @@ module ElasticsearchServerless
75
103
  params = Utils.process_params(arguments)
76
104
 
77
105
  ElasticsearchServerless::API::Response.new(
78
- perform_request(method, path, params, body, headers)
106
+ perform_request(method, path, params, body, headers, request_opts)
79
107
  )
80
108
  end
81
109
  end
@@ -48,8 +48,8 @@ module ElasticsearchServerless
48
48
  @client = client
49
49
  end
50
50
 
51
- def perform_request(method, path, params = {}, body = nil, headers = nil)
52
- client.perform_request method, path, params, body, headers
51
+ def perform_request(method, path, params = {}, body = nil, headers = nil, request_opts = {})
52
+ client.perform_request(method, path, params, body, headers, request_opts)
53
53
  end
54
54
  end
55
55
 
@@ -59,9 +59,9 @@ module ElasticsearchServerless
59
59
  :async_search,
60
60
  :cat,
61
61
  :cluster,
62
+ :connector,
62
63
  :enrich,
63
64
  :eql,
64
- :esql,
65
65
  :graph,
66
66
  :indices,
67
67
  :inference,
@@ -17,6 +17,6 @@
17
17
 
18
18
  module ElasticsearchServerless
19
19
  API_VERSION = '2023-10-31'.freeze
20
- CLIENT_VERSION = '0.2.0'.freeze
20
+ CLIENT_VERSION = '0.4.0'.freeze
21
21
  VERSION = CLIENT_VERSION
22
22
  end
@@ -24,7 +24,8 @@ module ElasticsearchServerless
24
24
  include ElasticsearchServerless::API
25
25
 
26
26
  VALID_PARAMETERS = [:adapter, :log, :logger, :serializer_class, :trace, :tracer, :headers,
27
- :request_timeout, :retry_on_status, :retry_on_failure, :delay_on_retry]
27
+ :request_timeout, :retry_on_status, :retry_on_failure, :delay_on_retry,
28
+ :opentelemetry_tracer_provider]
28
29
 
29
30
  # Initializes an Elasticsearch Serverless Client
30
31
  #
@@ -95,7 +96,7 @@ module ElasticsearchServerless
95
96
  if RbConfig::CONFIG && RbConfig::CONFIG['host_os']
96
97
  user_agent << "#{RbConfig::CONFIG['host_os'].split('_').first[/[a-z]+/i].downcase} #{RbConfig::CONFIG['target_cpu']}"
97
98
  end
98
- user_agent.join("; ")
99
+ user_agent.join('; ')
99
100
  end
100
101
  end
101
102
  end
@@ -108,5 +109,5 @@ module Elastic
108
109
  ElasticsearchServerless::CLIENT_VERSION
109
110
  end
110
111
 
111
- ELASTICSEARCH_SERVICE_VERSION = [:esv, client_meta_version].freeze
112
+ ES_SERVERLESS_SERVICE_VERSION = [:esv, client_meta_version].freeze
112
113
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elasticsearch-serverless
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fernando Briano
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-03 00:00:00.000000000 Z
11
+ date: 2024-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: elastic-transport
@@ -16,85 +16,15 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '8'
19
+ version: '8.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '8'
27
- - !ruby/object:Gem::Dependency
28
- name: debug
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 1.0.0
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: 1.0.0
41
- - !ruby/object:Gem::Dependency
42
- name: elasticsearch-test-runner
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: rake
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: rspec
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: faraday-net_http_persistent
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- description:
26
+ version: '8.3'
27
+ description:
98
28
  email: support@elastic.co
99
29
  executables: []
100
30
  extensions: []
@@ -127,7 +57,6 @@ files:
127
57
  - lib/elasticsearch-serverless/api/connector/check_in.rb
128
58
  - lib/elasticsearch-serverless/api/connector/delete.rb
129
59
  - lib/elasticsearch-serverless/api/connector/get.rb
130
- - lib/elasticsearch-serverless/api/connector/last_sync.rb
131
60
  - lib/elasticsearch-serverless/api/connector/list.rb
132
61
  - lib/elasticsearch-serverless/api/connector/post.rb
133
62
  - lib/elasticsearch-serverless/api/connector/put.rb
@@ -163,7 +92,6 @@ files:
163
92
  - lib/elasticsearch-serverless/api/eql/get.rb
164
93
  - lib/elasticsearch-serverless/api/eql/get_status.rb
165
94
  - lib/elasticsearch-serverless/api/eql/search.rb
166
- - lib/elasticsearch-serverless/api/esql/query.rb
167
95
  - lib/elasticsearch-serverless/api/exists.rb
168
96
  - lib/elasticsearch-serverless/api/exists_source.rb
169
97
  - lib/elasticsearch-serverless/api/explain.rb
@@ -177,7 +105,6 @@ files:
177
105
  - lib/elasticsearch-serverless/api/indices/analyze.rb
178
106
  - lib/elasticsearch-serverless/api/indices/create.rb
179
107
  - lib/elasticsearch-serverless/api/indices/create_data_stream.rb
180
- - lib/elasticsearch-serverless/api/indices/data_streams_stats.rb
181
108
  - lib/elasticsearch-serverless/api/indices/delete.rb
182
109
  - lib/elasticsearch-serverless/api/indices/delete_alias.rb
183
110
  - lib/elasticsearch-serverless/api/indices/delete_data_lifecycle.rb
@@ -201,7 +128,6 @@ files:
201
128
  - lib/elasticsearch-serverless/api/indices/put_index_template.rb
202
129
  - lib/elasticsearch-serverless/api/indices/put_mapping.rb
203
130
  - lib/elasticsearch-serverless/api/indices/put_settings.rb
204
- - lib/elasticsearch-serverless/api/indices/put_template.rb
205
131
  - lib/elasticsearch-serverless/api/indices/refresh.rb
206
132
  - lib/elasticsearch-serverless/api/indices/resolve_index.rb
207
133
  - lib/elasticsearch-serverless/api/indices/rollover.rb
@@ -248,7 +174,6 @@ files:
248
174
  - lib/elasticsearch-serverless/api/machine_learning/get_overall_buckets.rb
249
175
  - lib/elasticsearch-serverless/api/machine_learning/get_trained_models.rb
250
176
  - lib/elasticsearch-serverless/api/machine_learning/get_trained_models_stats.rb
251
- - lib/elasticsearch-serverless/api/machine_learning/infer_trained_model.rb
252
177
  - lib/elasticsearch-serverless/api/machine_learning/open_job.rb
253
178
  - lib/elasticsearch-serverless/api/machine_learning/post_calendar_events.rb
254
179
  - lib/elasticsearch-serverless/api/machine_learning/preview_data_frame_analytics.rb
@@ -312,7 +237,6 @@ files:
312
237
  - lib/elasticsearch-serverless/api/security/has_privileges.rb
313
238
  - lib/elasticsearch-serverless/api/security/invalidate_api_key.rb
314
239
  - lib/elasticsearch-serverless/api/security/query_api_keys.rb
315
- - lib/elasticsearch-serverless/api/security/update_api_key.rb
316
240
  - lib/elasticsearch-serverless/api/sql/clear_cursor.rb
317
241
  - lib/elasticsearch-serverless/api/sql/delete_async.rb
318
242
  - lib/elasticsearch-serverless/api/sql/get_async.rb
@@ -326,7 +250,6 @@ files:
326
250
  - lib/elasticsearch-serverless/api/synonyms/get_synonyms_sets.rb
327
251
  - lib/elasticsearch-serverless/api/synonyms/put_synonym.rb
328
252
  - lib/elasticsearch-serverless/api/synonyms/put_synonym_rule.rb
329
- - lib/elasticsearch-serverless/api/tasks/get.rb
330
253
  - lib/elasticsearch-serverless/api/terms_enum.rb
331
254
  - lib/elasticsearch-serverless/api/termvectors.rb
332
255
  - lib/elasticsearch-serverless/api/transform/delete_transform.rb
@@ -347,7 +270,7 @@ homepage: https://rubygems.org/gems/elasticsearch-serverless
347
270
  licenses:
348
271
  - Apache-2.0
349
272
  metadata: {}
350
- post_install_message:
273
+ post_install_message:
351
274
  rdoc_options: []
352
275
  require_paths:
353
276
  - lib
@@ -362,8 +285,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
362
285
  - !ruby/object:Gem::Version
363
286
  version: '0'
364
287
  requirements: []
365
- rubygems_version: 3.5.13
366
- signing_key:
288
+ rubygems_version: 3.5.16
289
+ signing_key:
367
290
  specification_version: 4
368
291
  summary: Elasticsearch Serverless Client
369
292
  test_files: []
@@ -1,59 +0,0 @@
1
- # Licensed to Elasticsearch B.V. under one or more contributor
2
- # license agreements. See the NOTICE file distributed with
3
- # this work for additional information regarding copyright
4
- # ownership. Elasticsearch B.V. licenses this file to you under
5
- # the Apache License, Version 2.0 (the "License"); you may
6
- # not use this file except in compliance with the License.
7
- # You may obtain a copy of the License at
8
- #
9
- # http://www.apache.org/licenses/LICENSE-2.0
10
- #
11
- # Unless required by applicable law or agreed to in writing,
12
- # software distributed under the License is distributed on an
13
- # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
- # KIND, either express or implied. See the License for the
15
- # specific language governing permissions and limitations
16
- # under the License.
17
- #
18
- # Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
19
- # @see https://github.com/elastic/elasticsearch-specification
20
- #
21
- module ElasticsearchServerless
22
- module API
23
- module Connector
24
- module Actions
25
- # Updates last sync stats 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.
30
- #
31
- # @option arguments [String] :connector_id The unique identifier of the connector to be updated (*Required*)
32
- # @option arguments [Hash] :headers Custom HTTP headers
33
- # @option arguments [Hash] :body request body
34
- #
35
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-last-sync-api.html
36
- #
37
- def last_sync(arguments = {})
38
- raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
39
- raise ArgumentError, "Required argument 'connector_id' missing" unless arguments[:connector_id]
40
-
41
- arguments = arguments.clone
42
- headers = arguments.delete(:headers) || {}
43
-
44
- body = arguments.delete(:body)
45
-
46
- _connector_id = arguments.delete(:connector_id)
47
-
48
- method = ElasticsearchServerless::API::HTTP_PUT
49
- path = "_connector/#{Utils.listify(_connector_id)}/_last_sync"
50
- params = {}
51
-
52
- ElasticsearchServerless::API::Response.new(
53
- perform_request(method, path, params, body, headers)
54
- )
55
- end
56
- end
57
- end
58
- end
59
- end
@@ -1,57 +0,0 @@
1
- # Licensed to Elasticsearch B.V. under one or more contributor
2
- # license agreements. See the NOTICE file distributed with
3
- # this work for additional information regarding copyright
4
- # ownership. Elasticsearch B.V. licenses this file to you under
5
- # the Apache License, Version 2.0 (the "License"); you may
6
- # not use this file except in compliance with the License.
7
- # You may obtain a copy of the License at
8
- #
9
- # http://www.apache.org/licenses/LICENSE-2.0
10
- #
11
- # Unless required by applicable law or agreed to in writing,
12
- # software distributed under the License is distributed on an
13
- # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
- # KIND, either express or implied. See the License for the
15
- # specific language governing permissions and limitations
16
- # under the License.
17
- #
18
- # Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
19
- # @see https://github.com/elastic/elasticsearch-specification
20
- #
21
- module ElasticsearchServerless
22
- module API
23
- module Esql
24
- module Actions
25
- # Executes an ES|QL request
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.
30
- #
31
- # @option arguments [String] :format A short version of the Accept header, e.g. json, yaml.
32
- # @option arguments [String] :delimiter The character to use between values within a CSV row. Only valid for the CSV format.
33
- # @option arguments [Hash] :headers Custom HTTP headers
34
- # @option arguments [Hash] :body request body
35
- #
36
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-rest.html
37
- #
38
- def query(arguments = {})
39
- raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
40
-
41
- arguments = arguments.clone
42
- headers = arguments.delete(:headers) || {}
43
-
44
- body = arguments.delete(:body)
45
-
46
- method = ElasticsearchServerless::API::HTTP_POST
47
- path = "_query"
48
- params = Utils.process_params(arguments)
49
-
50
- ElasticsearchServerless::API::Response.new(
51
- perform_request(method, path, params, body, headers)
52
- )
53
- end
54
- end
55
- end
56
- end
57
- end
@@ -1,56 +0,0 @@
1
- # Licensed to Elasticsearch B.V. under one or more contributor
2
- # license agreements. See the NOTICE file distributed with
3
- # this work for additional information regarding copyright
4
- # ownership. Elasticsearch B.V. licenses this file to you under
5
- # the Apache License, Version 2.0 (the "License"); you may
6
- # not use this file except in compliance with the License.
7
- # You may obtain a copy of the License at
8
- #
9
- # http://www.apache.org/licenses/LICENSE-2.0
10
- #
11
- # Unless required by applicable law or agreed to in writing,
12
- # software distributed under the License is distributed on an
13
- # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
- # KIND, either express or implied. See the License for the
15
- # specific language governing permissions and limitations
16
- # under the License.
17
- #
18
- # Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
19
- # @see https://github.com/elastic/elasticsearch-specification
20
- #
21
- module ElasticsearchServerless
22
- module API
23
- module Indices
24
- module Actions
25
- # Retrieves statistics for one or more data streams.
26
- #
27
- # @option arguments [String] :name Comma-separated list of data streams used to limit the request. Wildcard expressions (+*+) are supported. To target all data streams in a cluster, omit this parameter or use +*+.
28
- # @option arguments [String, Array<String>] :expand_wildcards Type of data stream that wildcard patterns can match. Supports comma-separated values, such as +open,hidden+. Server default: open.
29
- # @option arguments [Hash] :headers Custom HTTP headers
30
- #
31
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
32
- #
33
- def data_streams_stats(arguments = {})
34
- arguments = arguments.clone
35
- headers = arguments.delete(:headers) || {}
36
-
37
- body = nil
38
-
39
- _name = arguments.delete(:name)
40
-
41
- method = ElasticsearchServerless::API::HTTP_GET
42
- path = if _name
43
- "_data_stream/#{Utils.listify(_name)}/_stats"
44
- else
45
- "_data_stream/_stats"
46
- end
47
- params = Utils.process_params(arguments)
48
-
49
- ElasticsearchServerless::API::Response.new(
50
- perform_request(method, path, params, body, headers)
51
- )
52
- end
53
- end
54
- end
55
- end
56
- end