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
@@ -22,6 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module MachineLearning
24
24
  module Actions
25
+ # Delete a calendar.
25
26
  # Removes all scheduled events from a calendar, then deletes it.
26
27
  #
27
28
  # @option arguments [String] :calendar_id A string that uniquely identifies a calendar. (*Required*)
@@ -30,6 +31,14 @@ module ElasticsearchServerless
30
31
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar.html
31
32
  #
32
33
  def delete_calendar(arguments = {})
34
+ request_opts = { endpoint: arguments[:endpoint] || "ml.delete_calendar" }
35
+
36
+ defined_params = [:calendar_id].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 'calendar_id' missing" unless arguments[:calendar_id]
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
@@ -22,15 +22,24 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module MachineLearning
24
24
  module Actions
25
- # Deletes scheduled events from a calendar.
25
+ # Delete events from a calendar.
26
26
  #
27
27
  # @option arguments [String] :calendar_id A string that uniquely identifies a calendar. (*Required*)
28
- # @option arguments [String] :event_id Identifier for the scheduled event. You can obtain this identifier by using the get calendar events API. (*Required*)
28
+ # @option arguments [String] :event_id Identifier for the scheduled event.
29
+ # You can obtain this identifier by using the get calendar events API. (*Required*)
29
30
  # @option arguments [Hash] :headers Custom HTTP headers
30
31
  #
31
32
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar-event.html
32
33
  #
33
34
  def delete_calendar_event(arguments = {})
35
+ request_opts = { endpoint: arguments[:endpoint] || "ml.delete_calendar_event" }
36
+
37
+ defined_params = [:calendar_id, :event_id].inject({}) do |set_variables, variable|
38
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
39
+ set_variables
40
+ end
41
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
42
+
34
43
  raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id]
35
44
  raise ArgumentError, "Required argument 'event_id' missing" unless arguments[:event_id]
36
45
 
@@ -48,7 +57,7 @@ module ElasticsearchServerless
48
57
  params = {}
49
58
 
50
59
  ElasticsearchServerless::API::Response.new(
51
- perform_request(method, path, params, body, headers)
60
+ perform_request(method, path, params, body, headers, request_opts)
52
61
  )
53
62
  end
54
63
  end
@@ -22,15 +22,24 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module MachineLearning
24
24
  module Actions
25
- # Deletes anomaly detection jobs from a calendar.
25
+ # Delete anomaly jobs from a calendar.
26
26
  #
27
27
  # @option arguments [String] :calendar_id A string that uniquely identifies a calendar. (*Required*)
28
- # @option arguments [String, Array] :job_id An identifier for the anomaly detection jobs. It can be a job identifier, a group name, or a comma-separated list of jobs or groups. (*Required*)
28
+ # @option arguments [String, Array] :job_id An identifier for the anomaly detection jobs. It can be a job identifier, a group name, or a
29
+ # comma-separated list of jobs or groups. (*Required*)
29
30
  # @option arguments [Hash] :headers Custom HTTP headers
30
31
  #
31
32
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar-job.html
32
33
  #
33
34
  def delete_calendar_job(arguments = {})
35
+ request_opts = { endpoint: arguments[:endpoint] || "ml.delete_calendar_job" }
36
+
37
+ defined_params = [:calendar_id, :job_id].inject({}) do |set_variables, variable|
38
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
39
+ set_variables
40
+ end
41
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
42
+
34
43
  raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id]
35
44
  raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
36
45
 
@@ -48,7 +57,7 @@ module ElasticsearchServerless
48
57
  params = {}
49
58
 
50
59
  ElasticsearchServerless::API::Response.new(
51
- perform_request(method, path, params, body, headers)
60
+ perform_request(method, path, params, body, headers, request_opts)
52
61
  )
53
62
  end
54
63
  end
@@ -22,7 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module MachineLearning
24
24
  module Actions
25
- # Deletes a data frame analytics job.
25
+ # Delete a data frame analytics job.
26
26
  #
27
27
  # @option arguments [String] :id Identifier for the data frame analytics job. (*Required*)
28
28
  # @option arguments [Boolean] :force If +true+, it deletes a job that is not stopped; this method is quicker than stopping and deleting the job.
@@ -32,6 +32,14 @@ module ElasticsearchServerless
32
32
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-dfanalytics.html
33
33
  #
34
34
  def delete_data_frame_analytics(arguments = {})
35
+ request_opts = { endpoint: arguments[:endpoint] || "ml.delete_data_frame_analytics" }
36
+
37
+ defined_params = [:id].inject({}) do |set_variables, variable|
38
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
39
+ set_variables
40
+ end
41
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
42
+
35
43
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
36
44
 
37
45
  arguments = arguments.clone
@@ -46,7 +54,7 @@ module ElasticsearchServerless
46
54
  params = Utils.process_params(arguments)
47
55
 
48
56
  ElasticsearchServerless::API::Response.new(
49
- perform_request(method, path, params, body, headers)
57
+ perform_request(method, path, params, body, headers, request_opts)
50
58
  )
51
59
  end
52
60
  end
@@ -22,15 +22,27 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module MachineLearning
24
24
  module Actions
25
- # Deletes an existing datafeed.
25
+ # Delete a datafeed.
26
26
  #
27
- # @option arguments [String] :datafeed_id A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. (*Required*)
28
- # @option arguments [Boolean] :force Use to forcefully delete a started datafeed; this method is quicker than stopping and deleting the datafeed.
27
+ # @option arguments [String] :datafeed_id A numerical character string that uniquely identifies the datafeed. This
28
+ # identifier can contain lowercase alphanumeric characters (a-z and 0-9),
29
+ # hyphens, and underscores. It must start and end with alphanumeric
30
+ # characters. (*Required*)
31
+ # @option arguments [Boolean] :force Use to forcefully delete a started datafeed; this method is quicker than
32
+ # stopping and deleting the datafeed.
29
33
  # @option arguments [Hash] :headers Custom HTTP headers
30
34
  #
31
35
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html
32
36
  #
33
37
  def delete_datafeed(arguments = {})
38
+ request_opts = { endpoint: arguments[:endpoint] || "ml.delete_datafeed" }
39
+
40
+ defined_params = [:datafeed_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
+
34
46
  raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id]
35
47
 
36
48
  arguments = arguments.clone
@@ -45,7 +57,7 @@ module ElasticsearchServerless
45
57
  params = Utils.process_params(arguments)
46
58
 
47
59
  ElasticsearchServerless::API::Response.new(
48
- perform_request(method, path, params, body, headers)
60
+ perform_request(method, path, params, body, headers, request_opts)
49
61
  )
50
62
  end
51
63
  end
@@ -22,7 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module MachineLearning
24
24
  module Actions
25
- # Deletes a filter.
25
+ # Delete a filter.
26
26
  # If an anomaly detection job references the filter, you cannot delete the
27
27
  # filter. You must update or delete the job before you can delete the filter.
28
28
  #
@@ -32,6 +32,14 @@ module ElasticsearchServerless
32
32
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-filter.html
33
33
  #
34
34
  def delete_filter(arguments = {})
35
+ request_opts = { endpoint: arguments[:endpoint] || "ml.delete_filter" }
36
+
37
+ defined_params = [:filter_id].inject({}) do |set_variables, variable|
38
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
39
+ set_variables
40
+ end
41
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
42
+
35
43
  raise ArgumentError, "Required argument 'filter_id' missing" unless arguments[:filter_id]
36
44
 
37
45
  arguments = arguments.clone
@@ -46,7 +54,7 @@ module ElasticsearchServerless
46
54
  params = {}
47
55
 
48
56
  ElasticsearchServerless::API::Response.new(
49
- perform_request(method, path, params, body, headers)
57
+ perform_request(method, path, params, body, headers, request_opts)
50
58
  )
51
59
  end
52
60
  end
@@ -22,8 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module MachineLearning
24
24
  module Actions
25
- # Deletes an anomaly detection job.
26
- #
25
+ # Delete an anomaly detection job.
27
26
  # All job configuration, model state and results are deleted.
28
27
  # It is not currently possible to delete multiple jobs using wildcards or a
29
28
  # comma separated list. If you delete a job that has a datafeed, the request
@@ -32,14 +31,26 @@ module ElasticsearchServerless
32
31
  # delete job request.
33
32
  #
34
33
  # @option arguments [String] :job_id Identifier for the anomaly detection job. (*Required*)
35
- # @option arguments [Boolean] :force Use to forcefully delete an opened job; this method is quicker than closing and deleting the job.
36
- # @option arguments [Boolean] :delete_user_annotations Specifies whether annotations that have been added by the user should be deleted along with any auto-generated annotations when the job is reset.
37
- # @option arguments [Boolean] :wait_for_completion Specifies whether the request should return immediately or wait until the job deletion completes. Server default: true.
34
+ # @option arguments [Boolean] :force Use to forcefully delete an opened job; this method is quicker than
35
+ # closing and deleting the job.
36
+ # @option arguments [Boolean] :delete_user_annotations Specifies whether annotations that have been added by the
37
+ # user should be deleted along with any auto-generated annotations when the job is
38
+ # reset.
39
+ # @option arguments [Boolean] :wait_for_completion Specifies whether the request should return immediately or wait until the
40
+ # job deletion completes. Server default: true.
38
41
  # @option arguments [Hash] :headers Custom HTTP headers
39
42
  #
40
43
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html
41
44
  #
42
45
  def delete_job(arguments = {})
46
+ request_opts = { endpoint: arguments[:endpoint] || "ml.delete_job" }
47
+
48
+ defined_params = [:job_id].inject({}) do |set_variables, variable|
49
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
50
+ set_variables
51
+ end
52
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
53
+
43
54
  raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
44
55
 
45
56
  arguments = arguments.clone
@@ -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
@@ -22,8 +22,8 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module MachineLearning
24
24
  module Actions
25
- # Deletes an existing trained inference model that is currently not referenced
26
- # by an ingest pipeline.
25
+ # Delete an unreferenced trained model.
26
+ # The request deletes a trained inference model that is not referenced by an ingest pipeline.
27
27
  #
28
28
  # @option arguments [String] :model_id The unique identifier of the trained model. (*Required*)
29
29
  # @option arguments [Boolean] :force Forcefully deletes a trained model that is referenced by ingest pipelines or has a started deployment.
@@ -32,6 +32,14 @@ module ElasticsearchServerless
32
32
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models.html
33
33
  #
34
34
  def delete_trained_model(arguments = {})
35
+ request_opts = { endpoint: arguments[:endpoint] || "ml.delete_trained_model" }
36
+
37
+ defined_params = [:model_id].inject({}) do |set_variables, variable|
38
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
39
+ set_variables
40
+ end
41
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
42
+
35
43
  raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id]
36
44
 
37
45
  arguments = arguments.clone
@@ -46,7 +54,7 @@ module ElasticsearchServerless
46
54
  params = Utils.process_params(arguments)
47
55
 
48
56
  ElasticsearchServerless::API::Response.new(
49
- perform_request(method, path, params, body, headers)
57
+ perform_request(method, path, params, body, headers, request_opts)
50
58
  )
51
59
  end
52
60
  end
@@ -22,7 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module MachineLearning
24
24
  module Actions
25
- # Deletes a trained model alias.
25
+ # Delete a trained model alias.
26
26
  # This API deletes an existing model alias that refers to a trained model. If
27
27
  # the model alias is missing or refers to a model other than the one identified
28
28
  # by the +model_id+, this API returns an error.
@@ -34,6 +34,14 @@ module ElasticsearchServerless
34
34
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models-aliases.html
35
35
  #
36
36
  def delete_trained_model_alias(arguments = {})
37
+ request_opts = { endpoint: arguments[:endpoint] || "ml.delete_trained_model_alias" }
38
+
39
+ defined_params = [:model_id, :model_alias].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
+
37
45
  raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id]
38
46
  raise ArgumentError, "Required argument 'model_alias' missing" unless arguments[:model_alias]
39
47
 
@@ -51,7 +59,7 @@ module ElasticsearchServerless
51
59
  params = {}
52
60
 
53
61
  ElasticsearchServerless::API::Response.new(
54
- perform_request(method, path, params, body, headers)
62
+ perform_request(method, path, params, body, headers, request_opts)
55
63
  )
56
64
  end
57
65
  end
@@ -22,6 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module MachineLearning
24
24
  module Actions
25
+ # Estimate job model memory usage.
25
26
  # Makes an estimation of the memory usage for an anomaly detection job model.
26
27
  # It is based on analysis configuration details for the job and cardinality
27
28
  # estimates for the fields it references.
@@ -32,6 +33,8 @@ module ElasticsearchServerless
32
33
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-apis.html
33
34
  #
34
35
  def estimate_model_memory(arguments = {})
36
+ request_opts = { endpoint: arguments[:endpoint] || "ml.estimate_model_memory" }
37
+
35
38
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
36
39
 
37
40
  arguments = arguments.clone
@@ -44,7 +47,7 @@ module ElasticsearchServerless
44
47
  params = {}
45
48
 
46
49
  ElasticsearchServerless::API::Response.new(
47
- perform_request(method, path, params, body, headers)
50
+ perform_request(method, path, params, body, headers, request_opts)
48
51
  )
49
52
  end
50
53
  end
@@ -22,7 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module MachineLearning
24
24
  module Actions
25
- # Evaluates the data frame analytics for an annotated index.
25
+ # Evaluate data frame analytics.
26
26
  # The API packages together commonly used evaluation metrics for various types
27
27
  # of machine learning features. This has been designed for use on indexes
28
28
  # created by data frame analytics. Evaluation requires both a ground truth
@@ -34,6 +34,8 @@ module ElasticsearchServerless
34
34
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/evaluate-dfanalytics.html
35
35
  #
36
36
  def evaluate_data_frame(arguments = {})
37
+ request_opts = { endpoint: arguments[:endpoint] || "ml.evaluate_data_frame" }
38
+
37
39
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
38
40
 
39
41
  arguments = arguments.clone
@@ -46,7 +48,7 @@ module ElasticsearchServerless
46
48
  params = {}
47
49
 
48
50
  ElasticsearchServerless::API::Response.new(
49
- perform_request(method, path, params, body, headers)
51
+ perform_request(method, path, params, body, headers, request_opts)
50
52
  )
51
53
  end
52
54
  end
@@ -33,17 +33,30 @@ module ElasticsearchServerless
33
33
  # analyzing further data.
34
34
  #
35
35
  # @option arguments [String] :job_id Identifier for the anomaly detection job. (*Required*)
36
- # @option arguments [String, Time] :advance_time Specifies to advance to a particular time value. Results are generated and the model is updated for data from the specified time interval.
37
- # @option arguments [Boolean] :calc_interim If true, calculates the interim results for the most recent bucket or all buckets within the latency period.
38
- # @option arguments [String, Time] :end When used in conjunction with +calc_interim+ and +start+, specifies the range of buckets on which to calculate interim results.
39
- # @option arguments [String, Time] :skip_time Specifies to skip to a particular time value. Results are not generated and the model is not updated for data from the specified time interval.
40
- # @option arguments [String, Time] :start When used in conjunction with +calc_interim+, specifies the range of buckets on which to calculate interim results.
36
+ # @option arguments [String, Time] :advance_time Specifies to advance to a particular time value. Results are generated
37
+ # and the model is updated for data from the specified time interval.
38
+ # @option arguments [Boolean] :calc_interim If true, calculates the interim results for the most recent bucket or all
39
+ # buckets within the latency period.
40
+ # @option arguments [String, Time] :end When used in conjunction with +calc_interim+ and +start+, specifies the
41
+ # range of buckets on which to calculate interim results.
42
+ # @option arguments [String, Time] :skip_time Specifies to skip to a particular time value. Results are not generated
43
+ # and the model is not updated for data from the specified time interval.
44
+ # @option arguments [String, Time] :start When used in conjunction with +calc_interim+, specifies the range of
45
+ # buckets on which to calculate interim results.
41
46
  # @option arguments [Hash] :headers Custom HTTP headers
42
47
  # @option arguments [Hash] :body request body
43
48
  #
44
49
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html
45
50
  #
46
51
  def flush_job(arguments = {})
52
+ request_opts = { endpoint: arguments[:endpoint] || "ml.flush_job" }
53
+
54
+ defined_params = [:job_id].inject({}) do |set_variables, variable|
55
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
56
+ set_variables
57
+ end
58
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
59
+
47
60
  raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
48
61
 
49
62
  arguments = arguments.clone
@@ -58,7 +71,7 @@ module ElasticsearchServerless
58
71
  params = Utils.process_params(arguments)
59
72
 
60
73
  ElasticsearchServerless::API::Response.new(
61
- perform_request(method, path, params, body, headers)
74
+ perform_request(method, path, params, body, headers, request_opts)
62
75
  )
63
76
  end
64
77
  end
@@ -35,6 +35,14 @@ module ElasticsearchServerless
35
35
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar-event.html
36
36
  #
37
37
  def get_calendar_events(arguments = {})
38
+ request_opts = { endpoint: arguments[:endpoint] || "ml.get_calendar_events" }
39
+
40
+ defined_params = [:calendar_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 'calendar_id' missing" unless arguments[:calendar_id]
39
47
 
40
48
  arguments = arguments.clone
@@ -49,7 +57,7 @@ module ElasticsearchServerless
49
57
  params = Utils.process_params(arguments)
50
58
 
51
59
  ElasticsearchServerless::API::Response.new(
52
- perform_request(method, path, params, body, headers)
60
+ perform_request(method, path, params, body, headers, request_opts)
53
61
  )
54
62
  end
55
63
  end
@@ -33,6 +33,14 @@ module ElasticsearchServerless
33
33
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar.html
34
34
  #
35
35
  def get_calendars(arguments = {})
36
+ request_opts = { endpoint: arguments[:endpoint] || "ml.get_calendars" }
37
+
38
+ defined_params = [:calendar_id].inject({}) do |set_variables, variable|
39
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
40
+ set_variables
41
+ end
42
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
43
+
36
44
  arguments = arguments.clone
37
45
  headers = arguments.delete(:headers) || {}
38
46
 
@@ -54,7 +62,7 @@ module ElasticsearchServerless
54
62
  params = Utils.process_params(arguments)
55
63
 
56
64
  ElasticsearchServerless::API::Response.new(
57
- perform_request(method, path, params, body, headers)
65
+ perform_request(method, path, params, body, headers, request_opts)
58
66
  )
59
67
  end
60
68
  end
@@ -27,16 +27,36 @@ module ElasticsearchServerless
27
27
  # API request by using a comma-separated list of data frame analytics jobs or a
28
28
  # wildcard expression.
29
29
  #
30
- # @option arguments [String] :id Identifier for the data frame analytics job. If you do not specify this option, the API returns information for the first hundred data frame analytics jobs.
31
- # @option arguments [Boolean] :allow_no_match Specifies what to do when the request: 1. Contains wildcard expressions and there are no data frame analytics jobs that match. 2. Contains the +_all+ string or no identifiers and there are no matches. 3. Contains wildcard expressions and there are only partial matches. The default value returns an empty data_frame_analytics array when there are no matches and the subset of results when there are partial matches. If this parameter is +false+, the request returns a 404 status code when there are no matches or only partial matches. Server default: true.
30
+ # @option arguments [String] :id Identifier for the data frame analytics job. If you do not specify this
31
+ # option, the API returns information for the first hundred data frame
32
+ # analytics jobs.
33
+ # @option arguments [Boolean] :allow_no_match Specifies what to do when the request:
34
+ # - Contains wildcard expressions and there are no data frame analytics
35
+ # jobs that match.
36
+ # - Contains the +_all+ string or no identifiers and there are no matches.
37
+ # - Contains wildcard expressions and there are only partial matches.
38
+ # The default value returns an empty data_frame_analytics array when there
39
+ # are no matches and the subset of results when there are partial matches.
40
+ # If this parameter is +false+, the request returns a 404 status code when
41
+ # there are no matches or only partial matches. Server default: true.
32
42
  # @option arguments [Integer] :from Skips the specified number of data frame analytics jobs. Server default: 0.
33
43
  # @option arguments [Integer] :size Specifies the maximum number of data frame analytics jobs to obtain. Server default: 100.
34
- # @option arguments [Boolean] :exclude_generated Indicates if certain fields should be removed from the configuration on retrieval. This allows the configuration to be in an acceptable format to be retrieved and then added to another cluster.
44
+ # @option arguments [Boolean] :exclude_generated Indicates if certain fields should be removed from the configuration on
45
+ # retrieval. This allows the configuration to be in an acceptable format to
46
+ # be retrieved and then added to another cluster.
35
47
  # @option arguments [Hash] :headers Custom HTTP headers
36
48
  #
37
49
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html
38
50
  #
39
51
  def get_data_frame_analytics(arguments = {})
52
+ request_opts = { endpoint: arguments[:endpoint] || "ml.get_data_frame_analytics" }
53
+
54
+ defined_params = [:id].inject({}) do |set_variables, variable|
55
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
56
+ set_variables
57
+ end
58
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
59
+
40
60
  arguments = arguments.clone
41
61
  headers = arguments.delete(:headers) || {}
42
62
 
@@ -53,7 +73,7 @@ module ElasticsearchServerless
53
73
  params = Utils.process_params(arguments)
54
74
 
55
75
  ElasticsearchServerless::API::Response.new(
56
- perform_request(method, path, params, body, headers)
76
+ perform_request(method, path, params, body, headers, request_opts)
57
77
  )
58
78
  end
59
79
  end
@@ -24,8 +24,18 @@ module ElasticsearchServerless
24
24
  module Actions
25
25
  # Retrieves usage information for data frame analytics jobs.
26
26
  #
27
- # @option arguments [String] :id Identifier for the data frame analytics job. If you do not specify this option, the API returns information for the first hundred data frame analytics jobs.
28
- # @option arguments [Boolean] :allow_no_match Specifies what to do when the request: 1. Contains wildcard expressions and there are no data frame analytics jobs that match. 2. Contains the +_all+ string or no identifiers and there are no matches. 3. Contains wildcard expressions and there are only partial matches. The default value returns an empty data_frame_analytics array when there are no matches and the subset of results when there are partial matches. If this parameter is +false+, the request returns a 404 status code when there are no matches or only partial matches. Server default: true.
27
+ # @option arguments [String] :id Identifier for the data frame analytics job. If you do not specify this
28
+ # option, the API returns information for the first hundred data frame
29
+ # analytics jobs.
30
+ # @option arguments [Boolean] :allow_no_match Specifies what to do when the request:
31
+ # - Contains wildcard expressions and there are no data frame analytics
32
+ # jobs that match.
33
+ # - Contains the +_all+ string or no identifiers and there are no matches.
34
+ # - Contains wildcard expressions and there are only partial matches.
35
+ # The default value returns an empty data_frame_analytics array when there
36
+ # are no matches and the subset of results when there are partial matches.
37
+ # If this parameter is +false+, the request returns a 404 status code when
38
+ # there are no matches or only partial matches. Server default: true.
29
39
  # @option arguments [Integer] :from Skips the specified number of data frame analytics jobs. Server default: 0.
30
40
  # @option arguments [Integer] :size Specifies the maximum number of data frame analytics jobs to obtain. Server default: 100.
31
41
  # @option arguments [Boolean] :verbose Defines whether the stats response should be verbose.
@@ -34,6 +44,14 @@ module ElasticsearchServerless
34
44
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html
35
45
  #
36
46
  def get_data_frame_analytics_stats(arguments = {})
47
+ request_opts = { endpoint: arguments[:endpoint] || "ml.get_data_frame_analytics_stats" }
48
+
49
+ defined_params = [:id].inject({}) do |set_variables, variable|
50
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
51
+ set_variables
52
+ end
53
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
54
+
37
55
  arguments = arguments.clone
38
56
  headers = arguments.delete(:headers) || {}
39
57
 
@@ -50,7 +68,7 @@ module ElasticsearchServerless
50
68
  params = Utils.process_params(arguments)
51
69
 
52
70
  ElasticsearchServerless::API::Response.new(
53
- perform_request(method, path, params, body, headers)
71
+ perform_request(method, path, params, body, headers, request_opts)
54
72
  )
55
73
  end
56
74
  end
@@ -30,13 +30,30 @@ module ElasticsearchServerless
30
30
  # only information you receive is the +datafeed_id+ and the +state+.
31
31
  # This API returns a maximum of 10,000 datafeeds.
32
32
  #
33
- # @option arguments [String, Array] :datafeed_id Identifier for the datafeed. It can be a datafeed identifier or a wildcard expression. If you do not specify one of these options, the API returns information about all datafeeds.
34
- # @option arguments [Boolean] :allow_no_match Specifies what to do when the request: 1. Contains wildcard expressions and there are no datafeeds that match. 2. Contains the +_all+ string or no identifiers and there are no matches. 3. Contains wildcard expressions and there are only partial matches. The default value is +true+, which returns an empty +datafeeds+ array when there are no matches and the subset of results when there are partial matches. If this parameter is +false+, the request returns a +404+ status code when there are no matches or only partial matches.
33
+ # @option arguments [String, Array] :datafeed_id Identifier for the datafeed. It can be a datafeed identifier or a
34
+ # wildcard expression. If you do not specify one of these options, the API
35
+ # returns information about all datafeeds.
36
+ # @option arguments [Boolean] :allow_no_match Specifies what to do when the request:
37
+ # - Contains wildcard expressions and there are no datafeeds that match.
38
+ # - Contains the +_all+ string or no identifiers and there are no matches.
39
+ # - Contains wildcard expressions and there are only partial matches.
40
+ # The default value is +true+, which returns an empty +datafeeds+ array
41
+ # when there are no matches and the subset of results when there are
42
+ # partial matches. If this parameter is +false+, the request returns a
43
+ # +404+ status code when there are no matches or only partial matches.
35
44
  # @option arguments [Hash] :headers Custom HTTP headers
36
45
  #
37
46
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html
38
47
  #
39
48
  def get_datafeed_stats(arguments = {})
49
+ request_opts = { endpoint: arguments[:endpoint] || "ml.get_datafeed_stats" }
50
+
51
+ defined_params = [:datafeed_id].inject({}) do |set_variables, variable|
52
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
53
+ set_variables
54
+ end
55
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
56
+
40
57
  arguments = arguments.clone
41
58
  headers = arguments.delete(:headers) || {}
42
59
 
@@ -53,7 +70,7 @@ module ElasticsearchServerless
53
70
  params = Utils.process_params(arguments)
54
71
 
55
72
  ElasticsearchServerless::API::Response.new(
56
- perform_request(method, path, params, body, headers)
73
+ perform_request(method, path, params, body, headers, request_opts)
57
74
  )
58
75
  end
59
76
  end