elasticsearch-serverless 0.1.0.20231031.pre → 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 +13 -2
  3. data/lib/elasticsearch-serverless/api/async_search/get.rb +19 -4
  4. data/lib/elasticsearch-serverless/api/async_search/status.rb +12 -2
  5. data/lib/elasticsearch-serverless/api/async_search/submit.rb +20 -5
  6. data/lib/elasticsearch-serverless/api/bulk.rb +19 -5
  7. data/lib/elasticsearch-serverless/api/cat/aliases.rb +24 -6
  8. data/lib/elasticsearch-serverless/api/cat/component_templates.rb +25 -6
  9. data/lib/elasticsearch-serverless/api/cat/count.rb +27 -7
  10. data/lib/elasticsearch-serverless/api/cat/help.rb +16 -6
  11. data/lib/elasticsearch-serverless/api/cat/indices.rb +34 -7
  12. data/lib/elasticsearch-serverless/api/cat/ml_data_frame_analytics.rb +27 -7
  13. data/lib/elasticsearch-serverless/api/cat/ml_datafeeds.rb +35 -7
  14. data/lib/elasticsearch-serverless/api/cat/ml_jobs.rb +35 -7
  15. data/lib/elasticsearch-serverless/api/cat/ml_trained_models.rb +28 -7
  16. data/lib/elasticsearch-serverless/api/cat/transforms.rb +30 -8
  17. data/lib/elasticsearch-serverless/api/clear_scroll.rb +13 -4
  18. data/lib/elasticsearch-serverless/api/close_point_in_time.rb +4 -2
  19. data/lib/elasticsearch-serverless/api/cluster/delete_component_template.rb +16 -4
  20. data/lib/elasticsearch-serverless/api/cluster/exists_component_template.rb +18 -5
  21. data/lib/elasticsearch-serverless/api/cluster/get_component_template.rb +17 -5
  22. data/lib/elasticsearch-serverless/api/cluster/info.rb +11 -2
  23. data/lib/elasticsearch-serverless/api/cluster/put_component_template.rb +28 -4
  24. data/lib/elasticsearch-serverless/api/connector/check_in.rb +65 -0
  25. data/lib/elasticsearch-serverless/api/connector/delete.rb +66 -0
  26. data/lib/elasticsearch-serverless/api/connector/get.rb +65 -0
  27. data/lib/elasticsearch-serverless/api/connector/list.rb +60 -0
  28. data/lib/elasticsearch-serverless/api/connector/post.rb +55 -0
  29. data/lib/elasticsearch-serverless/api/connector/put.rb +68 -0
  30. data/lib/elasticsearch-serverless/api/connector/sync_job_cancel.rb +66 -0
  31. data/lib/elasticsearch-serverless/api/connector/sync_job_delete.rb +66 -0
  32. data/lib/elasticsearch-serverless/api/connector/sync_job_get.rb +66 -0
  33. data/lib/elasticsearch-serverless/api/connector/sync_job_list.rb +59 -0
  34. data/lib/elasticsearch-serverless/api/connector/sync_job_post.rb +57 -0
  35. data/lib/elasticsearch-serverless/api/connector/update_active_filtering.rb +65 -0
  36. data/lib/elasticsearch-serverless/api/connector/update_api_key_id.rb +67 -0
  37. data/lib/elasticsearch-serverless/api/connector/update_configuration.rb +67 -0
  38. data/lib/elasticsearch-serverless/api/connector/update_error.rb +67 -0
  39. data/lib/elasticsearch-serverless/api/connector/update_filtering.rb +67 -0
  40. data/lib/elasticsearch-serverless/api/connector/update_filtering_validation.rb +67 -0
  41. data/lib/elasticsearch-serverless/api/connector/update_index_name.rb +67 -0
  42. data/lib/elasticsearch-serverless/api/connector/update_name.rb +67 -0
  43. data/lib/elasticsearch-serverless/api/connector/update_native.rb +67 -0
  44. data/lib/elasticsearch-serverless/api/connector/update_pipeline.rb +67 -0
  45. data/lib/elasticsearch-serverless/api/connector/update_scheduling.rb +67 -0
  46. data/lib/elasticsearch-serverless/api/connector/update_service_type.rb +67 -0
  47. data/lib/elasticsearch-serverless/api/connector/update_status.rb +67 -0
  48. data/lib/elasticsearch-serverless/api/count.rb +30 -10
  49. data/lib/elasticsearch-serverless/api/create.rb +23 -8
  50. data/lib/elasticsearch-serverless/api/delete.rb +18 -6
  51. data/lib/elasticsearch-serverless/api/delete_by_query.rb +39 -12
  52. data/lib/elasticsearch-serverless/api/delete_script.rb +15 -4
  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 +13 -3
  56. data/lib/elasticsearch-serverless/api/enrich/put_policy.rb +11 -2
  57. data/lib/elasticsearch-serverless/api/enrich/stats.rb +5 -2
  58. data/lib/elasticsearch-serverless/api/eql/delete.rb +14 -3
  59. data/lib/elasticsearch-serverless/api/eql/get.rb +14 -4
  60. data/lib/elasticsearch-serverless/api/eql/get_status.rb +10 -2
  61. data/lib/elasticsearch-serverless/api/eql/search.rb +9 -1
  62. data/lib/elasticsearch-serverless/api/esql/query.rb +57 -0
  63. data/lib/elasticsearch-serverless/api/exists.rb +20 -6
  64. data/lib/elasticsearch-serverless/api/exists_source.rb +17 -5
  65. data/lib/elasticsearch-serverless/api/explain.rb +17 -5
  66. data/lib/elasticsearch-serverless/api/field_caps.rb +16 -3
  67. data/lib/elasticsearch-serverless/api/get.rb +18 -4
  68. data/lib/elasticsearch-serverless/api/get_script.rb +11 -2
  69. data/lib/elasticsearch-serverless/api/get_source.rb +10 -1
  70. data/lib/elasticsearch-serverless/api/graph/explore.rb +13 -3
  71. data/lib/elasticsearch-serverless/api/index.rb +27 -7
  72. data/lib/elasticsearch-serverless/api/indices/add_block.rb +11 -2
  73. data/lib/elasticsearch-serverless/api/indices/analyze.rb +13 -3
  74. data/lib/elasticsearch-serverless/api/indices/create.rb +17 -5
  75. data/lib/elasticsearch-serverless/api/indices/create_data_stream.rb +18 -3
  76. data/lib/elasticsearch-serverless/api/indices/data_streams_stats.rb +16 -4
  77. data/lib/elasticsearch-serverless/api/indices/delete.rb +26 -8
  78. data/lib/elasticsearch-serverless/api/indices/delete_alias.rb +19 -6
  79. data/lib/elasticsearch-serverless/api/indices/delete_data_lifecycle.rb +11 -2
  80. data/lib/elasticsearch-serverless/api/indices/delete_data_stream.rb +11 -2
  81. data/lib/elasticsearch-serverless/api/indices/delete_index_template.rb +13 -2
  82. data/lib/elasticsearch-serverless/api/indices/exists.rb +17 -4
  83. data/lib/elasticsearch-serverless/api/indices/exists_alias.rb +19 -5
  84. data/lib/elasticsearch-serverless/api/indices/exists_index_template.rb +9 -1
  85. data/lib/elasticsearch-serverless/api/indices/explain_data_lifecycle.rb +11 -2
  86. data/lib/elasticsearch-serverless/api/indices/get.rb +20 -5
  87. data/lib/elasticsearch-serverless/api/indices/get_alias.rb +23 -6
  88. data/lib/elasticsearch-serverless/api/indices/get_data_lifecycle.rb +17 -4
  89. data/lib/elasticsearch-serverless/api/indices/get_data_stream.rb +15 -4
  90. data/lib/elasticsearch-serverless/api/indices/get_index_template.rb +11 -2
  91. data/lib/elasticsearch-serverless/api/indices/get_mapping.rb +23 -6
  92. data/lib/elasticsearch-serverless/api/indices/get_settings.rb +28 -7
  93. data/lib/elasticsearch-serverless/api/indices/migrate_to_data_stream.rb +20 -2
  94. data/lib/elasticsearch-serverless/api/indices/modify_data_stream.rb +5 -2
  95. data/lib/elasticsearch-serverless/api/indices/put_alias.rb +21 -6
  96. data/lib/elasticsearch-serverless/api/indices/put_data_lifecycle.rb +22 -6
  97. data/lib/elasticsearch-serverless/api/indices/put_index_template.rb +14 -2
  98. data/lib/elasticsearch-serverless/api/indices/put_mapping.rb +23 -6
  99. data/lib/elasticsearch-serverless/api/indices/put_settings.rb +29 -7
  100. data/lib/elasticsearch-serverless/api/indices/put_template.rb +71 -0
  101. data/lib/elasticsearch-serverless/api/indices/refresh.rb +21 -5
  102. data/lib/elasticsearch-serverless/api/indices/resolve_index.rb +17 -4
  103. data/lib/elasticsearch-serverless/api/indices/rollover.rb +20 -7
  104. data/lib/elasticsearch-serverless/api/indices/simulate_index_template.rb +13 -6
  105. data/lib/elasticsearch-serverless/api/indices/simulate_template.rb +14 -4
  106. data/lib/elasticsearch-serverless/api/indices/update_aliases.rb +9 -4
  107. data/lib/elasticsearch-serverless/api/indices/validate_query.rb +24 -7
  108. data/lib/elasticsearch-serverless/api/inference/delete.rb +74 -0
  109. data/lib/elasticsearch-serverless/api/inference/get.rb +72 -0
  110. data/lib/elasticsearch-serverless/api/inference/inference.rb +74 -0
  111. data/lib/elasticsearch-serverless/api/inference/put.rb +74 -0
  112. data/lib/elasticsearch-serverless/api/info.rb +4 -1
  113. data/lib/elasticsearch-serverless/api/ingest/delete_pipeline.rb +16 -5
  114. data/lib/elasticsearch-serverless/api/ingest/get_pipeline.rb +16 -4
  115. data/lib/elasticsearch-serverless/api/ingest/processor_grok.rb +6 -2
  116. data/lib/elasticsearch-serverless/api/ingest/put_pipeline.rb +11 -2
  117. data/lib/elasticsearch-serverless/api/ingest/simulate.rb +12 -3
  118. data/lib/elasticsearch-serverless/api/license/get.rb +8 -3
  119. data/lib/elasticsearch-serverless/api/logstash/delete_pipeline.rb +10 -2
  120. data/lib/elasticsearch-serverless/api/logstash/get_pipeline.rb +10 -2
  121. data/lib/elasticsearch-serverless/api/logstash/put_pipeline.rb +10 -2
  122. data/lib/elasticsearch-serverless/api/machine_learning/close_job.rb +18 -4
  123. data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar.rb +11 -2
  124. data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_event.rb +12 -3
  125. data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_job.rb +12 -3
  126. data/lib/elasticsearch-serverless/api/machine_learning/delete_data_frame_analytics.rb +10 -2
  127. data/lib/elasticsearch-serverless/api/machine_learning/delete_datafeed.rb +16 -4
  128. data/lib/elasticsearch-serverless/api/machine_learning/delete_filter.rb +12 -2
  129. data/lib/elasticsearch-serverless/api/machine_learning/delete_job.rb +23 -5
  130. data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model.rb +11 -2
  131. data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model_alias.rb +13 -2
  132. data/lib/elasticsearch-serverless/api/machine_learning/estimate_model_memory.rb +7 -2
  133. data/lib/elasticsearch-serverless/api/machine_learning/evaluate_data_frame.rb +8 -2
  134. data/lib/elasticsearch-serverless/api/machine_learning/flush_job.rb +27 -6
  135. data/lib/elasticsearch-serverless/api/machine_learning/get_calendar_events.rb +9 -1
  136. data/lib/elasticsearch-serverless/api/machine_learning/get_calendars.rb +9 -1
  137. data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics.rb +27 -4
  138. data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics_stats.rb +21 -3
  139. data/lib/elasticsearch-serverless/api/machine_learning/get_datafeed_stats.rb +26 -3
  140. data/lib/elasticsearch-serverless/api/machine_learning/get_datafeeds.rb +28 -4
  141. data/lib/elasticsearch-serverless/api/machine_learning/get_filters.rb +10 -1
  142. data/lib/elasticsearch-serverless/api/machine_learning/get_job_stats.rb +21 -3
  143. data/lib/elasticsearch-serverless/api/machine_learning/get_jobs.rb +27 -4
  144. data/lib/elasticsearch-serverless/api/machine_learning/get_overall_buckets.rb +46 -7
  145. data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models.rb +29 -8
  146. data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models_stats.rb +19 -4
  147. data/lib/elasticsearch-serverless/api/machine_learning/infer_trained_model.rb +71 -0
  148. data/lib/elasticsearch-serverless/api/machine_learning/open_job.rb +17 -2
  149. data/lib/elasticsearch-serverless/api/machine_learning/post_calendar_events.rb +10 -2
  150. data/lib/elasticsearch-serverless/api/machine_learning/preview_data_frame_analytics.rb +10 -2
  151. data/lib/elasticsearch-serverless/api/machine_learning/preview_datafeed.rb +21 -2
  152. data/lib/elasticsearch-serverless/api/machine_learning/put_calendar.rb +10 -2
  153. data/lib/elasticsearch-serverless/api/machine_learning/put_calendar_job.rb +10 -2
  154. data/lib/elasticsearch-serverless/api/machine_learning/put_data_frame_analytics.rb +14 -2
  155. data/lib/elasticsearch-serverless/api/machine_learning/put_datafeed.rb +25 -4
  156. data/lib/elasticsearch-serverless/api/machine_learning/put_filter.rb +11 -1
  157. data/lib/elasticsearch-serverless/api/machine_learning/put_job.rb +11 -2
  158. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model.rb +15 -3
  159. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_alias.rb +28 -3
  160. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_definition_part.rb +12 -3
  161. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_vocabulary.rb +12 -2
  162. data/lib/elasticsearch-serverless/api/machine_learning/reset_job.rb +19 -4
  163. data/lib/elasticsearch-serverless/api/machine_learning/start_data_frame_analytics.rb +25 -3
  164. data/lib/elasticsearch-serverless/api/machine_learning/start_datafeed.rb +35 -4
  165. data/lib/elasticsearch-serverless/api/machine_learning/start_trained_model_deployment.rb +26 -6
  166. data/lib/elasticsearch-serverless/api/machine_learning/stop_data_frame_analytics.rb +25 -4
  167. data/lib/elasticsearch-serverless/api/machine_learning/stop_datafeed.rb +21 -3
  168. data/lib/elasticsearch-serverless/api/machine_learning/stop_trained_model_deployment.rb +16 -4
  169. data/lib/elasticsearch-serverless/api/machine_learning/update_data_frame_analytics.rb +13 -3
  170. data/lib/elasticsearch-serverless/api/machine_learning/update_datafeed.rb +26 -5
  171. data/lib/elasticsearch-serverless/api/machine_learning/update_filter.rb +10 -2
  172. data/lib/elasticsearch-serverless/api/machine_learning/update_job.rb +9 -1
  173. data/lib/elasticsearch-serverless/api/machine_learning/update_trained_model_deployment.rb +68 -0
  174. data/lib/elasticsearch-serverless/api/mget.rb +17 -3
  175. data/lib/elasticsearch-serverless/api/msearch.rb +15 -1
  176. data/lib/elasticsearch-serverless/api/msearch_template.rb +17 -5
  177. data/lib/elasticsearch-serverless/api/mtermvectors.rb +14 -8
  178. data/lib/elasticsearch-serverless/api/open_point_in_time.rb +20 -4
  179. data/lib/elasticsearch-serverless/api/ping.rb +4 -1
  180. data/lib/elasticsearch-serverless/api/put_script.rb +19 -6
  181. data/lib/elasticsearch-serverless/api/query_rules/delete_rule.rb +65 -0
  182. data/lib/elasticsearch-serverless/api/{query_ruleset/delete.rb → query_rules/delete_ruleset.rb} +11 -7
  183. data/lib/elasticsearch-serverless/api/query_rules/get_rule.rb +65 -0
  184. data/lib/elasticsearch-serverless/api/{query_ruleset/get.rb → query_rules/get_ruleset.rb} +12 -8
  185. data/lib/elasticsearch-serverless/api/{query_ruleset/list.rb → query_rules/list_rulesets.rb} +6 -8
  186. data/lib/elasticsearch-serverless/api/query_rules/put_rule.rb +67 -0
  187. data/lib/elasticsearch-serverless/api/{query_ruleset/put.rb → query_rules/put_ruleset.rb} +11 -7
  188. data/lib/elasticsearch-serverless/api/rank_eval.rb +12 -3
  189. data/lib/elasticsearch-serverless/api/reindex.rb +11 -7
  190. data/lib/elasticsearch-serverless/api/render_search_template.rb +12 -3
  191. data/lib/elasticsearch-serverless/api/scripts_painless_execute.rb +5 -2
  192. data/lib/elasticsearch-serverless/api/scroll.rb +9 -1
  193. data/lib/elasticsearch-serverless/api/search.rb +110 -30
  194. data/lib/elasticsearch-serverless/api/search_application/delete.rb +9 -1
  195. data/lib/elasticsearch-serverless/api/search_application/delete_behavioral_analytics.rb +9 -1
  196. data/lib/elasticsearch-serverless/api/search_application/get.rb +10 -2
  197. data/lib/elasticsearch-serverless/api/search_application/get_behavioral_analytics.rb +9 -1
  198. data/lib/elasticsearch-serverless/api/search_application/list.rb +3 -1
  199. data/lib/elasticsearch-serverless/api/search_application/put.rb +9 -1
  200. data/lib/elasticsearch-serverless/api/search_application/put_behavioral_analytics.rb +9 -1
  201. data/lib/elasticsearch-serverless/api/search_application/search.rb +12 -3
  202. data/lib/elasticsearch-serverless/api/search_mvt.rb +27 -7
  203. data/lib/elasticsearch-serverless/api/search_template.rb +23 -7
  204. data/lib/elasticsearch-serverless/api/security/authenticate.rb +8 -2
  205. data/lib/elasticsearch-serverless/api/security/create_api_key.rb +7 -1
  206. data/lib/elasticsearch-serverless/api/security/get_api_key.rb +23 -7
  207. data/lib/elasticsearch-serverless/api/security/has_privileges.rb +10 -1
  208. data/lib/elasticsearch-serverless/api/security/invalidate_api_key.rb +10 -1
  209. data/lib/elasticsearch-serverless/api/security/query_api_keys.rb +9 -3
  210. data/lib/elasticsearch-serverless/api/security/update_api_key.rb +75 -0
  211. data/lib/elasticsearch-serverless/api/sql/clear_cursor.rb +3 -1
  212. data/lib/elasticsearch-serverless/api/sql/delete_async.rb +9 -1
  213. data/lib/elasticsearch-serverless/api/sql/get_async.rb +15 -4
  214. data/lib/elasticsearch-serverless/api/sql/get_async_status.rb +9 -1
  215. data/lib/elasticsearch-serverless/api/sql/query.rb +3 -1
  216. data/lib/elasticsearch-serverless/api/sql/translate.rb +3 -1
  217. data/lib/elasticsearch-serverless/api/synonyms/delete_synonym.rb +9 -1
  218. data/lib/elasticsearch-serverless/api/synonyms/delete_synonym_rule.rb +9 -1
  219. data/lib/elasticsearch-serverless/api/synonyms/get_synonym.rb +9 -1
  220. data/lib/elasticsearch-serverless/api/synonyms/get_synonym_rule.rb +9 -1
  221. data/lib/elasticsearch-serverless/api/synonyms/get_synonyms_sets.rb +3 -1
  222. data/lib/elasticsearch-serverless/api/synonyms/put_synonym.rb +10 -2
  223. data/lib/elasticsearch-serverless/api/synonyms/put_synonym_rule.rb +9 -1
  224. data/lib/elasticsearch-serverless/api/tasks/get.rb +67 -0
  225. data/lib/elasticsearch-serverless/api/terms_enum.rb +9 -1
  226. data/lib/elasticsearch-serverless/api/termvectors.rb +21 -9
  227. data/lib/elasticsearch-serverless/api/transform/delete_transform.rb +15 -4
  228. data/lib/elasticsearch-serverless/api/transform/get_transform.rb +23 -4
  229. data/lib/elasticsearch-serverless/api/transform/get_transform_stats.rb +20 -3
  230. data/lib/elasticsearch-serverless/api/transform/preview_transform.rb +18 -4
  231. data/lib/elasticsearch-serverless/api/transform/put_transform.rb +34 -4
  232. data/lib/elasticsearch-serverless/api/transform/reset_transform.rb +17 -4
  233. data/lib/elasticsearch-serverless/api/transform/schedule_now_transform.rb +15 -2
  234. data/lib/elasticsearch-serverless/api/transform/start_transform.rb +24 -2
  235. data/lib/elasticsearch-serverless/api/transform/stop_transform.rb +23 -6
  236. data/lib/elasticsearch-serverless/api/transform/update_transform.rb +20 -3
  237. data/lib/elasticsearch-serverless/api/update.rb +23 -7
  238. data/lib/elasticsearch-serverless/api/update_by_query.rb +38 -11
  239. data/lib/elasticsearch-serverless/api.rb +9 -6
  240. data/lib/elasticsearch-serverless/version.rb +3 -3
  241. data/lib/elasticsearch-serverless.rb +16 -7
  242. metadata +46 -65
@@ -23,10 +23,23 @@ module ElasticsearchServerless
23
23
  module MachineLearning
24
24
  module Actions
25
25
  # Instantiates a datafeed.
26
+ # Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job.
27
+ # You can associate only one datafeed with each anomaly detection job.
28
+ # The datafeed contains a query that runs at a defined interval (+frequency+).
29
+ # If you are concerned about delayed data, you can add a delay (+query_delay') at each interval.
30
+ # When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had
31
+ # at the time of creation and runs the query using those same roles. If you provide secondary authorization headers,
32
+ # those credentials are used instead.
33
+ # You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed
34
+ # directly to the+.ml-config+index. Do not give users+write+privileges on the+.ml-config` index.
26
35
  #
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] :allow_no_indices If true, wildcard indices expressions that resolve into no concrete indices are ignored. This includes the +_all+ string or when no indices are specified. Server default: true.
29
- # @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. Server default: open.
36
+ # @option arguments [String] :datafeed_id A numerical character string that uniquely identifies the datafeed.
37
+ # This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.
38
+ # It must start and end with alphanumeric characters. (*Required*)
39
+ # @option arguments [Boolean] :allow_no_indices If true, wildcard indices expressions that resolve into no concrete indices are ignored. This includes the +_all+
40
+ # string or when no indices are specified. Server default: true.
41
+ # @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
42
+ # whether wildcard expressions match hidden data streams. Supports comma-separated values. Server default: open.
30
43
  # @option arguments [Boolean] :ignore_throttled If true, concrete, expanded, or aliased indices are ignored when frozen. Server default: true.
31
44
  # @option arguments [Boolean] :ignore_unavailable If true, unavailable indices (missing or closed) are ignored.
32
45
  # @option arguments [Hash] :headers Custom HTTP headers
@@ -35,6 +48,14 @@ module ElasticsearchServerless
35
48
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html
36
49
  #
37
50
  def put_datafeed(arguments = {})
51
+ request_opts = { endpoint: arguments[:endpoint] || "ml.put_datafeed" }
52
+
53
+ defined_params = [:datafeed_id].inject({}) do |set_variables, variable|
54
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
55
+ set_variables
56
+ end
57
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
58
+
38
59
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
39
60
  raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id]
40
61
 
@@ -50,7 +71,7 @@ module ElasticsearchServerless
50
71
  params = Utils.process_params(arguments)
51
72
 
52
73
  ElasticsearchServerless::API::Response.new(
53
- perform_request(method, path, params, body, headers)
74
+ perform_request(method, path, params, body, headers, request_opts)
54
75
  )
55
76
  end
56
77
  end
@@ -23,6 +23,8 @@ module ElasticsearchServerless
23
23
  module MachineLearning
24
24
  module Actions
25
25
  # Instantiates a filter.
26
+ # A filter contains a list of strings. It can be used by one or more anomaly detection jobs.
27
+ # Specifically, filters are referenced in the +custom_rules+ property of detector configuration objects.
26
28
  #
27
29
  # @option arguments [String] :filter_id A string that uniquely identifies a filter. (*Required*)
28
30
  # @option arguments [Hash] :headers Custom HTTP headers
@@ -31,6 +33,14 @@ module ElasticsearchServerless
31
33
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-filter.html
32
34
  #
33
35
  def put_filter(arguments = {})
36
+ request_opts = { endpoint: arguments[:endpoint] || "ml.put_filter" }
37
+
38
+ defined_params = [:filter_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
+
34
44
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
35
45
  raise ArgumentError, "Required argument 'filter_id' missing" unless arguments[:filter_id]
36
46
 
@@ -46,7 +56,7 @@ module ElasticsearchServerless
46
56
  params = {}
47
57
 
48
58
  ElasticsearchServerless::API::Response.new(
49
- perform_request(method, path, params, body, headers)
59
+ perform_request(method, path, params, body, headers, request_opts)
50
60
  )
51
61
  end
52
62
  end
@@ -22,7 +22,8 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module MachineLearning
24
24
  module Actions
25
- # Instantiates an anomaly detection job.
25
+ # Create an anomaly detection job.
26
+ # If you include a +datafeed_config+, you must have read index privileges on the source index.
26
27
  #
27
28
  # @option arguments [String] :job_id The identifier for the anomaly detection job. 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
29
  # @option arguments [Hash] :headers Custom HTTP headers
@@ -31,6 +32,14 @@ module ElasticsearchServerless
31
32
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html
32
33
  #
33
34
  def put_job(arguments = {})
35
+ request_opts = { endpoint: arguments[:endpoint] || "ml.put_job" }
36
+
37
+ defined_params = [: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 'body' missing" unless arguments[:body]
35
44
  raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
36
45
 
@@ -46,7 +55,7 @@ module ElasticsearchServerless
46
55
  params = {}
47
56
 
48
57
  ElasticsearchServerless::API::Response.new(
49
- perform_request(method, path, params, body, headers)
58
+ perform_request(method, path, params, body, headers, request_opts)
50
59
  )
51
60
  end
52
61
  end
@@ -22,16 +22,28 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module MachineLearning
24
24
  module Actions
25
- # Creates an inference trained model.
25
+ # Enables you to supply a trained model that is not created by data frame analytics.
26
26
  #
27
27
  # @option arguments [String] :model_id The unique identifier of the trained model. (*Required*)
28
- # @option arguments [Boolean] :defer_definition_decompression If set to +true+ and a +compressed_definition+ is provided, the request defers definition decompression and skips relevant validations.
28
+ # @option arguments [Boolean] :defer_definition_decompression If set to +true+ and a +compressed_definition+ is provided,
29
+ # the request defers definition decompression and skips relevant
30
+ # validations.
31
+ # @option arguments [Boolean] :wait_for_completion Whether to wait for all child operations (e.g. model download)
32
+ # to complete.
29
33
  # @option arguments [Hash] :headers Custom HTTP headers
30
34
  # @option arguments [Hash] :body request body
31
35
  #
32
36
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models.html
33
37
  #
34
38
  def put_trained_model(arguments = {})
39
+ request_opts = { endpoint: arguments[:endpoint] || "ml.put_trained_model" }
40
+
41
+ defined_params = [:model_id].inject({}) do |set_variables, variable|
42
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
43
+ set_variables
44
+ end
45
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
46
+
35
47
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
36
48
  raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id]
37
49
 
@@ -47,7 +59,7 @@ module ElasticsearchServerless
47
59
  params = Utils.process_params(arguments)
48
60
 
49
61
  ElasticsearchServerless::API::Response.new(
50
- perform_request(method, path, params, body, headers)
62
+ perform_request(method, path, params, body, headers, request_opts)
51
63
  )
52
64
  end
53
65
  end
@@ -22,16 +22,41 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module MachineLearning
24
24
  module Actions
25
- # Creates a new model alias (or reassigns an existing one) to refer to the trained model
25
+ # Creates or updates a trained model alias. A trained model alias is a logical
26
+ # name used to reference a single trained model.
27
+ # You can use aliases instead of trained model identifiers to make it easier to
28
+ # reference your models. For example, you can use aliases in inference
29
+ # aggregations and processors.
30
+ # An alias must be unique and refer to only a single trained model. However,
31
+ # you can have multiple aliases for each trained model.
32
+ # If you use this API to update an alias such that it references a different
33
+ # trained model ID and the model uses a different type of data frame analytics,
34
+ # an error occurs. For example, this situation occurs if you have a trained
35
+ # model for regression analysis and a trained model for classification
36
+ # analysis; you cannot reassign an alias from one type of trained model to
37
+ # another.
38
+ # If you use this API to update an alias and there are very few input fields in
39
+ # common between the old and new trained models for the model alias, the API
40
+ # returns a warning.
26
41
  #
27
42
  # @option arguments [String] :model_alias The alias to create or update. This value cannot end in numbers. (*Required*)
28
43
  # @option arguments [String] :model_id The identifier for the trained model that the alias refers to. (*Required*)
29
- # @option arguments [Boolean] :reassign Specifies whether the alias gets reassigned to the specified trained model if it is already assigned to a different model. If the alias is already assigned and this parameter is false, the API returns an error.
44
+ # @option arguments [Boolean] :reassign Specifies whether the alias gets reassigned to the specified trained
45
+ # model if it is already assigned to a different model. If the alias is
46
+ # already assigned and this parameter is false, the API returns an error.
30
47
  # @option arguments [Hash] :headers Custom HTTP headers
31
48
  #
32
49
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models-aliases.html
33
50
  #
34
51
  def put_trained_model_alias(arguments = {})
52
+ request_opts = { endpoint: arguments[:endpoint] || "ml.put_trained_model_alias" }
53
+
54
+ defined_params = [:model_id, :model_alias].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
+
35
60
  raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id]
36
61
  raise ArgumentError, "Required argument 'model_alias' missing" unless arguments[:model_alias]
37
62
 
@@ -49,7 +74,7 @@ module ElasticsearchServerless
49
74
  params = Utils.process_params(arguments)
50
75
 
51
76
  ElasticsearchServerless::API::Response.new(
52
- perform_request(method, path, params, body, headers)
77
+ perform_request(method, path, params, body, headers, request_opts)
53
78
  )
54
79
  end
55
80
  end
@@ -22,16 +22,25 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module MachineLearning
24
24
  module Actions
25
- # Creates part of a trained model definition
25
+ # Creates part of a trained model definition.
26
26
  #
27
27
  # @option arguments [String] :model_id The unique identifier of the trained model. (*Required*)
28
- # @option arguments [Integer] :part The definition part number. When the definition is loaded for inference the definition parts are streamed in the order of their part number. The first part must be +0+ and the final part must be +total_parts - 1+. (*Required*)
28
+ # @option arguments [Integer] :part The definition part number. When the definition is loaded for inference the definition parts are streamed in the
29
+ # order of their part number. The first part must be +0+ and the final part must be +total_parts - 1+. (*Required*)
29
30
  # @option arguments [Hash] :headers Custom HTTP headers
30
31
  # @option arguments [Hash] :body request body
31
32
  #
32
33
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-definition-part.html
33
34
  #
34
35
  def put_trained_model_definition_part(arguments = {})
36
+ request_opts = { endpoint: arguments[:endpoint] || "ml.put_trained_model_definition_part" }
37
+
38
+ defined_params = [:model_id, :part].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
+
35
44
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
36
45
  raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id]
37
46
  raise ArgumentError, "Required argument 'part' missing" unless arguments[:part]
@@ -50,7 +59,7 @@ module ElasticsearchServerless
50
59
  params = {}
51
60
 
52
61
  ElasticsearchServerless::API::Response.new(
53
- perform_request(method, path, params, body, headers)
62
+ perform_request(method, path, params, body, headers, request_opts)
54
63
  )
55
64
  end
56
65
  end
@@ -22,7 +22,9 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module MachineLearning
24
24
  module Actions
25
- # Creates a trained model vocabulary
25
+ # Creates a trained model vocabulary.
26
+ # This API is supported only for natural language processing (NLP) models.
27
+ # The vocabulary is stored in the index as described in +inference_config.*.vocabulary+ of the trained model definition.
26
28
  #
27
29
  # @option arguments [String] :model_id The unique identifier of the trained model. (*Required*)
28
30
  # @option arguments [Hash] :headers Custom HTTP headers
@@ -31,6 +33,14 @@ module ElasticsearchServerless
31
33
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-vocabulary.html
32
34
  #
33
35
  def put_trained_model_vocabulary(arguments = {})
36
+ request_opts = { endpoint: arguments[:endpoint] || "ml.put_trained_model_vocabulary" }
37
+
38
+ defined_params = [:model_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
+
34
44
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
35
45
  raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id]
36
46
 
@@ -46,7 +56,7 @@ module ElasticsearchServerless
46
56
  params = {}
47
57
 
48
58
  ElasticsearchServerless::API::Response.new(
49
- perform_request(method, path, params, body, headers)
59
+ perform_request(method, path, params, body, headers, request_opts)
50
60
  )
51
61
  end
52
62
  end
@@ -22,16 +22,31 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module MachineLearning
24
24
  module Actions
25
- # Resets an existing anomaly detection job.
25
+ # Resets an anomaly detection job.
26
+ # All model state and results are deleted. The job is ready to start over as if
27
+ # it had just been created.
28
+ # It is not currently possible to reset multiple jobs using wildcards or a
29
+ # comma separated list.
26
30
  #
27
31
  # @option arguments [String] :job_id The ID of the job to reset. (*Required*)
28
- # @option arguments [Boolean] :wait_for_completion Should this request wait until the operation has completed before returning. Server default: true.
29
- # @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.
32
+ # @option arguments [Boolean] :wait_for_completion Should this request wait until the operation has completed before
33
+ # returning. Server default: true.
34
+ # @option arguments [Boolean] :delete_user_annotations Specifies whether annotations that have been added by the
35
+ # user should be deleted along with any auto-generated annotations when the job is
36
+ # reset.
30
37
  # @option arguments [Hash] :headers Custom HTTP headers
31
38
  #
32
39
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-reset-job.html
33
40
  #
34
41
  def reset_job(arguments = {})
42
+ request_opts = { endpoint: arguments[:endpoint] || "ml.reset_job" }
43
+
44
+ defined_params = [:job_id].inject({}) do |set_variables, variable|
45
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
46
+ set_variables
47
+ end
48
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
49
+
35
50
  raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
36
51
 
37
52
  arguments = arguments.clone
@@ -46,7 +61,7 @@ module ElasticsearchServerless
46
61
  params = Utils.process_params(arguments)
47
62
 
48
63
  ElasticsearchServerless::API::Response.new(
49
- perform_request(method, path, params, body, headers)
64
+ perform_request(method, path, params, body, headers, request_opts)
50
65
  )
51
66
  end
52
67
  end
@@ -23,14 +23,36 @@ module ElasticsearchServerless
23
23
  module MachineLearning
24
24
  module Actions
25
25
  # Starts a data frame analytics job.
26
+ # A data frame analytics job can be started and stopped multiple times
27
+ # throughout its lifecycle.
28
+ # If the destination index does not exist, it is created automatically the
29
+ # first time you start the data frame analytics job. The
30
+ # +index.number_of_shards+ and +index.number_of_replicas+ settings for the
31
+ # destination index are copied from the source index. If there are multiple
32
+ # source indices, the destination index copies the highest setting values. The
33
+ # mappings for the destination index are also copied from the source indices.
34
+ # If there are any mapping conflicts, the job fails to start.
35
+ # If the destination index exists, it is used as is. You can therefore set up
36
+ # the destination index in advance with custom settings and mappings.
26
37
  #
27
- # @option arguments [String] :id Identifier for the data frame analytics job. 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 [Time] :timeout Controls the amount of time to wait until the data frame analytics job starts. Server default: 20s.
38
+ # @option arguments [String] :id Identifier for the data frame analytics job. This identifier can contain
39
+ # lowercase alphanumeric characters (a-z and 0-9), hyphens, and
40
+ # underscores. It must start and end with alphanumeric characters. (*Required*)
41
+ # @option arguments [Time] :timeout Controls the amount of time to wait until the data frame analytics job
42
+ # starts. Server default: 20s.
29
43
  # @option arguments [Hash] :headers Custom HTTP headers
30
44
  #
31
45
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-dfanalytics.html
32
46
  #
33
47
  def start_data_frame_analytics(arguments = {})
48
+ request_opts = { endpoint: arguments[:endpoint] || "ml.start_data_frame_analytics" }
49
+
50
+ defined_params = [:id].inject({}) do |set_variables, variable|
51
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
52
+ set_variables
53
+ end
54
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
55
+
34
56
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
35
57
 
36
58
  arguments = arguments.clone
@@ -45,7 +67,7 @@ module ElasticsearchServerless
45
67
  params = Utils.process_params(arguments)
46
68
 
47
69
  ElasticsearchServerless::API::Response.new(
48
- perform_request(method, path, params, body, headers)
70
+ perform_request(method, path, params, body, headers, request_opts)
49
71
  )
50
72
  end
51
73
  end
@@ -23,10 +23,33 @@ module ElasticsearchServerless
23
23
  module MachineLearning
24
24
  module Actions
25
25
  # Starts one or more datafeeds.
26
+ # A datafeed must be started in order to retrieve data from Elasticsearch. A datafeed can be started and stopped
27
+ # multiple times throughout its lifecycle.
28
+ # Before you can start a datafeed, the anomaly detection job must be open. Otherwise, an error occurs.
29
+ # If you restart a stopped datafeed, it continues processing input data from the next millisecond after it was stopped.
30
+ # If new data was indexed for that exact millisecond between stopping and starting, it will be ignored.
31
+ # When Elasticsearch security features are enabled, your datafeed remembers which roles the last user to create or
32
+ # update it had at the time of creation or update and runs the query using those same roles. If you provided secondary
33
+ # authorization headers when you created or updated the datafeed, those credentials are used instead.
26
34
  #
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 [String, Time] :end The time that the datafeed should end, which can be specified by using one of the following formats: * ISO 8601 format with milliseconds, for example +2017-01-22T06:00:00.000Z+ * ISO 8601 format without milliseconds, for example +2017-01-22T06:00:00+00:00+ * Milliseconds since the epoch, for example +1485061200000+ Date-time arguments using either of the ISO 8601 formats must have a time zone designator, where +Z+ is accepted as an abbreviation for UTC time. When a URL is expected (for example, in browsers), the +++ used in time zone designators must be encoded as +%2B+. The end time value is exclusive. If you do not specify an end time, the datafeed runs continuously.
29
- # @option arguments [String, Time] :start The time that the datafeed should begin, which can be specified by using the same formats as the +end+ parameter. This value is inclusive. If you do not specify a start time and the datafeed is associated with a new anomaly detection job, the analysis starts from the earliest time for which data is available. If you restart a stopped datafeed and specify a start value that is earlier than the timestamp of the latest processed record, the datafeed continues from 1 millisecond after the timestamp of the latest processed record.
35
+ # @option arguments [String] :datafeed_id A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase
36
+ # alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric
37
+ # characters. (*Required*)
38
+ # @option arguments [String, Time] :end The time that the datafeed should end, which can be specified by using one of the following formats:
39
+ # - ISO 8601 format with milliseconds, for example +2017-01-22T06:00:00.000Z+
40
+ # - ISO 8601 format without milliseconds, for example +2017-01-22T06:00:00+00:00+
41
+ # - Milliseconds since the epoch, for example +1485061200000+
42
+ # Date-time arguments using either of the ISO 8601 formats must have a time zone designator, where +Z+ is accepted
43
+ # as an abbreviation for UTC time. When a URL is expected (for example, in browsers), the +++ used in time zone
44
+ # designators must be encoded as +%2B+.
45
+ # The end time value is exclusive. If you do not specify an end time, the datafeed
46
+ # runs continuously.
47
+ # @option arguments [String, Time] :start The time that the datafeed should begin, which can be specified by using the same formats as the +end+ parameter.
48
+ # This value is inclusive.
49
+ # If you do not specify a start time and the datafeed is associated with a new anomaly detection job, the analysis
50
+ # starts from the earliest time for which data is available.
51
+ # If you restart a stopped datafeed and specify a start value that is earlier than the timestamp of the latest
52
+ # processed record, the datafeed continues from 1 millisecond after the timestamp of the latest processed record.
30
53
  # @option arguments [Time] :timeout Specifies the amount of time to wait until a datafeed starts. Server default: 20s.
31
54
  # @option arguments [Hash] :headers Custom HTTP headers
32
55
  # @option arguments [Hash] :body request body
@@ -34,6 +57,14 @@ module ElasticsearchServerless
34
57
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html
35
58
  #
36
59
  def start_datafeed(arguments = {})
60
+ request_opts = { endpoint: arguments[:endpoint] || "ml.start_datafeed" }
61
+
62
+ defined_params = [:datafeed_id].inject({}) do |set_variables, variable|
63
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
64
+ set_variables
65
+ end
66
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
67
+
37
68
  raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id]
38
69
 
39
70
  arguments = arguments.clone
@@ -48,7 +79,7 @@ module ElasticsearchServerless
48
79
  params = Utils.process_params(arguments)
49
80
 
50
81
  ElasticsearchServerless::API::Response.new(
51
- perform_request(method, path, params, body, headers)
82
+ perform_request(method, path, params, body, headers, request_opts)
52
83
  )
53
84
  end
54
85
  end
@@ -22,15 +22,27 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module MachineLearning
24
24
  module Actions
25
- # Start a trained model deployment.
25
+ # Starts a trained model deployment, which allocates the model to every machine learning node.
26
26
  #
27
27
  # @option arguments [String] :model_id The unique identifier of the trained model. Currently, only PyTorch models are supported. (*Required*)
28
- # @option arguments [Integer, String] :cache_size The inference cache size (in memory outside the JVM heap) per node for the model. The default value is the same size as the +model_size_bytes+. To disable the cache, +0b+ can be provided.
28
+ # @option arguments [Integer, String] :cache_size The inference cache size (in memory outside the JVM heap) per node for the model.
29
+ # The default value is the same size as the +model_size_bytes+. To disable the cache,
30
+ # +0b+ can be provided.
29
31
  # @option arguments [String] :deployment_id A unique identifier for the deployment of the model.
30
- # @option arguments [Integer] :number_of_allocations The number of model allocations on each node where the model is deployed. All allocations on a node share the same copy of the model in memory but use a separate set of threads to evaluate the model. Increasing this value generally increases the throughput. If this setting is greater than the number of hardware threads it will automatically be changed to a value less than the number of hardware threads. Server default: 1.
32
+ # @option arguments [Integer] :number_of_allocations The number of model allocations on each node where the model is deployed.
33
+ # All allocations on a node share the same copy of the model in memory but use
34
+ # a separate set of threads to evaluate the model.
35
+ # Increasing this value generally increases the throughput.
36
+ # If this setting is greater than the number of hardware threads
37
+ # it will automatically be changed to a value less than the number of hardware threads. Server default: 1.
31
38
  # @option arguments [String] :priority The deployment priority.
32
- # @option arguments [Integer] :queue_capacity Specifies the number of inference requests that are allowed in the queue. After the number of requests exceeds this value, new requests are rejected with a 429 error. Server default: 1024.
33
- # @option arguments [Integer] :threads_per_allocation Sets the number of threads used by each model allocation during inference. This generally increases the inference speed. The inference process is a compute-bound process; any number greater than the number of available hardware threads on the machine does not increase the inference speed. If this setting is greater than the number of hardware threads it will automatically be changed to a value less than the number of hardware threads. Server default: 1.
39
+ # @option arguments [Integer] :queue_capacity Specifies the number of inference requests that are allowed in the queue. After the number of requests exceeds
40
+ # this value, new requests are rejected with a 429 error. Server default: 1024.
41
+ # @option arguments [Integer] :threads_per_allocation Sets the number of threads used by each model allocation during inference. This generally increases
42
+ # the inference speed. The inference process is a compute-bound process; any number
43
+ # greater than the number of available hardware threads on the machine does not increase the
44
+ # inference speed. If this setting is greater than the number of hardware threads
45
+ # it will automatically be changed to a value less than the number of hardware threads. Server default: 1.
34
46
  # @option arguments [Time] :timeout Specifies the amount of time to wait for the model to deploy. Server default: 20s.
35
47
  # @option arguments [String] :wait_for Specifies the allocation status to wait for before returning. Server default: started.
36
48
  # @option arguments [Hash] :headers Custom HTTP headers
@@ -38,6 +50,14 @@ module ElasticsearchServerless
38
50
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/start-trained-model-deployment.html
39
51
  #
40
52
  def start_trained_model_deployment(arguments = {})
53
+ request_opts = { endpoint: arguments[:endpoint] || "ml.start_trained_model_deployment" }
54
+
55
+ defined_params = [:model_id].inject({}) do |set_variables, variable|
56
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
57
+ set_variables
58
+ end
59
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
60
+
41
61
  raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id]
42
62
 
43
63
  arguments = arguments.clone
@@ -52,7 +72,7 @@ module ElasticsearchServerless
52
72
  params = Utils.process_params(arguments)
53
73
 
54
74
  ElasticsearchServerless::API::Response.new(
55
- perform_request(method, path, params, body, headers)
75
+ perform_request(method, path, params, body, headers, request_opts)
56
76
  )
57
77
  end
58
78
  end
@@ -23,16 +23,37 @@ module ElasticsearchServerless
23
23
  module MachineLearning
24
24
  module Actions
25
25
  # Stops one or more data frame analytics jobs.
26
+ # A data frame analytics job can be started and stopped multiple times
27
+ # throughout its lifecycle.
26
28
  #
27
- # @option arguments [String] :id Identifier for the data frame analytics job. 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] :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 is true, which 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.
29
+ # @option arguments [String] :id Identifier for the data frame analytics job. This identifier can contain
30
+ # lowercase alphanumeric characters (a-z and 0-9), hyphens, and
31
+ # underscores. It must start and end with alphanumeric characters. (*Required*)
32
+ # @option arguments [Boolean] :allow_no_match Specifies what to do when the request:
33
+ # - Contains wildcard expressions and there are no data frame analytics
34
+ # jobs that match.
35
+ # - Contains the _all string or no identifiers and there are no matches.
36
+ # - Contains wildcard expressions and there are only partial matches.
37
+ # The default value is true, which returns an empty data_frame_analytics
38
+ # array when there are no matches and the subset of results when there are
39
+ # partial matches. If this parameter is false, the request returns a 404
40
+ # status code when there are no matches or only partial matches. Server default: true.
29
41
  # @option arguments [Boolean] :force If true, the data frame analytics job is stopped forcefully.
30
- # @option arguments [Time] :timeout Controls the amount of time to wait until the data frame analytics job stops. Defaults to 20 seconds. Server default: 20s.
42
+ # @option arguments [Time] :timeout Controls the amount of time to wait until the data frame analytics job
43
+ # stops. Defaults to 20 seconds. Server default: 20s.
31
44
  # @option arguments [Hash] :headers Custom HTTP headers
32
45
  #
33
46
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-dfanalytics.html
34
47
  #
35
48
  def stop_data_frame_analytics(arguments = {})
49
+ request_opts = { endpoint: arguments[:endpoint] || "ml.stop_data_frame_analytics" }
50
+
51
+ defined_params = [: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
+
36
57
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
37
58
 
38
59
  arguments = arguments.clone
@@ -47,7 +68,7 @@ module ElasticsearchServerless
47
68
  params = Utils.process_params(arguments)
48
69
 
49
70
  ElasticsearchServerless::API::Response.new(
50
- perform_request(method, path, params, body, headers)
71
+ perform_request(method, path, params, body, headers, request_opts)
51
72
  )
52
73
  end
53
74
  end
@@ -23,9 +23,19 @@ module ElasticsearchServerless
23
23
  module MachineLearning
24
24
  module Actions
25
25
  # Stops one or more datafeeds.
26
+ # A datafeed that is stopped ceases to retrieve data from Elasticsearch. A datafeed can be started and stopped
27
+ # multiple times throughout its lifecycle.
26
28
  #
27
- # @option arguments [String] :datafeed_id Identifier for the datafeed. You can stop multiple datafeeds in a single API request by using a comma-separated list of datafeeds or a wildcard expression. You can close all datafeeds by using +_all+ or by specifying +*+ as the identifier. (*Required*)
28
- # @option arguments [Boolean] :allow_no_match Specifies what to do when the request: * Contains wildcard expressions and there are no datafeeds that match. * Contains the +_all+ string or no identifiers and there are no matches. * Contains wildcard expressions and there are only partial matches. If +true+, the API returns an empty datafeeds array when there are no matches and the subset of results when there are partial matches. If +false+, the API returns a 404 status code when there are no matches or only partial matches. Server default: true.
29
+ # @option arguments [String] :datafeed_id Identifier for the datafeed. You can stop multiple datafeeds in a single API request by using a comma-separated
30
+ # list of datafeeds or a wildcard expression. You can close all datafeeds by using +_all+ or by specifying +*+ as
31
+ # the identifier. (*Required*)
32
+ # @option arguments [Boolean] :allow_no_match Specifies what to do when the request:
33
+ # - Contains wildcard expressions and there are no datafeeds that match.
34
+ # - Contains the +_all+ string or no identifiers and there are no matches.
35
+ # - Contains wildcard expressions and there are only partial matches.
36
+ # If +true+, the API returns an empty datafeeds array when there are no matches and the subset of results when
37
+ # there are partial matches. If +false+, the API returns a 404 status code when there are no matches or only
38
+ # partial matches. Server default: true.
29
39
  # @option arguments [Boolean] :force If +true+, the datafeed is stopped forcefully.
30
40
  # @option arguments [Time] :timeout Specifies the amount of time to wait until a datafeed stops. Server default: 20s.
31
41
  # @option arguments [Hash] :headers Custom HTTP headers
@@ -34,6 +44,14 @@ module ElasticsearchServerless
34
44
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html
35
45
  #
36
46
  def stop_datafeed(arguments = {})
47
+ request_opts = { endpoint: arguments[:endpoint] || "ml.stop_datafeed" }
48
+
49
+ defined_params = [:datafeed_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
  raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id]
38
56
 
39
57
  arguments = arguments.clone
@@ -48,7 +66,7 @@ module ElasticsearchServerless
48
66
  params = Utils.process_params(arguments)
49
67
 
50
68
  ElasticsearchServerless::API::Response.new(
51
- perform_request(method, path, params, body, headers)
69
+ perform_request(method, path, params, body, headers, request_opts)
52
70
  )
53
71
  end
54
72
  end