elasticsearch-api 9.2.1 → 9.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/elasticsearch-api.gemspec +1 -0
  3. data/lib/elasticsearch/api/actions/async_search/submit.rb +1 -9
  4. data/lib/elasticsearch/api/actions/bulk.rb +1 -1
  5. data/lib/elasticsearch/api/actions/cat/circuit_breaker.rb +96 -0
  6. data/lib/elasticsearch/api/actions/cat/count.rb +8 -10
  7. data/lib/elasticsearch/api/actions/cat/indices.rb +0 -2
  8. data/lib/elasticsearch/api/actions/cluster/reroute.rb +1 -1
  9. data/lib/elasticsearch/api/actions/connector/sync_job_claim.rb +1 -0
  10. data/lib/elasticsearch/api/actions/connector/sync_job_error.rb +1 -0
  11. data/lib/elasticsearch/api/actions/connector/sync_job_update_stats.rb +1 -0
  12. data/lib/elasticsearch/api/actions/count.rb +1 -9
  13. data/lib/elasticsearch/api/actions/create.rb +1 -1
  14. data/lib/elasticsearch/api/actions/delete.rb +1 -1
  15. data/lib/elasticsearch/api/actions/delete_by_query.rb +1 -1
  16. data/lib/elasticsearch/api/actions/eql/search.rb +0 -8
  17. data/lib/elasticsearch/api/actions/esql/delete_view.rb +75 -0
  18. data/lib/elasticsearch/api/actions/esql/get_view.rb +77 -0
  19. data/lib/elasticsearch/api/actions/esql/put_view.rb +76 -0
  20. data/lib/elasticsearch/api/actions/exists.rb +1 -1
  21. data/lib/elasticsearch/api/actions/exists_source.rb +1 -1
  22. data/lib/elasticsearch/api/actions/explain.rb +1 -1
  23. data/lib/elasticsearch/api/actions/field_caps.rb +1 -9
  24. data/lib/elasticsearch/api/actions/fleet/search.rb +1 -1
  25. data/lib/elasticsearch/api/actions/get.rb +1 -1
  26. data/lib/elasticsearch/api/actions/get_source.rb +1 -1
  27. data/lib/elasticsearch/api/actions/graph/explore.rb +1 -1
  28. data/lib/elasticsearch/api/actions/index.rb +1 -1
  29. data/lib/elasticsearch/api/actions/indices/add_block.rb +1 -1
  30. data/lib/elasticsearch/api/actions/indices/data_streams_stats.rb +1 -1
  31. data/lib/elasticsearch/api/actions/indices/delete_sample_configuration.rb +80 -0
  32. data/lib/elasticsearch/api/actions/indices/downsample.rb +5 -2
  33. data/lib/elasticsearch/api/actions/indices/get_all_sample_configuration.rb +68 -0
  34. data/lib/elasticsearch/api/actions/indices/get_sample.rb +74 -0
  35. data/lib/elasticsearch/api/actions/indices/get_sample_configuration.rb +78 -0
  36. data/lib/elasticsearch/api/actions/indices/get_sample_stats.rb +74 -0
  37. data/lib/elasticsearch/api/actions/indices/put_sample_configuration.rb +82 -0
  38. data/lib/elasticsearch/api/actions/indices/remove_block.rb +1 -1
  39. data/lib/elasticsearch/api/actions/indices/resolve_index.rb +8 -10
  40. data/lib/elasticsearch/api/actions/indices/shrink.rb +0 -1
  41. data/lib/elasticsearch/api/actions/inference/get.rb +2 -5
  42. data/lib/elasticsearch/api/actions/inference/put.rb +6 -3
  43. data/lib/elasticsearch/api/actions/inference/put_alibabacloud.rb +1 -0
  44. data/lib/elasticsearch/api/actions/inference/put_amazonbedrock.rb +1 -0
  45. data/lib/elasticsearch/api/actions/inference/put_amazonsagemaker.rb +1 -0
  46. data/lib/elasticsearch/api/actions/inference/put_anthropic.rb +1 -0
  47. data/lib/elasticsearch/api/actions/inference/put_azureaistudio.rb +1 -0
  48. data/lib/elasticsearch/api/actions/inference/put_azureopenai.rb +1 -0
  49. data/lib/elasticsearch/api/actions/inference/put_cohere.rb +1 -0
  50. data/lib/elasticsearch/api/actions/inference/put_contextualai.rb +1 -0
  51. data/lib/elasticsearch/api/actions/inference/put_custom.rb +1 -0
  52. data/lib/elasticsearch/api/actions/inference/put_deepseek.rb +1 -0
  53. data/lib/elasticsearch/api/actions/inference/put_elasticsearch.rb +1 -0
  54. data/lib/elasticsearch/api/actions/inference/put_googleaistudio.rb +1 -0
  55. data/lib/elasticsearch/api/actions/inference/put_googlevertexai.rb +1 -0
  56. data/lib/elasticsearch/api/actions/inference/put_groq.rb +79 -0
  57. data/lib/elasticsearch/api/actions/inference/put_hugging_face.rb +1 -0
  58. data/lib/elasticsearch/api/actions/inference/put_jinaai.rb +1 -0
  59. data/lib/elasticsearch/api/actions/inference/put_mistral.rb +1 -0
  60. data/lib/elasticsearch/api/actions/inference/put_nvidia.rb +84 -0
  61. data/lib/elasticsearch/api/actions/inference/put_openai.rb +1 -0
  62. data/lib/elasticsearch/api/actions/inference/put_openshift_ai.rb +84 -0
  63. data/lib/elasticsearch/api/actions/inference/put_voyageai.rb +1 -0
  64. data/lib/elasticsearch/api/actions/inference/put_watsonx.rb +1 -0
  65. data/lib/elasticsearch/api/actions/inference/stream_completion.rb +1 -1
  66. data/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb +1 -0
  67. data/lib/elasticsearch/api/actions/mget.rb +1 -1
  68. data/lib/elasticsearch/api/actions/migration/deprecations.rb +3 -6
  69. data/lib/elasticsearch/api/actions/msearch.rb +1 -1
  70. data/lib/elasticsearch/api/actions/mtermvectors.rb +1 -1
  71. data/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb +1 -0
  72. data/lib/elasticsearch/api/actions/nodes/usage.rb +1 -1
  73. data/lib/elasticsearch/api/actions/open_point_in_time.rb +1 -9
  74. data/lib/elasticsearch/api/actions/project/tags.rb +1 -2
  75. data/lib/elasticsearch/api/actions/reindex.rb +2 -1
  76. data/lib/elasticsearch/api/actions/search.rb +1 -9
  77. data/lib/elasticsearch/api/actions/search_shards.rb +1 -1
  78. data/lib/elasticsearch/api/actions/search_template.rb +2 -2
  79. data/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb +1 -0
  80. data/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb +1 -1
  81. data/lib/elasticsearch/api/actions/snapshot/delete.rb +1 -1
  82. data/lib/elasticsearch/api/actions/snapshot/get.rb +1 -1
  83. data/lib/elasticsearch/api/actions/sql/query.rb +0 -8
  84. data/lib/elasticsearch/api/actions/streams/logs_disable.rb +0 -3
  85. data/lib/elasticsearch/api/actions/streams/logs_enable.rb +0 -3
  86. data/lib/elasticsearch/api/actions/streams/status.rb +0 -3
  87. data/lib/elasticsearch/api/actions/synonyms/put_synonym.rb +1 -0
  88. data/lib/elasticsearch/api/actions/terms_enum.rb +1 -1
  89. data/lib/elasticsearch/api/actions/termvectors.rb +1 -1
  90. data/lib/elasticsearch/api/actions/text_structure/find_field_structure.rb +1 -1
  91. data/lib/elasticsearch/api/actions/text_structure/find_message_structure.rb +1 -1
  92. data/lib/elasticsearch/api/actions/text_structure/find_structure.rb +1 -1
  93. data/lib/elasticsearch/api/actions/update.rb +1 -1
  94. data/lib/elasticsearch/api/actions/update_by_query.rb +2 -2
  95. data/lib/elasticsearch/api/utils.rb +0 -4
  96. data/lib/elasticsearch/api/version.rb +2 -2
  97. metadata +28 -1
@@ -54,6 +54,7 @@ module Elasticsearch
54
54
 
55
55
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
56
56
  raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
57
+
57
58
  unless arguments[:amazonbedrock_inference_id]
58
59
  raise ArgumentError,
59
60
  "Required argument 'amazonbedrock_inference_id' missing"
@@ -54,6 +54,7 @@ module Elasticsearch
54
54
 
55
55
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
56
56
  raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
57
+
57
58
  unless arguments[:amazonsagemaker_inference_id]
58
59
  raise ArgumentError,
59
60
  "Required argument 'amazonsagemaker_inference_id' missing"
@@ -55,6 +55,7 @@ module Elasticsearch
55
55
 
56
56
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
57
57
  raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
58
+
58
59
  unless arguments[:anthropic_inference_id]
59
60
  raise ArgumentError,
60
61
  "Required argument 'anthropic_inference_id' missing"
@@ -54,6 +54,7 @@ module Elasticsearch
54
54
 
55
55
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
56
56
  raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
57
+
57
58
  unless arguments[:azureaistudio_inference_id]
58
59
  raise ArgumentError,
59
60
  "Required argument 'azureaistudio_inference_id' missing"
@@ -59,6 +59,7 @@ module Elasticsearch
59
59
 
60
60
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
61
61
  raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
62
+
62
63
  unless arguments[:azureopenai_inference_id]
63
64
  raise ArgumentError,
64
65
  "Required argument 'azureopenai_inference_id' missing"
@@ -54,6 +54,7 @@ module Elasticsearch
54
54
 
55
55
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
56
56
  raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
57
+
57
58
  unless arguments[:cohere_inference_id]
58
59
  raise ArgumentError,
59
60
  "Required argument 'cohere_inference_id' missing"
@@ -55,6 +55,7 @@ module Elasticsearch
55
55
 
56
56
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
57
57
  raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
58
+
58
59
  unless arguments[:contextualai_inference_id]
59
60
  raise ArgumentError,
60
61
  "Required argument 'contextualai_inference_id' missing"
@@ -84,6 +84,7 @@ module Elasticsearch
84
84
 
85
85
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
86
86
  raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
87
+
87
88
  unless arguments[:custom_inference_id]
88
89
  raise ArgumentError,
89
90
  "Required argument 'custom_inference_id' missing"
@@ -54,6 +54,7 @@ module Elasticsearch
54
54
 
55
55
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
56
56
  raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
57
+
57
58
  unless arguments[:deepseek_inference_id]
58
59
  raise ArgumentError,
59
60
  "Required argument 'deepseek_inference_id' missing"
@@ -55,6 +55,7 @@ module Elasticsearch
55
55
 
56
56
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
57
57
  raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
58
+
58
59
  unless arguments[:elasticsearch_inference_id]
59
60
  raise ArgumentError,
60
61
  "Required argument 'elasticsearch_inference_id' missing"
@@ -54,6 +54,7 @@ module Elasticsearch
54
54
 
55
55
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
56
56
  raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
57
+
57
58
  unless arguments[:googleaistudio_inference_id]
58
59
  raise ArgumentError,
59
60
  "Required argument 'googleaistudio_inference_id' missing"
@@ -54,6 +54,7 @@ module Elasticsearch
54
54
 
55
55
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
56
56
  raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
57
+
57
58
  unless arguments[:googlevertexai_inference_id]
58
59
  raise ArgumentError,
59
60
  "Required argument 'googlevertexai_inference_id' missing"
@@ -0,0 +1,79 @@
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
+ # This code was automatically generated from the Elasticsearch Specification
19
+ # See https://github.com/elastic/elasticsearch-specification
20
+ # See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
21
+ module Elasticsearch
22
+ module API
23
+ module Inference
24
+ module Actions
25
+ # Create a Groq inference endpoint.
26
+ # Create an inference endpoint to perform an inference task with the `groq` service.
27
+ #
28
+ # @option arguments [String] :task_type The type of the inference task that the model will perform. (*Required*)
29
+ # @option arguments [String] :groq_inference_id The unique identifier of the inference endpoint. (*Required*)
30
+ # @option arguments [Time] :timeout Specifies the amount of time to wait for the inference endpoint to be created. Server default: 30s.
31
+ # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
32
+ # when they occur.
33
+ # @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
34
+ # returned by Elasticsearch.
35
+ # @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
36
+ # For example `"exists_time": "1h"` for humans and
37
+ # `"exists_time_in_millis": 3600000` for computers. When disabled the human
38
+ # readable values will be omitted. This makes sense for responses being consumed
39
+ # only by machines.
40
+ # @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
41
+ # this option for debugging only.
42
+ # @option arguments [Hash] :headers Custom HTTP headers
43
+ # @option arguments [Hash] :body request body
44
+ #
45
+ # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-groq
46
+ #
47
+ def put_groq(arguments = {})
48
+ request_opts = { endpoint: arguments[:endpoint] || 'inference.put_groq' }
49
+
50
+ defined_params = [:task_type, :groq_inference_id].each_with_object({}) do |variable, set_variables|
51
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
52
+ end
53
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
54
+
55
+ raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
56
+ raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
57
+ raise ArgumentError, "Required argument 'groq_inference_id' missing" unless arguments[:groq_inference_id]
58
+
59
+ arguments = arguments.clone
60
+ headers = arguments.delete(:headers) || {}
61
+
62
+ body = arguments.delete(:body)
63
+
64
+ _task_type = arguments.delete(:task_type)
65
+
66
+ _groq_inference_id = arguments.delete(:groq_inference_id)
67
+
68
+ method = Elasticsearch::API::HTTP_PUT
69
+ path = "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_groq_inference_id)}"
70
+ params = Utils.process_params(arguments)
71
+
72
+ Elasticsearch::API::Response.new(
73
+ perform_request(method, path, params, body, headers, request_opts)
74
+ )
75
+ end
76
+ end
77
+ end
78
+ end
79
+ end
@@ -82,6 +82,7 @@ module Elasticsearch
82
82
 
83
83
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
84
84
  raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
85
+
85
86
  unless arguments[:huggingface_inference_id]
86
87
  raise ArgumentError,
87
88
  "Required argument 'huggingface_inference_id' missing"
@@ -56,6 +56,7 @@ module Elasticsearch
56
56
 
57
57
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
58
58
  raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
59
+
59
60
  unless arguments[:jinaai_inference_id]
60
61
  raise ArgumentError,
61
62
  "Required argument 'jinaai_inference_id' missing"
@@ -54,6 +54,7 @@ module Elasticsearch
54
54
 
55
55
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
56
56
  raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
57
+
57
58
  unless arguments[:mistral_inference_id]
58
59
  raise ArgumentError,
59
60
  "Required argument 'mistral_inference_id' missing"
@@ -0,0 +1,84 @@
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
+ # This code was automatically generated from the Elasticsearch Specification
19
+ # See https://github.com/elastic/elasticsearch-specification
20
+ # See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
21
+ module Elasticsearch
22
+ module API
23
+ module Inference
24
+ module Actions
25
+ # Create an Nvidia inference endpoint.
26
+ # Create an inference endpoint to perform an inference task with the `nvidia` service.
27
+ #
28
+ # @option arguments [String] :task_type The type of the inference task that the model will perform.
29
+ # NOTE: The `chat_completion` task type only supports streaming and only through the _stream API. (*Required*)
30
+ # @option arguments [String] :nvidia_inference_id The unique identifier of the inference endpoint. (*Required*)
31
+ # @option arguments [Time] :timeout Specifies the amount of time to wait for the inference endpoint to be created. Server default: 30s.
32
+ # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
33
+ # when they occur.
34
+ # @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
35
+ # returned by Elasticsearch.
36
+ # @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
37
+ # For example `"exists_time": "1h"` for humans and
38
+ # `"exists_time_in_millis": 3600000` for computers. When disabled the human
39
+ # readable values will be omitted. This makes sense for responses being consumed
40
+ # only by machines.
41
+ # @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
42
+ # this option for debugging only.
43
+ # @option arguments [Hash] :headers Custom HTTP headers
44
+ # @option arguments [Hash] :body request body
45
+ #
46
+ # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-nvidia
47
+ #
48
+ def put_nvidia(arguments = {})
49
+ request_opts = { endpoint: arguments[:endpoint] || 'inference.put_nvidia' }
50
+
51
+ defined_params = [:task_type, :nvidia_inference_id].each_with_object({}) do |variable, set_variables|
52
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
53
+ end
54
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
55
+
56
+ raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
57
+ raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
58
+
59
+ unless arguments[:nvidia_inference_id]
60
+ raise ArgumentError,
61
+ "Required argument 'nvidia_inference_id' missing"
62
+ end
63
+
64
+ arguments = arguments.clone
65
+ headers = arguments.delete(:headers) || {}
66
+
67
+ body = arguments.delete(:body)
68
+
69
+ _task_type = arguments.delete(:task_type)
70
+
71
+ _nvidia_inference_id = arguments.delete(:nvidia_inference_id)
72
+
73
+ method = Elasticsearch::API::HTTP_PUT
74
+ path = "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_nvidia_inference_id)}"
75
+ params = Utils.process_params(arguments)
76
+
77
+ Elasticsearch::API::Response.new(
78
+ perform_request(method, path, params, body, headers, request_opts)
79
+ )
80
+ end
81
+ end
82
+ end
83
+ end
84
+ end
@@ -55,6 +55,7 @@ module Elasticsearch
55
55
 
56
56
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
57
57
  raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
58
+
58
59
  unless arguments[:openai_inference_id]
59
60
  raise ArgumentError,
60
61
  "Required argument 'openai_inference_id' missing"
@@ -0,0 +1,84 @@
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
+ # This code was automatically generated from the Elasticsearch Specification
19
+ # See https://github.com/elastic/elasticsearch-specification
20
+ # See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
21
+ module Elasticsearch
22
+ module API
23
+ module Inference
24
+ module Actions
25
+ # Create an OpenShift AI inference endpoint.
26
+ # Create an inference endpoint to perform an inference task with the `openshift_ai` service.
27
+ #
28
+ # @option arguments [String] :task_type The type of the inference task that the model will perform.
29
+ # NOTE: The `chat_completion` task type only supports streaming and only through the _stream API. (*Required*)
30
+ # @option arguments [String] :openshiftai_inference_id The unique identifier of the inference endpoint. (*Required*)
31
+ # @option arguments [Time] :timeout Specifies the amount of time to wait for the inference endpoint to be created. Server default: 30s.
32
+ # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
33
+ # when they occur.
34
+ # @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
35
+ # returned by Elasticsearch.
36
+ # @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
37
+ # For example `"exists_time": "1h"` for humans and
38
+ # `"exists_time_in_millis": 3600000` for computers. When disabled the human
39
+ # readable values will be omitted. This makes sense for responses being consumed
40
+ # only by machines.
41
+ # @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
42
+ # this option for debugging only.
43
+ # @option arguments [Hash] :headers Custom HTTP headers
44
+ # @option arguments [Hash] :body request body
45
+ #
46
+ # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-openshift-ai
47
+ #
48
+ def put_openshift_ai(arguments = {})
49
+ request_opts = { endpoint: arguments[:endpoint] || 'inference.put_openshift_ai' }
50
+
51
+ defined_params = [:task_type, :openshiftai_inference_id].each_with_object({}) do |variable, set_variables|
52
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
53
+ end
54
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
55
+
56
+ raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
57
+ raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
58
+
59
+ unless arguments[:openshiftai_inference_id]
60
+ raise ArgumentError,
61
+ "Required argument 'openshiftai_inference_id' missing"
62
+ end
63
+
64
+ arguments = arguments.clone
65
+ headers = arguments.delete(:headers) || {}
66
+
67
+ body = arguments.delete(:body)
68
+
69
+ _task_type = arguments.delete(:task_type)
70
+
71
+ _openshiftai_inference_id = arguments.delete(:openshiftai_inference_id)
72
+
73
+ method = Elasticsearch::API::HTTP_PUT
74
+ path = "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_openshiftai_inference_id)}"
75
+ params = Utils.process_params(arguments)
76
+
77
+ Elasticsearch::API::Response.new(
78
+ perform_request(method, path, params, body, headers, request_opts)
79
+ )
80
+ end
81
+ end
82
+ end
83
+ end
84
+ end
@@ -55,6 +55,7 @@ module Elasticsearch
55
55
 
56
56
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
57
57
  raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
58
+
58
59
  unless arguments[:voyageai_inference_id]
59
60
  raise ArgumentError,
60
61
  "Required argument 'voyageai_inference_id' missing"
@@ -56,6 +56,7 @@ module Elasticsearch
56
56
 
57
57
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
58
58
  raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
59
+
59
60
  unless arguments[:watsonx_inference_id]
60
61
  raise ArgumentError,
61
62
  "Required argument 'watsonx_inference_id' missing"
@@ -22,7 +22,7 @@ module Elasticsearch
22
22
  module API
23
23
  module Inference
24
24
  module Actions
25
- # Perform streaming inference on the service.
25
+ # Perform streaming completion inference on the service.
26
26
  # Get real-time responses for completion tasks by delivering answers incrementally, reducing response times during computation.
27
27
  # This API works only with the completion task type.
28
28
  # IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.
@@ -38,6 +38,7 @@ module Elasticsearch
38
38
  # partial matches. Server default: true.
39
39
  # @option arguments [Boolean] :force If `true`, the datafeed is stopped forcefully.
40
40
  # @option arguments [Time] :timeout Specifies the amount of time to wait until a datafeed stops. Server default: 20s.
41
+ # @option arguments [Boolean] :close_job If `true` the job associated with the datafeed is closed.
41
42
  # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
42
43
  # when they occur.
43
44
  # @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
@@ -41,7 +41,7 @@ module Elasticsearch
41
41
  # @option arguments [String] :preference Specifies the node or shard the operation should be performed on. Random by default.
42
42
  # @option arguments [Boolean] :realtime If `true`, the request is real-time as opposed to near-real-time. Server default: true.
43
43
  # @option arguments [Boolean] :refresh If `true`, the request refreshes relevant shards before retrieving documents.
44
- # @option arguments [String] :routing Custom value used to route operations to a specific shard.
44
+ # @option arguments [String, Array<String>] :routing Custom value used to route operations to a specific shard.
45
45
  # @option arguments [Boolean, String, Array<String>] :_source True or false to return the `_source` field or not, or a list of fields to return.
46
46
  # @option arguments [String, Array<String>] :_source_excludes A comma-separated list of source fields to exclude from the response.
47
47
  # You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.
@@ -23,12 +23,9 @@ module Elasticsearch
23
23
  module Migration
24
24
  module Actions
25
25
  # Get deprecation information.
26
- # Returns information about deprecated features which are in use in the cluster.
27
- # The reported features include cluster, node, and index level settings that will be removed or changed in the next major version.
28
- # You must address the reported issues before upgrading to the next major version.
29
- # However, no action is required when upgrading within the current major version.
30
- # Deprecated features remain fully supported and will continue to work in the current version, and when upgrading to a newer minor or patch release in the same major version.
31
- # Use this API to review your usage of these features and migrate away from them at your own pace, before upgrading to a new major version.
26
+ # Get information about different cluster, node, and index level settings that use deprecated features that will be removed or changed in the next major version.
27
+ # TIP: This APIs is designed for indirect use by the Upgrade Assistant.
28
+ # You are strongly recommended to use the Upgrade Assistant.
32
29
  #
33
30
  # @option arguments [String] :index Comma-separate list of data streams or indices to check. Wildcard (*) expressions are supported.
34
31
  # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
@@ -65,7 +65,7 @@ module Elasticsearch
65
65
  # _alias:*pr*
66
66
  # Supported in serverless only.
67
67
  # @option arguments [Boolean] :rest_total_hits_as_int If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object.
68
- # @option arguments [String] :routing Custom routing value used to route search operations to a specific shard.
68
+ # @option arguments [String, Array<String>] :routing Custom routing value used to route search operations to a specific shard.
69
69
  # @option arguments [String] :search_type Indicates whether global term and document frequencies should be used when scoring returned documents.
70
70
  # @option arguments [Boolean] :typed_keys Specifies whether aggregation and suggester names should be prefixed by their respective types in the response.
71
71
  # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
@@ -42,7 +42,7 @@ module Elasticsearch
42
42
  # @option arguments [String] :preference The node or shard the operation should be performed on.
43
43
  # It is random by default.
44
44
  # @option arguments [Boolean] :realtime If true, the request is real-time as opposed to near-real-time. Server default: true.
45
- # @option arguments [String] :routing A custom value used to route operations to a specific shard.
45
+ # @option arguments [String, Array<String>] :routing A custom value used to route operations to a specific shard.
46
46
  # @option arguments [Boolean] :term_statistics If true, the response includes term frequency and document frequency.
47
47
  # @option arguments [Integer] :version If `true`, returns the document version as part of a hit.
48
48
  # @option arguments [String] :version_type The version type.
@@ -54,6 +54,7 @@ module Elasticsearch
54
54
  request_opts[:defined_params] = defined_params unless defined_params.empty?
55
55
 
56
56
  raise ArgumentError, "Required argument 'node_id' missing" unless arguments[:node_id]
57
+
57
58
  unless arguments[:max_archive_version]
58
59
  raise ArgumentError,
59
60
  "Required argument 'max_archive_version' missing"
@@ -27,7 +27,7 @@ module Elasticsearch
27
27
  # @option arguments [String, Array] :node_id A comma-separated list of node IDs or names to limit the returned information.
28
28
  # Use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes.
29
29
  # @option arguments [String, Array<String>] :metric Limits the information returned to the specific metrics.
30
- # A comma-separated list of the following options: `_all`, `rest_actions`.
30
+ # A comma-separated list of the following options: `_all`, `rest_actions`, `aggregations`.
31
31
  # @option arguments [Time] :timeout Period to wait for a response.
32
32
  # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
33
33
  # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
@@ -53,15 +53,7 @@ module Elasticsearch
53
53
  # @option arguments [Boolean] :ignore_unavailable If `false`, the request returns an error if it targets a missing or closed index.
54
54
  # @option arguments [String] :preference The node or shard the operation should be performed on.
55
55
  # By default, it is random.
56
- # @option arguments [String] :project_routing Specifies a subset of projects to target for the PIT request using project
57
- # metadata tags in a subset of Lucene query syntax.
58
- # Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded).
59
- # Examples:
60
- # _alias:my-project
61
- # _alias:_origin
62
- # _alias:*pr*
63
- # Supported in serverless only.
64
- # @option arguments [String] :routing A custom value that is used to route operations to a specific shard.
56
+ # @option arguments [String, Array<String>] :routing A custom value that is used to route operations to a specific shard.
65
57
  # @option arguments [String, Array<String>] :expand_wildcards The type of index that wildcard patterns can match.
66
58
  # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
67
59
  # It supports comma-separated values, such as `open,hidden`. Server default: open.
@@ -24,13 +24,12 @@ module Elasticsearch
24
24
  module Actions
25
25
  # Get tags.
26
26
  # Get the tags that are defined for the project.
27
- #
28
27
  # This API is only available in Serverless.
29
- #
30
28
  # This functionality is in technical preview and may be changed or removed in a future
31
29
  # release. Elastic will apply best effort to fix any issues, but features in technical
32
30
  # preview are not subject to the support SLA of official GA features.
33
31
  #
32
+ # @option arguments [String] :project_routing A Lucene query using project metadata tags used to filter which projects are returned in the response, such as _alias:_origin or _alias:*pr*.
34
33
  # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
35
34
  # when they occur.
36
35
  # @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
@@ -36,7 +36,8 @@ module Elasticsearch
36
36
  # * The `write` index privilege for the destination data stream, index, or index alias.
37
37
  # * To automatically create a data stream or index with a reindex API request, you must have the `auto_configure`, `create_index`, or `manage` index privilege for the destination data stream, index, or alias.
38
38
  # * If reindexing from a remote cluster, the `source.remote.user` must have the `monitor` cluster privilege and the `read` index privilege for the source data stream, index, or alias.
39
- # If reindexing from a remote cluster, you must explicitly allow the remote host in the `reindex.remote.whitelist` setting.
39
+ # If reindexing from a remote cluster into a cluster using Elastic Stack, you must explicitly allow the remote host using the `reindex.remote.whitelist` node setting on the destination cluster.
40
+ # If reindexing from a remote cluster into an Elastic Cloud Serverless project, only remote hosts from Elastic Cloud Hosted are allowed.
40
41
  # Automatic data stream creation requires a matching index template with data stream enabled.
41
42
  # The `dest` element can be configured like the index API to control optimistic concurrency control.
42
43
  # Omitting `version_type` or setting it to `internal` causes Elasticsearch to blindly dump documents into the destination, overwriting any that happen to have the same ID.
@@ -84,17 +84,9 @@ module Elasticsearch
84
84
  # - The request targets more than 128 shards.
85
85
  # - The request targets one or more read-only index.
86
86
  # - The primary sort of the query targets an indexed field.
87
- # @option arguments [String] :project_routing Specifies a subset of projects to target for the search using project
88
- # metadata tags in a subset of Lucene query syntax.
89
- # Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded).
90
- # Examples:
91
- # _alias:my-project
92
- # _alias:_origin
93
- # _alias:*pr*
94
- # Supported in serverless only.
95
87
  # @option arguments [Boolean] :request_cache If `true`, the caching of search results is enabled for requests where `size` is `0`.
96
88
  # It defaults to index level settings.
97
- # @option arguments [String] :routing A custom value that is used to route operations to a specific shard.
89
+ # @option arguments [String, Array<String>] :routing A custom value that is used to route operations to a specific shard.
98
90
  # @option arguments [Time] :scroll The period to retain the search context for scrolling.
99
91
  # By default, this value cannot exceed `1d` (24 hours).
100
92
  # You can change this limit by using the `search.max_keep_alive` cluster-level setting.
@@ -43,7 +43,7 @@ module Elasticsearch
43
43
  # IT can also be set to `-1` to indicate that the request should never timeout. Server default: 30s.
44
44
  # @option arguments [String] :preference The node or shard the operation should be performed on.
45
45
  # It is random by default.
46
- # @option arguments [String] :routing A custom value used to route operations to a specific shard.
46
+ # @option arguments [String, Array<String>] :routing A custom value used to route operations to a specific shard.
47
47
  # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
48
48
  # when they occur.
49
49
  # @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
@@ -28,7 +28,7 @@ module Elasticsearch
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.
29
29
  # This behavior applies even if the request targets other open indices.
30
30
  # 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
- # @option arguments [Boolean] :ccs_minimize_roundtrips Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution. Server default: true.
31
+ # @option arguments [Boolean] :ccs_minimize_roundtrips If `true`, network round-trips are minimized for cross-cluster search requests.
32
32
  # @option arguments [String, Array<String>] :expand_wildcards The type of index that wildcard patterns can match.
33
33
  # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
34
34
  # Supports comma-separated values, such as `open,hidden`. Server default: open.
@@ -46,7 +46,7 @@ module Elasticsearch
46
46
  # _alias:_origin
47
47
  # _alias:*pr*
48
48
  # Supported in serverless only.
49
- # @option arguments [String] :routing A custom value used to route operations to a specific shard.
49
+ # @option arguments [String, Array<String>] :routing A custom value used to route operations to a specific shard.
50
50
  # @option arguments [Time] :scroll Specifies how long a consistent view of the index
51
51
  # should be maintained for scrolled search.
52
52
  # @option arguments [String] :search_type The type of the search operation.
@@ -29,6 +29,7 @@ module Elasticsearch
29
29
  # preview are not subject to the support SLA of official GA features.
30
30
  #
31
31
  # @option arguments [String, Array] :node_id The names of the nodes in the cluster to target.
32
+ # @option arguments [Time] :master_timeout [TODO]
32
33
  # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
33
34
  # when they occur.
34
35
  # @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
@@ -26,7 +26,7 @@ module Elasticsearch
26
26
  # Evict privileges from the native application privilege cache.
27
27
  # The cache is also automatically cleared for applications that have their privileges updated.
28
28
  #
29
- # @option arguments [String] :application A comma-separated list of applications.
29
+ # @option arguments [String, Array<String>] :application A comma-separated list of applications.
30
30
  # To clear all applications, use an asterism (`*`).
31
31
  # It does not support other wildcard patterns. (*Required*)
32
32
  # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors