elasticsearch-serverless 0.1.0.20231031.pre → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (192) hide show
  1. checksums.yaml +4 -4
  2. data/lib/elasticsearch-serverless/api/async_search/delete.rb +4 -1
  3. data/lib/elasticsearch-serverless/api/async_search/get.rb +2 -1
  4. data/lib/elasticsearch-serverless/api/async_search/status.rb +3 -1
  5. data/lib/elasticsearch-serverless/api/async_search/submit.rb +5 -1
  6. data/lib/elasticsearch-serverless/api/bulk.rb +2 -1
  7. data/lib/elasticsearch-serverless/api/cat/aliases.rb +3 -1
  8. data/lib/elasticsearch-serverless/api/cat/component_templates.rb +4 -1
  9. data/lib/elasticsearch-serverless/api/cat/count.rb +4 -1
  10. data/lib/elasticsearch-serverless/api/cat/indices.rb +6 -1
  11. data/lib/elasticsearch-serverless/api/cat/ml_data_frame_analytics.rb +5 -1
  12. data/lib/elasticsearch-serverless/api/cat/ml_datafeeds.rb +8 -1
  13. data/lib/elasticsearch-serverless/api/cat/ml_jobs.rb +8 -1
  14. data/lib/elasticsearch-serverless/api/cat/ml_trained_models.rb +5 -1
  15. data/lib/elasticsearch-serverless/api/cat/transforms.rb +5 -1
  16. data/lib/elasticsearch-serverless/api/clear_scroll.rb +1 -1
  17. data/lib/elasticsearch-serverless/api/close_point_in_time.rb +1 -1
  18. data/lib/elasticsearch-serverless/api/cluster/delete_component_template.rb +2 -1
  19. data/lib/elasticsearch-serverless/api/cluster/get_component_template.rb +1 -1
  20. data/lib/elasticsearch-serverless/api/cluster/put_component_template.rb +15 -1
  21. data/lib/elasticsearch-serverless/api/connector/check_in.rb +57 -0
  22. data/lib/elasticsearch-serverless/api/connector/delete.rb +58 -0
  23. data/lib/elasticsearch-serverless/api/connector/get.rb +57 -0
  24. data/lib/elasticsearch-serverless/api/connector/last_sync.rb +59 -0
  25. data/lib/elasticsearch-serverless/api/connector/list.rb +58 -0
  26. data/lib/elasticsearch-serverless/api/connector/post.rb +53 -0
  27. data/lib/elasticsearch-serverless/api/connector/put.rb +60 -0
  28. data/lib/elasticsearch-serverless/api/connector/sync_job_cancel.rb +58 -0
  29. data/lib/elasticsearch-serverless/api/connector/sync_job_delete.rb +58 -0
  30. data/lib/elasticsearch-serverless/api/connector/sync_job_get.rb +58 -0
  31. data/lib/elasticsearch-serverless/api/connector/sync_job_list.rb +57 -0
  32. data/lib/elasticsearch-serverless/api/connector/sync_job_post.rb +55 -0
  33. data/lib/elasticsearch-serverless/api/connector/update_active_filtering.rb +57 -0
  34. data/lib/elasticsearch-serverless/api/connector/update_api_key_id.rb +59 -0
  35. data/lib/elasticsearch-serverless/api/connector/update_configuration.rb +59 -0
  36. data/lib/elasticsearch-serverless/api/connector/update_error.rb +59 -0
  37. data/lib/elasticsearch-serverless/api/connector/update_filtering.rb +59 -0
  38. data/lib/elasticsearch-serverless/api/connector/update_filtering_validation.rb +59 -0
  39. data/lib/elasticsearch-serverless/api/connector/update_index_name.rb +59 -0
  40. data/lib/elasticsearch-serverless/api/connector/update_name.rb +59 -0
  41. data/lib/elasticsearch-serverless/api/connector/update_native.rb +59 -0
  42. data/lib/elasticsearch-serverless/api/connector/update_pipeline.rb +59 -0
  43. data/lib/elasticsearch-serverless/api/connector/update_scheduling.rb +59 -0
  44. data/lib/elasticsearch-serverless/api/connector/update_service_type.rb +59 -0
  45. data/lib/elasticsearch-serverless/api/connector/update_status.rb +59 -0
  46. data/lib/elasticsearch-serverless/api/create.rb +2 -3
  47. data/lib/elasticsearch-serverless/api/delete.rb +1 -1
  48. data/lib/elasticsearch-serverless/api/delete_by_query.rb +1 -1
  49. data/lib/elasticsearch-serverless/api/delete_script.rb +1 -1
  50. data/lib/elasticsearch-serverless/api/enrich/get_policy.rb +1 -1
  51. data/lib/elasticsearch-serverless/api/enrich/put_policy.rb +1 -1
  52. data/lib/elasticsearch-serverless/api/enrich/stats.rb +1 -1
  53. data/lib/elasticsearch-serverless/api/eql/delete.rb +2 -1
  54. data/lib/elasticsearch-serverless/api/eql/get.rb +1 -1
  55. data/lib/elasticsearch-serverless/api/eql/get_status.rb +1 -1
  56. data/lib/elasticsearch-serverless/api/esql/query.rb +57 -0
  57. data/lib/elasticsearch-serverless/api/exists.rb +1 -1
  58. data/lib/elasticsearch-serverless/api/exists_source.rb +1 -1
  59. data/lib/elasticsearch-serverless/api/explain.rb +1 -1
  60. data/lib/elasticsearch-serverless/api/field_caps.rb +4 -1
  61. data/lib/elasticsearch-serverless/api/get.rb +1 -0
  62. data/lib/elasticsearch-serverless/api/get_script.rb +1 -1
  63. data/lib/elasticsearch-serverless/api/graph/explore.rb +1 -1
  64. data/lib/elasticsearch-serverless/api/index.rb +2 -1
  65. data/lib/elasticsearch-serverless/api/indices/analyze.rb +1 -1
  66. data/lib/elasticsearch-serverless/api/indices/create.rb +2 -2
  67. data/lib/elasticsearch-serverless/api/indices/create_data_stream.rb +2 -1
  68. data/lib/elasticsearch-serverless/api/indices/data_streams_stats.rb +1 -1
  69. data/lib/elasticsearch-serverless/api/indices/delete.rb +1 -1
  70. data/lib/elasticsearch-serverless/api/indices/delete_alias.rb +1 -1
  71. data/lib/elasticsearch-serverless/api/indices/delete_data_lifecycle.rb +1 -1
  72. data/lib/elasticsearch-serverless/api/indices/delete_data_stream.rb +1 -1
  73. data/lib/elasticsearch-serverless/api/indices/delete_index_template.rb +4 -1
  74. data/lib/elasticsearch-serverless/api/indices/exists.rb +1 -1
  75. data/lib/elasticsearch-serverless/api/indices/exists_alias.rb +1 -1
  76. data/lib/elasticsearch-serverless/api/indices/get.rb +2 -1
  77. data/lib/elasticsearch-serverless/api/indices/get_alias.rb +1 -1
  78. data/lib/elasticsearch-serverless/api/indices/get_data_lifecycle.rb +1 -1
  79. data/lib/elasticsearch-serverless/api/indices/get_data_stream.rb +1 -1
  80. data/lib/elasticsearch-serverless/api/indices/get_index_template.rb +2 -1
  81. data/lib/elasticsearch-serverless/api/indices/get_mapping.rb +2 -1
  82. data/lib/elasticsearch-serverless/api/indices/get_settings.rb +2 -1
  83. data/lib/elasticsearch-serverless/api/indices/migrate_to_data_stream.rb +10 -1
  84. data/lib/elasticsearch-serverless/api/indices/modify_data_stream.rb +1 -1
  85. data/lib/elasticsearch-serverless/api/indices/put_alias.rb +1 -1
  86. data/lib/elasticsearch-serverless/api/indices/put_data_lifecycle.rb +1 -1
  87. data/lib/elasticsearch-serverless/api/indices/put_index_template.rb +4 -1
  88. data/lib/elasticsearch-serverless/api/indices/put_mapping.rb +3 -1
  89. data/lib/elasticsearch-serverless/api/indices/put_settings.rb +2 -1
  90. data/lib/elasticsearch-serverless/api/indices/put_template.rb +60 -0
  91. data/lib/elasticsearch-serverless/api/indices/refresh.rb +2 -1
  92. data/lib/elasticsearch-serverless/api/indices/resolve_index.rb +2 -1
  93. data/lib/elasticsearch-serverless/api/indices/rollover.rb +1 -2
  94. data/lib/elasticsearch-serverless/api/indices/simulate_index_template.rb +4 -5
  95. data/lib/elasticsearch-serverless/api/indices/simulate_template.rb +3 -2
  96. data/lib/elasticsearch-serverless/api/indices/update_aliases.rb +1 -1
  97. data/lib/elasticsearch-serverless/api/indices/validate_query.rb +1 -1
  98. data/lib/elasticsearch-serverless/api/inference/delete.rb +66 -0
  99. data/lib/elasticsearch-serverless/api/inference/get.rb +64 -0
  100. data/lib/elasticsearch-serverless/api/inference/inference.rb +66 -0
  101. data/lib/elasticsearch-serverless/api/inference/put.rb +66 -0
  102. data/lib/elasticsearch-serverless/api/ingest/delete_pipeline.rb +1 -1
  103. data/lib/elasticsearch-serverless/api/ingest/get_pipeline.rb +2 -1
  104. data/lib/elasticsearch-serverless/api/ingest/processor_grok.rb +3 -1
  105. data/lib/elasticsearch-serverless/api/ingest/put_pipeline.rb +2 -1
  106. data/lib/elasticsearch-serverless/api/ingest/simulate.rb +1 -1
  107. data/lib/elasticsearch-serverless/api/license/get.rb +2 -1
  108. data/lib/elasticsearch-serverless/api/logstash/delete_pipeline.rb +1 -1
  109. data/lib/elasticsearch-serverless/api/logstash/get_pipeline.rb +1 -1
  110. data/lib/elasticsearch-serverless/api/logstash/put_pipeline.rb +1 -1
  111. data/lib/elasticsearch-serverless/api/machine_learning/close_job.rb +5 -1
  112. data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar.rb +1 -1
  113. data/lib/elasticsearch-serverless/api/machine_learning/delete_data_frame_analytics.rb +1 -1
  114. data/lib/elasticsearch-serverless/api/machine_learning/delete_filter.rb +2 -0
  115. data/lib/elasticsearch-serverless/api/machine_learning/delete_job.rb +8 -1
  116. data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model.rb +2 -1
  117. data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model_alias.rb +4 -1
  118. data/lib/elasticsearch-serverless/api/machine_learning/estimate_model_memory.rb +3 -1
  119. data/lib/elasticsearch-serverless/api/machine_learning/evaluate_data_frame.rb +4 -0
  120. data/lib/elasticsearch-serverless/api/machine_learning/flush_job.rb +8 -0
  121. data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics.rb +3 -0
  122. data/lib/elasticsearch-serverless/api/machine_learning/get_datafeed_stats.rb +6 -0
  123. data/lib/elasticsearch-serverless/api/machine_learning/get_datafeeds.rb +5 -0
  124. data/lib/elasticsearch-serverless/api/machine_learning/get_filters.rb +1 -0
  125. data/lib/elasticsearch-serverless/api/machine_learning/get_jobs.rb +4 -0
  126. data/lib/elasticsearch-serverless/api/machine_learning/get_overall_buckets.rb +17 -1
  127. data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models.rb +2 -2
  128. data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models_stats.rb +2 -1
  129. data/lib/elasticsearch-serverless/api/machine_learning/infer_trained_model.rb +63 -0
  130. data/lib/elasticsearch-serverless/api/machine_learning/open_job.rb +7 -0
  131. data/lib/elasticsearch-serverless/api/machine_learning/post_calendar_events.rb +1 -1
  132. data/lib/elasticsearch-serverless/api/machine_learning/preview_data_frame_analytics.rb +1 -1
  133. data/lib/elasticsearch-serverless/api/machine_learning/preview_datafeed.rb +8 -0
  134. data/lib/elasticsearch-serverless/api/machine_learning/put_calendar.rb +1 -1
  135. data/lib/elasticsearch-serverless/api/machine_learning/put_calendar_job.rb +1 -1
  136. data/lib/elasticsearch-serverless/api/machine_learning/put_data_frame_analytics.rb +2 -0
  137. data/lib/elasticsearch-serverless/api/machine_learning/put_datafeed.rb +9 -0
  138. data/lib/elasticsearch-serverless/api/machine_learning/put_filter.rb +2 -0
  139. data/lib/elasticsearch-serverless/api/machine_learning/put_job.rb +1 -1
  140. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model.rb +2 -1
  141. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_alias.rb +16 -1
  142. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_definition_part.rb +1 -1
  143. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_vocabulary.rb +3 -1
  144. data/lib/elasticsearch-serverless/api/machine_learning/reset_job.rb +5 -1
  145. data/lib/elasticsearch-serverless/api/machine_learning/start_data_frame_analytics.rb +11 -0
  146. data/lib/elasticsearch-serverless/api/machine_learning/start_datafeed.rb +12 -0
  147. data/lib/elasticsearch-serverless/api/machine_learning/start_trained_model_deployment.rb +1 -1
  148. data/lib/elasticsearch-serverless/api/machine_learning/stop_data_frame_analytics.rb +2 -0
  149. data/lib/elasticsearch-serverless/api/machine_learning/stop_datafeed.rb +2 -0
  150. data/lib/elasticsearch-serverless/api/machine_learning/stop_trained_model_deployment.rb +1 -1
  151. data/lib/elasticsearch-serverless/api/machine_learning/update_data_frame_analytics.rb +1 -1
  152. data/lib/elasticsearch-serverless/api/machine_learning/update_datafeed.rb +5 -1
  153. data/lib/elasticsearch-serverless/api/machine_learning/update_filter.rb +1 -1
  154. data/lib/elasticsearch-serverless/api/machine_learning/update_trained_model_deployment.rb +55 -0
  155. data/lib/elasticsearch-serverless/api/mget.rb +1 -0
  156. data/lib/elasticsearch-serverless/api/msearch_template.rb +1 -1
  157. data/lib/elasticsearch-serverless/api/open_point_in_time.rb +6 -1
  158. data/lib/elasticsearch-serverless/api/put_script.rb +1 -1
  159. data/lib/elasticsearch-serverless/api/query_rules/delete_rule.rb +57 -0
  160. data/lib/elasticsearch-serverless/api/{query_ruleset/delete.rb → query_rules/delete_ruleset.rb} +2 -6
  161. data/lib/elasticsearch-serverless/api/query_rules/get_rule.rb +57 -0
  162. data/lib/elasticsearch-serverless/api/{query_ruleset/get.rb → query_rules/get_ruleset.rb} +3 -7
  163. data/lib/elasticsearch-serverless/api/{query_ruleset/list.rb → query_rules/list_rulesets.rb} +3 -7
  164. data/lib/elasticsearch-serverless/api/query_rules/put_rule.rb +59 -0
  165. data/lib/elasticsearch-serverless/api/{query_ruleset/put.rb → query_rules/put_ruleset.rb} +2 -6
  166. data/lib/elasticsearch-serverless/api/rank_eval.rb +1 -1
  167. data/lib/elasticsearch-serverless/api/render_search_template.rb +1 -1
  168. data/lib/elasticsearch-serverless/api/scripts_painless_execute.rb +1 -1
  169. data/lib/elasticsearch-serverless/api/search.rb +4 -1
  170. data/lib/elasticsearch-serverless/api/search_application/get.rb +1 -1
  171. data/lib/elasticsearch-serverless/api/search_application/search.rb +3 -2
  172. data/lib/elasticsearch-serverless/api/search_template.rb +1 -1
  173. data/lib/elasticsearch-serverless/api/security/authenticate.rb +3 -1
  174. data/lib/elasticsearch-serverless/api/security/create_api_key.rb +3 -0
  175. data/lib/elasticsearch-serverless/api/security/get_api_key.rb +4 -0
  176. data/lib/elasticsearch-serverless/api/security/invalidate_api_key.rb +6 -0
  177. data/lib/elasticsearch-serverless/api/security/query_api_keys.rb +4 -2
  178. data/lib/elasticsearch-serverless/api/security/update_api_key.rb +66 -0
  179. data/lib/elasticsearch-serverless/api/synonyms/put_synonym.rb +1 -1
  180. data/lib/elasticsearch-serverless/api/tasks/get.rb +57 -0
  181. data/lib/elasticsearch-serverless/api/transform/delete_transform.rb +1 -1
  182. data/lib/elasticsearch-serverless/api/transform/preview_transform.rb +4 -0
  183. data/lib/elasticsearch-serverless/api/transform/put_transform.rb +21 -1
  184. data/lib/elasticsearch-serverless/api/transform/reset_transform.rb +3 -1
  185. data/lib/elasticsearch-serverless/api/transform/schedule_now_transform.rb +5 -0
  186. data/lib/elasticsearch-serverless/api/transform/start_transform.rb +16 -1
  187. data/lib/elasticsearch-serverless/api/transform/update_transform.rb +6 -0
  188. data/lib/elasticsearch-serverless/api/update_by_query.rb +2 -2
  189. data/lib/elasticsearch-serverless/api.rb +6 -4
  190. data/lib/elasticsearch-serverless/version.rb +3 -3
  191. data/lib/elasticsearch-serverless.rb +13 -5
  192. metadata +59 -7
@@ -21,7 +21,7 @@
21
21
  module ElasticsearchServerless
22
22
  module API
23
23
  module Actions
24
- # Returns information about whether a document source exists in an index.
24
+ # Checks if a document's +_source+ is stored.
25
25
  #
26
26
  # @option arguments [String] :id Identifier of the document. (*Required*)
27
27
  # @option arguments [String] :index Comma-separated list of data streams, indices, and aliases. Supports wildcards (+*+). (*Required*)
@@ -21,7 +21,7 @@
21
21
  module ElasticsearchServerless
22
22
  module API
23
23
  module Actions
24
- # Returns information about why a specific matches (or doesn't match) a query.
24
+ # Returns information about why a specific document matches (or doesnt match) a query.
25
25
  #
26
26
  # @option arguments [String] :id Defines the document ID. (*Required*)
27
27
  # @option arguments [String] :index Index names used to limit the request. Only a single index name can be provided to this parameter. (*Required*)
@@ -21,7 +21,9 @@
21
21
  module ElasticsearchServerless
22
22
  module API
23
23
  module Actions
24
- # Returns the information about the capabilities of fields among multiple indices.
24
+ # The field capabilities API returns the information about the capabilities of fields among multiple indices.
25
+ # The field capabilities API returns runtime fields like any other field. For example, a runtime field with a type
26
+ # of keyword is returned as any other field that belongs to the +keyword+ family.
25
27
  #
26
28
  # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (*). To target all data streams and indices, omit this parameter or use * or _all.
27
29
  # @option arguments [Boolean] :allow_no_indices If false, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting +foo*,bar*+ returns an error if an index starts with foo but no index starts with bar. Server default: true.
@@ -31,6 +33,7 @@ module ElasticsearchServerless
31
33
  # @option arguments [Boolean] :include_unmapped If true, unmapped fields are included in the response.
32
34
  # @option arguments [String] :filters An optional set of filters: can include +metadata,-metadata,-nested,-multifield,-parent
33
35
  # @option arguments [Array<String>] :types Only return results for fields that have one of the types in the list
36
+ # @option arguments [Boolean] :include_empty_fields If false, empty fields are not included in the response. Server default: true.
34
37
  # @option arguments [Hash] :headers Custom HTTP headers
35
38
  # @option arguments [Hash] :body request body
36
39
  #
@@ -25,6 +25,7 @@ module ElasticsearchServerless
25
25
  #
26
26
  # @option arguments [String] :id Unique identifier of the document. (*Required*)
27
27
  # @option arguments [String] :index Name of the index that contains the document. (*Required*)
28
+ # @option arguments [Boolean] :force_synthetic_source Should this request force synthetic _source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index.
28
29
  # @option arguments [String] :preference Specifies the node or shard the operation should be performed on. Random by default.
29
30
  # @option arguments [Boolean] :realtime If +true+, the request is real-time as opposed to near-real-time. Server default: true.
30
31
  # @option arguments [Boolean] :refresh If true, Elasticsearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes.
@@ -21,7 +21,7 @@
21
21
  module ElasticsearchServerless
22
22
  module API
23
23
  module Actions
24
- # Returns a script.
24
+ # Retrieves a stored script or search template.
25
25
  #
26
26
  # @option arguments [String] :id Identifier for the stored script or search template. (*Required*)
27
27
  # @option arguments [Time] :master_timeout Specify timeout for connection to master
@@ -22,7 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Graph
24
24
  module Actions
25
- # Explore extracted and summarized information about the documents and terms in an index.
25
+ # Extracts and summarizes information about the documents and terms in an Elasticsearch data stream or index.
26
26
  #
27
27
  # @option arguments [String, Array] :index Name of the index. (*Required*)
28
28
  # @option arguments [String] :routing Custom value used to route operations to a specific shard.
@@ -21,7 +21,8 @@
21
21
  module ElasticsearchServerless
22
22
  module API
23
23
  module Actions
24
- # Creates or updates a document in an index.
24
+ # Adds a JSON document to the specified data stream or index and makes it searchable.
25
+ # If the target is an index and the document already exists, the request updates the document and increments its version.
25
26
  #
26
27
  # @option arguments [String] :id Unique identifier for the document.
27
28
  # @option arguments [String] :index Name of the data stream or index to target. (*Required*)
@@ -22,7 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Performs the analysis process on a text and return the tokens breakdown of the text.
25
+ # Performs analysis on a text string and returns the resulting tokens.
26
26
  #
27
27
  # @option arguments [String] :index Index used to derive the analyzer. If specified, the +analyzer+ or field parameter overrides this value. If no index is specified or the index does not have a default analyzer, the analyze API uses the standard analyzer.
28
28
  # @option arguments [Hash] :headers Custom HTTP headers
@@ -22,12 +22,12 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Creates an index with optional settings and mappings.
25
+ # Creates a new index.
26
26
  #
27
27
  # @option arguments [String] :index Name of the index you wish to create. (*Required*)
28
28
  # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
29
29
  # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
30
- # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation. Set to +all+ or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). Server default: 1.
30
+ # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation. Set to +all+ or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). Server default: 1.
31
31
  # @option arguments [Hash] :headers Custom HTTP headers
32
32
  # @option arguments [Hash] :body request body
33
33
  #
@@ -22,7 +22,8 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Creates a data stream
25
+ # Creates a data stream.
26
+ # You must have a matching index template with data stream enabled.
26
27
  #
27
28
  # @option arguments [String] :name Name of the data stream, which must meet the following criteria: Lowercase only; Cannot include +\+, +/+, +*+, +?+, +"+, +<+, +>+, +|+, +,+, +#+, +:+, or a space character; Cannot start with +-+, +_+, +++, or +.ds-+; Cannot be +.+ or +..+; Cannot be longer than 255 bytes. Multi-byte characters count towards this limit faster. (*Required*)
28
29
  # @option arguments [Hash] :headers Custom HTTP headers
@@ -22,7 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Provides statistics on operations happening in a data stream.
25
+ # Retrieves statistics for one or more data streams.
26
26
  #
27
27
  # @option arguments [String] :name Comma-separated list of data streams used to limit the request. Wildcard expressions (+*+) are supported. To target all data streams in a cluster, omit this parameter or use +*+.
28
28
  # @option arguments [String, Array<String>] :expand_wildcards Type of data stream that wildcard patterns can match. Supports comma-separated values, such as +open,hidden+. Server default: open.
@@ -22,7 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Deletes an index.
25
+ # Deletes one or more indices.
26
26
  #
27
27
  # @option arguments [String, Array] :index Comma-separated list of indices to delete. You cannot specify index aliases. By default, this parameter does not support wildcards (+*+) or +_all+. To use wildcards or +_all+, set the +action.destructive_requires_name+ cluster setting to +false+. (*Required*)
28
28
  # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. This behavior applies even if the request targets other open indices. Server default: true.
@@ -22,7 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Deletes an alias.
25
+ # Removes a data stream or index from an alias.
26
26
  #
27
27
  # @option arguments [String, Array] :index Comma-separated list of data streams or indices used to limit the request. Supports wildcards (+*+). (*Required*)
28
28
  # @option arguments [String, Array<String>] :name Comma-separated list of aliases to remove. Supports wildcards (+*+). To remove all aliases, use +*+ or +_all+. (*Required*)
@@ -22,7 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Deletes the data stream lifecycle of the selected data streams.
25
+ # Removes the data lifecycle from a data stream rendering it not managed by the data stream lifecycle
26
26
  #
27
27
  # @option arguments [String, Array<String>] :name A comma-separated list of data streams of which the data stream lifecycle will be deleted; use +*+ to get all data streams (*Required*)
28
28
  # @option arguments [String, Array<String>] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open)
@@ -22,7 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Deletes a data stream.
25
+ # Deletes one or more data streams and their backing indices.
26
26
  #
27
27
  # @option arguments [String, Array<String>] :name Comma-separated list of data streams to delete. Wildcard (+*+) expressions are supported. (*Required*)
28
28
  # @option arguments [String, Array<String>] :expand_wildcards Type of data stream that wildcard patterns can match. Supports comma-separated values,such as +open,hidden+. Server default: open.
@@ -22,7 +22,10 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Deletes an index template.
25
+ # Delete an index template.
26
+ # The provided <index-template> may contain multiple template names separated by a comma. If multiple template
27
+ # names are specified then there is no wildcard support and the provided names should match completely with
28
+ # existing templates.
26
29
  #
27
30
  # @option arguments [String, Array<String>] :name Comma-separated list of index template names used to limit the request. Wildcard (*) expressions are supported. (*Required*)
28
31
  # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
@@ -22,7 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Returns information about whether a particular index exists.
25
+ # Checks if a data stream, index, or alias exists.
26
26
  #
27
27
  # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases. Supports wildcards (+*+). (*Required*)
28
28
  # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. This behavior applies even if the request targets other open indices. Server default: true.
@@ -22,7 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Returns information about whether a particular alias exists.
25
+ # Checks if an alias exists.
26
26
  #
27
27
  # @option arguments [String, Array<String>] :name Comma-separated list of aliases to check. Supports wildcards (+*+). (*Required*)
28
28
  # @option arguments [String, Array] :index Comma-separated list of data streams or indices used to limit the request. Supports wildcards (+*+). To target all data streams and indices, omit this parameter or use +*+ or +_all+.
@@ -22,7 +22,8 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Returns information about one or more indices.
25
+ # Returns information about one or more indices. For data streams, the API returns information about the
26
+ # stream’s backing indices.
26
27
  #
27
28
  # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and index aliases used to limit the request. Wildcard expressions (*) are supported. (*Required*)
28
29
  # @option arguments [Boolean] :allow_no_indices If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. Server default: true.
@@ -22,7 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Returns an alias.
25
+ # Retrieves information for one or more aliases.
26
26
  #
27
27
  # @option arguments [String, Array<String>] :name Comma-separated list of aliases to retrieve. Supports wildcards (+*+). To retrieve all aliases, omit this parameter or use +*+ or +_all+.
28
28
  # @option arguments [String, Array] :index Comma-separated list of data streams or indices used to limit the request. Supports wildcards (+*+). To target all data streams and indices, omit this parameter or use +*+ or +_all+.
@@ -22,7 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Returns the data stream lifecycle of the selected data streams.
25
+ # Retrieves the data stream lifecycle configuration of one or more data streams.
26
26
  #
27
27
  # @option arguments [String, Array<String>] :name Comma-separated list of data streams to limit the request. Supports wildcards (+*+). To target all data streams, omit this parameter or use +*+ or +_all+. (*Required*)
28
28
  # @option arguments [String, Array<String>] :expand_wildcards Type of data stream that wildcard patterns can match. Supports comma-separated values, such as +open,hidden+. Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open.
@@ -22,7 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Returns data streams.
25
+ # Retrieves information about one or more data streams.
26
26
  #
27
27
  # @option arguments [String, Array<String>] :name Comma-separated list of data stream names used to limit the request. Wildcard (+*+) expressions are supported. If omitted, all data streams are returned.
28
28
  # @option arguments [String, Array<String>] :expand_wildcards Type of data stream that wildcard patterns can match. Supports comma-separated values, such as +open,hidden+. Server default: open.
@@ -22,7 +22,8 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Returns an index template.
25
+ # Get index templates.
26
+ # Returns information about one or more index templates.
26
27
  #
27
28
  # @option arguments [String] :name Comma-separated list of index template names used to limit the request. Wildcard (*) expressions are supported.
28
29
  # @option arguments [Boolean] :local If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node.
@@ -22,7 +22,8 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Returns mappings for one or more indices.
25
+ # Retrieves mapping definitions for one or more indices.
26
+ # For data streams, the API retrieves mappings for the stream’s backing indices.
26
27
  #
27
28
  # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (+*+). To target all data streams and indices, omit this parameter or use +*+ or +_all+.
28
29
  # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. This behavior applies even if the request targets other open indices. Server default: true.
@@ -22,7 +22,8 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Returns settings for one or more indices.
25
+ # Returns setting information for one or more indices. For data streams,
26
+ # returns setting information for the stream’s backing indices.
26
27
  #
27
28
  # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (+*+). To target all data streams and indices, omit this parameter or use +*+ or +_all+.
28
29
  # @option arguments [String, Array<String>] :name Comma-separated list or wildcard expression of settings to retrieve.
@@ -22,7 +22,16 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Migrates an alias to a data stream
25
+ # Converts an index alias to a data stream.
26
+ # You must have a matching index template that is data stream enabled.
27
+ # The alias must meet the following criteria:
28
+ # The alias must have a write index;
29
+ # All indices for the alias must have a +@timestamp+ field mapping of a +date+ or +date_nanos+ field type;
30
+ # The alias must not have any filters;
31
+ # The alias must not use custom routing.
32
+ # If successful, the request removes the alias and creates a data stream with the same name.
33
+ # The indices for the alias become hidden backing indices for the stream.
34
+ # The write index for the alias becomes the write index for the stream.
26
35
  #
27
36
  # @option arguments [String] :name Name of the index alias to convert to a data stream. (*Required*)
28
37
  # @option arguments [Hash] :headers Custom HTTP headers
@@ -22,7 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Modifies a data stream
25
+ # Performs one or more data stream modification actions in a single atomic operation.
26
26
  #
27
27
  # @option arguments [Hash] :headers Custom HTTP headers
28
28
  # @option arguments [Hash] :body request body
@@ -22,7 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Creates or updates an alias.
25
+ # Adds a data stream or index to an alias.
26
26
  #
27
27
  # @option arguments [String, Array] :index Comma-separated list of data streams or indices to add. Supports wildcards (+*+). Wildcard patterns that match both data streams and indices return an error. (*Required*)
28
28
  # @option arguments [String] :name Alias to update. If the alias doesn’t exist, the request creates it. Index alias names support date math. (*Required*)
@@ -22,7 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Updates the data stream lifecycle of the selected data streams.
25
+ # Update the data lifecycle of the specified data streams.
26
26
  #
27
27
  # @option arguments [String, Array<String>] :name Comma-separated list of data streams used to limit the request. Supports wildcards (+*+). To target all data streams use +*+ or +_all+. (*Required*)
28
28
  # @option arguments [String, Array<String>] :expand_wildcards Type of data stream that wildcard patterns can match. Supports comma-separated values, such as +open,hidden+. Valid values are: +all+, +hidden+, +open+, +closed+, +none+. Server default: open.
@@ -22,10 +22,13 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Creates or updates an index template.
25
+ # Create or update an index template.
26
+ # Index templates define settings, mappings, and aliases that can be applied automatically to new indices.
26
27
  #
27
28
  # @option arguments [String] :name Index or template name (*Required*)
28
29
  # @option arguments [Boolean] :create If +true+, this request cannot replace or update existing index templates.
30
+ # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
31
+ # @option arguments [String] :cause User defined reason for creating/updating the index template
29
32
  # @option arguments [Hash] :headers Custom HTTP headers
30
33
  # @option arguments [Hash] :body request body
31
34
  #
@@ -22,7 +22,9 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Updates the index mappings.
25
+ # Adds new fields to an existing data stream or index.
26
+ # You can also use this API to change the search settings of existing fields.
27
+ # For data streams, these changes are applied to all backing indices by default.
26
28
  #
27
29
  # @option arguments [String, Array] :index A comma-separated list of index names the mapping should be added to (supports wildcards); use +_all+ or omit to add the mapping on all indices. (*Required*)
28
30
  # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. This behavior applies even if the request targets other open indices. Server default: true.
@@ -22,7 +22,8 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Updates the index settings.
25
+ # Changes a dynamic index setting in real time. For data streams, index setting
26
+ # changes are applied to all backing indices by default.
26
27
  #
27
28
  # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (+*+). To target all data streams and indices, omit this parameter or use +*+ or +_all+.
28
29
  # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting +foo*,bar*+ returns an error if an index starts with +foo+ but no index starts with +bar+.
@@ -0,0 +1,60 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+ #
18
+ # Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
19
+ # @see https://github.com/elastic/elasticsearch-specification
20
+ #
21
+ module ElasticsearchServerless
22
+ module API
23
+ module Indices
24
+ module Actions
25
+ # Create or update an index template.
26
+ # Index templates define settings, mappings, and aliases that can be applied automatically to new indices.
27
+ #
28
+ # @option arguments [String] :name The name of the template (*Required*)
29
+ # @option arguments [Boolean] :create If true, this request cannot replace or update existing index templates.
30
+ # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
31
+ # @option arguments [Integer] :order Order in which Elasticsearch applies this template if index matches multiple templates. Templates with lower 'order' values are merged first. Templates with higher 'order' values are merged later, overriding templates with lower values.
32
+ # @option arguments [String] :cause [TODO]
33
+ # @option arguments [Hash] :headers Custom HTTP headers
34
+ # @option arguments [Hash] :body request body
35
+ #
36
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates-v1.html
37
+ #
38
+ def put_template(arguments = {})
39
+ raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
40
+ raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
41
+
42
+ arguments = arguments.clone
43
+ headers = arguments.delete(:headers) || {}
44
+
45
+ body = arguments.delete(:body)
46
+
47
+ _name = arguments.delete(:name)
48
+
49
+ method = ElasticsearchServerless::API::HTTP_PUT
50
+ path = "_template/#{Utils.listify(_name)}"
51
+ params = Utils.process_params(arguments)
52
+
53
+ ElasticsearchServerless::API::Response.new(
54
+ perform_request(method, path, params, body, headers)
55
+ )
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
@@ -22,7 +22,8 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Performs the refresh operation in one or more indices.
25
+ # A refresh makes recent operations performed on one or more indices available for search.
26
+ # For data streams, the API runs the refresh operation on the stream’s backing indices.
26
27
  #
27
28
  # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (+*+). To target all data streams and indices, omit this parameter or use +*+ or +_all+.
28
29
  # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. This behavior applies even if the request targets other open indices. Server default: true.
@@ -22,7 +22,8 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Returns information about any matching indices, aliases, and data streams
25
+ # Resolves the specified name(s) and/or index patterns for indices, aliases, and data streams.
26
+ # Multiple patterns and remote clusters are supported.
26
27
  #
27
28
  # @option arguments [String, Array<String>] :name Comma-separated name(s) or index pattern(s) of the indices, aliases, and data streams to resolve. Resources on remote clusters can be specified using the +<cluster>+:+<name>+ syntax. (*Required*)
28
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, such as +open,hidden+. Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open.
@@ -22,8 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Updates an alias to point to a new index when the existing index
26
- # is considered to be too large or too old.
25
+ # Creates a new index for a data stream or index alias.
27
26
  #
28
27
  # @option arguments [String] :alias Name of the data stream or index alias to roll over. (*Required*)
29
28
  # @option arguments [String] :new_index Name of the index to create. Supports date math. Data streams do not support this parameter.
@@ -22,14 +22,13 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Simulate matching the given index name against the index templates in the system
25
+ # Simulate an index.
26
+ # Returns the index configuration that would be applied to the specified index from an existing index template.
26
27
  #
27
- # @option arguments [String] :name Index or template name to simulate (*Required*)
28
- # @option arguments [Boolean] :create If +true+, the template passed in the body is only used if no existing templates match the same index patterns. If +false+, the simulation uses the template with the highest priority. Note that the template is not permanently added or updated in either case; it is only used for the simulation.
28
+ # @option arguments [String] :name Name of the index to simulate (*Required*)
29
29
  # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
30
30
  # @option arguments [Boolean] :include_defaults If true, returns all relevant default configurations for the index template.
31
31
  # @option arguments [Hash] :headers Custom HTTP headers
32
- # @option arguments [Hash] :body request body
33
32
  #
34
33
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-index.html
35
34
  #
@@ -39,7 +38,7 @@ module ElasticsearchServerless
39
38
  arguments = arguments.clone
40
39
  headers = arguments.delete(:headers) || {}
41
40
 
42
- body = arguments.delete(:body)
41
+ body = nil
43
42
 
44
43
  _name = arguments.delete(:name)
45
44
 
@@ -22,14 +22,15 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Simulate resolving the given template name or body
25
+ # Simulate an index template.
26
+ # Returns the index configuration that would be applied by a particular index template.
26
27
  #
27
28
  # @option arguments [String] :name Name of the index template to simulate. To test a template configuration before you add it to the cluster, omit this parameter and specify the template configuration in the request body.
28
29
  # @option arguments [Boolean] :create If true, the template passed in the body is only used if no existing templates match the same index patterns. If false, the simulation uses the template with the highest priority. Note that the template is not permanently added or updated in either case; it is only used for the simulation.
29
30
  # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
30
31
  # @option arguments [Boolean] :include_defaults If true, returns all relevant default configurations for the index template.
31
32
  # @option arguments [Hash] :headers Custom HTTP headers
32
- # @option arguments [Hash] :body template
33
+ # @option arguments [Hash] :body request body
33
34
  #
34
35
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-template.html
35
36
  #
@@ -22,7 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Updates index aliases.
25
+ # Adds a data stream or index to an alias.
26
26
  #
27
27
  # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
28
28
  # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
@@ -22,7 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Allows a user to validate a potentially expensive query without executing it.
25
+ # Validates a potentially expensive query without executing it.
26
26
  #
27
27
  # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (+*+). To search all data streams or indices, omit this parameter or use +*+ or +_all+.
28
28
  # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. This behavior applies even if the request targets other open indices. Server default: true.
@@ -0,0 +1,66 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+ #
18
+ # Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
19
+ # @see https://github.com/elastic/elasticsearch-specification
20
+ #
21
+ module ElasticsearchServerless
22
+ module API
23
+ module Inference
24
+ module Actions
25
+ # Delete an inference endpoint
26
+ # This functionality is Experimental and may be changed or removed
27
+ # completely in a future release. Elastic will take a best effort approach
28
+ # to fix any issues, but experimental features are not subject to the
29
+ # support SLA of official GA features.
30
+ #
31
+ # @option arguments [String] :task_type The task type
32
+ # @option arguments [String] :inference_id The inference Id (*Required*)
33
+ # @option arguments [Boolean] :dry_run When true, the endpoint is not deleted, and a list of ingest processors which reference this endpoint is returned
34
+ # @option arguments [Boolean] :force When true, the inference endpoint is forcefully deleted even if it is still being used by ingest processors or semantic text fields
35
+ # @option arguments [Hash] :headers Custom HTTP headers
36
+ #
37
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-inference-api.html
38
+ #
39
+ def delete(arguments = {})
40
+ raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id]
41
+
42
+ arguments = arguments.clone
43
+ headers = arguments.delete(:headers) || {}
44
+
45
+ body = nil
46
+
47
+ _task_type = arguments.delete(:task_type)
48
+
49
+ _inference_id = arguments.delete(:inference_id)
50
+
51
+ method = ElasticsearchServerless::API::HTTP_DELETE
52
+ path = if _task_type && _inference_id
53
+ "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_inference_id)}"
54
+ else
55
+ "_inference/#{Utils.listify(_inference_id)}"
56
+ end
57
+ params = Utils.process_params(arguments)
58
+
59
+ ElasticsearchServerless::API::Response.new(
60
+ perform_request(method, path, params, body, headers)
61
+ )
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end