elasticsearch-api 8.17.2 → 8.18.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.
- checksums.yaml +4 -4
- data/lib/elasticsearch/api/actions/bulk.rb +1 -0
- data/lib/elasticsearch/api/actions/cat/help.rb +1 -3
- data/lib/elasticsearch/api/actions/cat/segments.rb +2 -0
- data/lib/elasticsearch/api/actions/cat/tasks.rb +2 -0
- data/lib/elasticsearch/api/actions/create.rb +1 -0
- data/lib/elasticsearch/api/actions/eql/search.rb +2 -0
- data/lib/elasticsearch/api/actions/esql/async_query_stop.rb +60 -0
- data/lib/elasticsearch/api/actions/index.rb +1 -0
- data/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb +1 -3
- data/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb +0 -1
- data/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb +1 -3
- data/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb +1 -3
- data/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb +1 -3
- data/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb +1 -3
- data/lib/elasticsearch/api/actions/indices/resolve_cluster.rb +11 -8
- data/lib/elasticsearch/api/actions/indices/rollover.rb +0 -1
- data/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb +61 -0
- data/lib/elasticsearch/api/actions/inference/completion.rb +61 -0
- data/lib/elasticsearch/api/actions/inference/put_alibabacloud.rb +69 -0
- data/lib/elasticsearch/api/actions/inference/put_amazonbedrock.rb +69 -0
- data/lib/elasticsearch/api/actions/inference/put_anthropic.rb +69 -0
- data/lib/elasticsearch/api/actions/inference/put_azureaistudio.rb +69 -0
- data/lib/elasticsearch/api/actions/inference/put_azureopenai.rb +69 -0
- data/lib/elasticsearch/api/actions/inference/put_cohere.rb +65 -0
- data/lib/elasticsearch/api/actions/inference/put_elasticsearch.rb +69 -0
- data/lib/elasticsearch/api/actions/inference/put_elser.rb +65 -0
- data/lib/elasticsearch/api/actions/inference/put_googleaistudio.rb +69 -0
- data/lib/elasticsearch/api/actions/inference/put_googlevertexai.rb +69 -0
- data/lib/elasticsearch/api/actions/inference/put_hugging_face.rb +69 -0
- data/lib/elasticsearch/api/actions/inference/put_jinaai.rb +65 -0
- data/lib/elasticsearch/api/actions/inference/put_mistral.rb +69 -0
- data/lib/elasticsearch/api/actions/inference/put_openai.rb +65 -0
- data/lib/elasticsearch/api/actions/inference/put_voyageai.rb +69 -0
- data/lib/elasticsearch/api/actions/inference/put_watsonx.rb +69 -0
- data/lib/elasticsearch/api/actions/inference/rerank.rb +61 -0
- data/lib/elasticsearch/api/actions/inference/sparse_embedding.rb +61 -0
- data/lib/elasticsearch/api/actions/inference/{stream_inference.rb → stream_completion.rb} +5 -12
- data/lib/elasticsearch/api/actions/inference/text_embedding.rb +61 -0
- data/lib/elasticsearch/api/actions/inference/update.rb +1 -1
- data/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb +1 -3
- data/lib/elasticsearch/api/actions/ingest/delete_ip_location_database.rb +1 -3
- data/lib/elasticsearch/api/actions/ingest/put_geoip_database.rb +1 -3
- data/lib/elasticsearch/api/actions/ingest/put_ip_location_database.rb +1 -3
- data/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb +2 -1
- data/lib/elasticsearch/api/actions/update.rb +1 -0
- data/lib/elasticsearch/api/version.rb +1 -1
- data/spec/elasticsearch/api/actions/esql/async_query_stop_spec.rb +35 -0
- data/spec/elasticsearch/api/actions/indices/resolve_cluster_spec.rb +14 -9
- data/spec/elasticsearch/api/actions/inference/chat_completion_unified_spec.rb +36 -0
- data/spec/elasticsearch/api/actions/inference/completion_spec.rb +36 -0
- data/spec/elasticsearch/api/actions/inference/put_alibabacloud_spec.rb +36 -0
- data/spec/elasticsearch/api/actions/inference/put_amazonbedrock_spec.rb +36 -0
- data/spec/elasticsearch/api/actions/inference/put_anthropic_spec.rb +36 -0
- data/spec/elasticsearch/api/actions/inference/put_azureaistudio_spec.rb +36 -0
- data/spec/elasticsearch/api/actions/inference/put_azureopenai_spec.rb +36 -0
- data/spec/elasticsearch/api/actions/inference/put_cohere_spec.rb +36 -0
- data/spec/elasticsearch/api/actions/inference/put_elasticsearch_spec.rb +36 -0
- data/spec/elasticsearch/api/actions/inference/put_elser_spec.rb +36 -0
- data/spec/elasticsearch/api/actions/inference/put_googleaistudio_spec.rb +36 -0
- data/spec/elasticsearch/api/actions/inference/put_googlevertexai_spec.rb +36 -0
- data/spec/elasticsearch/api/actions/inference/put_huggingface_spec.rb +36 -0
- data/spec/elasticsearch/api/actions/inference/put_jinaai_spec.rb +36 -0
- data/spec/elasticsearch/api/actions/inference/put_mistral_spec.rb +36 -0
- data/spec/elasticsearch/api/actions/inference/put_openai_spec.rb +36 -0
- data/spec/elasticsearch/api/actions/inference/put_voyageai_spec.rb +36 -0
- data/spec/elasticsearch/api/actions/inference/put_watsonx_spec.rb +36 -0
- data/spec/elasticsearch/api/actions/inference/rerank_spec.rb +35 -0
- data/spec/elasticsearch/api/actions/inference/{stream_inference_spec.rb → sparse_embedding_spec.rb} +4 -4
- data/spec/elasticsearch/api/actions/inference/stream_completion_spec.rb +35 -0
- data/spec/elasticsearch/api/actions/inference/text_embedding_spec.rb +35 -0
- data/spec/elasticsearch/api/actions/inference/update_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/ingest/delete_geoip_database_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/ingest/delete_ip_location_database_spec.rb +1 -1
- data/spec/rest_api/skipped_tests_free.yml +15 -0
- data/spec/rest_api/skipped_tests_platinum.yml +13 -0
- data/spec/unit/actions/async_search/delete_spec.rb +35 -0
- data/spec/unit/actions/async_search/get_spec.rb +35 -0
- data/spec/unit/actions/async_search/status_spec.rb +34 -0
- data/spec/unit/actions/async_search/submit_spec.rb +87 -0
- data/spec/yaml-test-runner/run.rb +4 -1
- metadata +79 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d92d90d78651e26eacae85b93d362209401741be16833772f8905b5c6a4017d5
|
4
|
+
data.tar.gz: 43657d27a5e30b001cdf5356ec2779a75afecd10f52599f847593acf3f05f8b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59844d5a5485c499a4d0be5b05c9fe829aef551ad9bf3be0fd5686e309ef0a471b4cb2abebef192889a2a7dd0b05a1d4a78a224f7bf225b7e494877225b2b869
|
7
|
+
data.tar.gz: 3d7ca26d37d4ce2d2cfaa3b45143153abd2cd5577531837f72cd00da75f334e9abafe1b22463bf9731480e53c96f8b85a7e4be7c71b848d4d25964f5d2dd0e09
|
@@ -36,6 +36,7 @@ module Elasticsearch
|
|
36
36
|
# @option arguments [Boolean] :require_alias Sets require_alias for all incoming documents. Defaults to unset (false)
|
37
37
|
# @option arguments [Boolean] :require_data_stream When true, requires the destination to be a data stream (existing or to-be-created). Default is false
|
38
38
|
# @option arguments [Boolean] :list_executed_pipelines Sets list_executed_pipelines for all incoming documents. Defaults to unset (false)
|
39
|
+
# @option arguments [Boolean] :include_source_on_error True or false if to include the document source in the error message in case of parsing errors. Defaults to true.
|
39
40
|
# @option arguments [Hash] :headers Custom HTTP headers
|
40
41
|
# @option arguments [String|Array] :body The operation definition and data (action-data pairs), separated by newlines. Array of Strings, Header/Data pairs,
|
41
42
|
# or the conveniency "combined" format can be passed, refer to Elasticsearch::API::Utils.__bulkify documentation.
|
@@ -24,8 +24,6 @@ module Elasticsearch
|
|
24
24
|
module Actions
|
25
25
|
# Returns help for the Cat APIs.
|
26
26
|
#
|
27
|
-
# @option arguments [Boolean] :help Return help information
|
28
|
-
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
|
29
27
|
# @option arguments [Hash] :headers Custom HTTP headers
|
30
28
|
#
|
31
29
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cat.html
|
@@ -40,7 +38,7 @@ module Elasticsearch
|
|
40
38
|
|
41
39
|
method = Elasticsearch::API::HTTP_GET
|
42
40
|
path = '_cat'
|
43
|
-
params =
|
41
|
+
params = {}
|
44
42
|
|
45
43
|
Elasticsearch::API::Response.new(
|
46
44
|
perform_request(method, path, params, body, headers, request_opts)
|
@@ -26,6 +26,8 @@ module Elasticsearch
|
|
26
26
|
#
|
27
27
|
# @option arguments [List] :index A comma-separated list of index names to limit the returned information
|
28
28
|
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
|
29
|
+
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
|
30
|
+
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
29
31
|
# @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb)
|
30
32
|
# @option arguments [List] :h Comma-separated list of column names to display
|
31
33
|
# @option arguments [Boolean] :help Return help information
|
@@ -38,6 +38,8 @@ module Elasticsearch
|
|
38
38
|
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
|
39
39
|
# @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos)
|
40
40
|
# @option arguments [Boolean] :v Verbose mode. Display column headers
|
41
|
+
# @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.
|
42
|
+
# @option arguments [Boolean] :wait_for_completion If `true`, the request blocks until the task has completed.
|
41
43
|
# @option arguments [Hash] :headers Custom HTTP headers
|
42
44
|
#
|
43
45
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.17/tasks.html
|
@@ -34,6 +34,7 @@ module Elasticsearch
|
|
34
34
|
# @option arguments [Number] :version Explicit version number for concurrency control
|
35
35
|
# @option arguments [String] :version_type Specific version type (options: internal, external, external_gte)
|
36
36
|
# @option arguments [String] :pipeline The pipeline id to preprocess incoming documents with
|
37
|
+
# @option arguments [Boolean] :include_source_on_error True or false if to include the document source in the error message in case of parsing errors. Defaults to true.
|
37
38
|
# @option arguments [Hash] :headers Custom HTTP headers
|
38
39
|
# @option arguments [Hash] :body The document (*Required*)
|
39
40
|
#
|
@@ -28,6 +28,8 @@ module Elasticsearch
|
|
28
28
|
# @option arguments [Time] :wait_for_completion_timeout Specify the time that the request should block waiting for the final response
|
29
29
|
# @option arguments [Boolean] :keep_on_completion Control whether the response should be stored in the cluster if it completed within the provided [wait_for_completion] time (default: false)
|
30
30
|
# @option arguments [Time] :keep_alive Update the time interval in which the results (partial or final) for this search will be available
|
31
|
+
# @option arguments [Boolean] :allow_partial_search_results Control whether the query should keep running in case of shard failures, and return partial results
|
32
|
+
# @option arguments [Boolean] :allow_partial_sequence_results Control whether a sequence query should return partial results or no results at all in case of shard failures. This option has effect only if [allow_partial_search_results] is true.
|
31
33
|
# @option arguments [Hash] :headers Custom HTTP headers
|
32
34
|
# @option arguments [Hash] :body Eql request body. Use the `query` to limit the query scope. (*Required*)
|
33
35
|
#
|
@@ -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 build hash f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec
|
20
|
+
#
|
21
|
+
module Elasticsearch
|
22
|
+
module API
|
23
|
+
module Esql
|
24
|
+
module Actions
|
25
|
+
# Stops a previously submitted async query request given its ID and collects the results.
|
26
|
+
#
|
27
|
+
# @option arguments [String] :id The async query ID
|
28
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
29
|
+
#
|
30
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.17/esql-async-query-stop-api.html
|
31
|
+
#
|
32
|
+
def async_query_stop(arguments = {})
|
33
|
+
request_opts = { endpoint: arguments[:endpoint] || 'esql.async_query_stop' }
|
34
|
+
|
35
|
+
defined_params = [:id].each_with_object({}) do |variable, set_variables|
|
36
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
37
|
+
end
|
38
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
39
|
+
|
40
|
+
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
41
|
+
|
42
|
+
arguments = arguments.clone
|
43
|
+
headers = arguments.delete(:headers) || {}
|
44
|
+
|
45
|
+
body = nil
|
46
|
+
|
47
|
+
_id = arguments.delete(:id)
|
48
|
+
|
49
|
+
method = Elasticsearch::API::HTTP_POST
|
50
|
+
path = "_query/async/#{Utils.__listify(_id)}/stop"
|
51
|
+
params = {}
|
52
|
+
|
53
|
+
Elasticsearch::API::Response.new(
|
54
|
+
perform_request(method, path, params, body, headers, request_opts)
|
55
|
+
)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -37,6 +37,7 @@ module Elasticsearch
|
|
37
37
|
# @option arguments [String] :pipeline The pipeline id to preprocess incoming documents with
|
38
38
|
# @option arguments [Boolean] :require_alias When true, requires destination to be an alias. Default is false
|
39
39
|
# @option arguments [Boolean] :require_data_stream When true, requires the destination to be a data stream (existing or to-be-created). Default is false
|
40
|
+
# @option arguments [Boolean] :include_source_on_error True or false if to include the document source in the error message in case of parsing errors. Defaults to true.
|
40
41
|
# @option arguments [Hash] :headers Custom HTTP headers
|
41
42
|
# @option arguments [Hash] :body The document (*Required*)
|
42
43
|
#
|
@@ -25,8 +25,6 @@ module Elasticsearch
|
|
25
25
|
# Deletes the specified lifecycle policy definition. A currently used policy cannot be deleted.
|
26
26
|
#
|
27
27
|
# @option arguments [String] :policy The name of the index lifecycle policy
|
28
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
29
|
-
# @option arguments [Time] :timeout Explicit operation timeout
|
30
28
|
# @option arguments [Hash] :headers Custom HTTP headers
|
31
29
|
#
|
32
30
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ilm-delete-lifecycle.html
|
@@ -50,7 +48,7 @@ module Elasticsearch
|
|
50
48
|
|
51
49
|
method = Elasticsearch::API::HTTP_DELETE
|
52
50
|
path = "_ilm/policy/#{Utils.__listify(_policy)}"
|
53
|
-
params =
|
51
|
+
params = {}
|
54
52
|
|
55
53
|
Elasticsearch::API::Response.new(
|
56
54
|
perform_request(method, path, params, body, headers, request_opts)
|
@@ -27,7 +27,6 @@ module Elasticsearch
|
|
27
27
|
# @option arguments [String] :index The name of the index to explain
|
28
28
|
# @option arguments [Boolean] :only_managed filters the indices included in the response to ones managed by ILM
|
29
29
|
# @option arguments [Boolean] :only_errors filters the indices included in the response to ones in an ILM error state, implies only_managed
|
30
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
31
30
|
# @option arguments [Hash] :headers Custom HTTP headers
|
32
31
|
#
|
33
32
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ilm-explain-lifecycle.html
|
@@ -25,8 +25,6 @@ module Elasticsearch
|
|
25
25
|
# Returns the specified policy definition. Includes the policy version and last modified date.
|
26
26
|
#
|
27
27
|
# @option arguments [String] :policy The name of the index lifecycle policy
|
28
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
29
|
-
# @option arguments [Time] :timeout Explicit operation timeout
|
30
28
|
# @option arguments [Hash] :headers Custom HTTP headers
|
31
29
|
#
|
32
30
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ilm-get-lifecycle.html
|
@@ -52,7 +50,7 @@ module Elasticsearch
|
|
52
50
|
else
|
53
51
|
'_ilm/policy'
|
54
52
|
end
|
55
|
-
params =
|
53
|
+
params = {}
|
56
54
|
|
57
55
|
Elasticsearch::API::Response.new(
|
58
56
|
perform_request(method, path, params, body, headers, request_opts)
|
@@ -25,8 +25,6 @@ module Elasticsearch
|
|
25
25
|
# Creates a lifecycle policy
|
26
26
|
#
|
27
27
|
# @option arguments [String] :policy The name of the index lifecycle policy
|
28
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
29
|
-
# @option arguments [Time] :timeout Explicit operation timeout
|
30
28
|
# @option arguments [Hash] :headers Custom HTTP headers
|
31
29
|
# @option arguments [Hash] :body The lifecycle policy definition to register
|
32
30
|
#
|
@@ -51,7 +49,7 @@ module Elasticsearch
|
|
51
49
|
|
52
50
|
method = Elasticsearch::API::HTTP_PUT
|
53
51
|
path = "_ilm/policy/#{Utils.__listify(_policy)}"
|
54
|
-
params =
|
52
|
+
params = {}
|
55
53
|
|
56
54
|
Elasticsearch::API::Response.new(
|
57
55
|
perform_request(method, path, params, body, headers, request_opts)
|
@@ -24,8 +24,6 @@ module Elasticsearch
|
|
24
24
|
module Actions
|
25
25
|
# Start the index lifecycle management (ILM) plugin.
|
26
26
|
#
|
27
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
28
|
-
# @option arguments [Time] :timeout Explicit operation timeout
|
29
27
|
# @option arguments [Hash] :headers Custom HTTP headers
|
30
28
|
#
|
31
29
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ilm-start.html
|
@@ -40,7 +38,7 @@ module Elasticsearch
|
|
40
38
|
|
41
39
|
method = Elasticsearch::API::HTTP_POST
|
42
40
|
path = '_ilm/start'
|
43
|
-
params =
|
41
|
+
params = {}
|
44
42
|
|
45
43
|
Elasticsearch::API::Response.new(
|
46
44
|
perform_request(method, path, params, body, headers, request_opts)
|
@@ -24,8 +24,6 @@ module Elasticsearch
|
|
24
24
|
module Actions
|
25
25
|
# Halts all lifecycle management operations and stops the index lifecycle management (ILM) plugin
|
26
26
|
#
|
27
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
28
|
-
# @option arguments [Time] :timeout Explicit operation timeout
|
29
27
|
# @option arguments [Hash] :headers Custom HTTP headers
|
30
28
|
#
|
31
29
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ilm-stop.html
|
@@ -40,7 +38,7 @@ module Elasticsearch
|
|
40
38
|
|
41
39
|
method = Elasticsearch::API::HTTP_POST
|
42
40
|
path = '_ilm/stop'
|
43
|
-
params =
|
41
|
+
params = {}
|
44
42
|
|
45
43
|
Elasticsearch::API::Response.new(
|
46
44
|
perform_request(method, path, params, body, headers, request_opts)
|
@@ -22,13 +22,14 @@ module Elasticsearch
|
|
22
22
|
module API
|
23
23
|
module Indices
|
24
24
|
module Actions
|
25
|
-
# Resolves the specified index expressions to return information about each cluster,
|
25
|
+
# Resolves the specified index expressions to return information about each cluster. If no index expression is provided, this endpoint will return information about all the remote clusters that are configured on the local cluster.
|
26
26
|
#
|
27
27
|
# @option arguments [List] :name A comma-separated list of cluster:index names or wildcard expressions
|
28
|
-
# @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
29
|
-
# @option arguments [Boolean] :ignore_throttled Whether specified concrete, expanded or aliased indices should be ignored when throttled
|
30
|
-
# @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
31
|
-
# @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all)
|
28
|
+
# @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed). Only allowed when providing an index expression.
|
29
|
+
# @option arguments [Boolean] :ignore_throttled Whether specified concrete, expanded or aliased indices should be ignored when throttled. Only allowed when providing an index expression.
|
30
|
+
# @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified). Only allowed when providing an index expression.
|
31
|
+
# @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open). Only allowed when providing an index expression. (options: open, closed, hidden, none, all)
|
32
|
+
# @option arguments [Time] :timeout The maximum time to wait for remote clusters to respond
|
32
33
|
# @option arguments [Hash] :headers Custom HTTP headers
|
33
34
|
#
|
34
35
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-resolve-cluster-api.html
|
@@ -41,8 +42,6 @@ module Elasticsearch
|
|
41
42
|
end
|
42
43
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
43
44
|
|
44
|
-
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
45
|
-
|
46
45
|
arguments = arguments.clone
|
47
46
|
headers = arguments.delete(:headers) || {}
|
48
47
|
|
@@ -51,7 +50,11 @@ module Elasticsearch
|
|
51
50
|
_name = arguments.delete(:name)
|
52
51
|
|
53
52
|
method = Elasticsearch::API::HTTP_GET
|
54
|
-
path =
|
53
|
+
path = if _name
|
54
|
+
"_resolve/cluster/#{Utils.__listify(_name)}"
|
55
|
+
else
|
56
|
+
'_resolve/cluster'
|
57
|
+
end
|
55
58
|
params = Utils.process_params(arguments)
|
56
59
|
|
57
60
|
Elasticsearch::API::Response.new(
|
@@ -32,7 +32,6 @@ module Elasticsearch
|
|
32
32
|
# @option arguments [Time] :master_timeout Specify timeout for connection to master
|
33
33
|
# @option arguments [String] :wait_for_active_shards Set the number of active shards to wait for on the newly created rollover index before the operation returns.
|
34
34
|
# @option arguments [Boolean] :lazy If set to true, the rollover action will only mark a data stream to signal that it needs to be rolled over at the next write. Only allowed on data streams.
|
35
|
-
# @option arguments [Boolean] :target_failure_store If set to true, the rollover action will be applied on the failure store of the data stream.
|
36
35
|
# @option arguments [Hash] :headers Custom HTTP headers
|
37
36
|
# @option arguments [Hash] :body The conditions that needs to be met for executing rollover
|
38
37
|
#
|
@@ -0,0 +1,61 @@
|
|
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 build hash f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec
|
20
|
+
#
|
21
|
+
module Elasticsearch
|
22
|
+
module API
|
23
|
+
module Inference
|
24
|
+
module Actions
|
25
|
+
# Perform chat completion inference
|
26
|
+
#
|
27
|
+
# @option arguments [String] :inference_id The inference Id
|
28
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
29
|
+
# @option arguments [Hash] :body The inference payload
|
30
|
+
#
|
31
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.17/chat-completion-inference.html
|
32
|
+
#
|
33
|
+
def chat_completion_unified(arguments = {})
|
34
|
+
request_opts = { endpoint: arguments[:endpoint] || 'inference.chat_completion_unified' }
|
35
|
+
|
36
|
+
defined_params = [:inference_id].each_with_object({}) do |variable, set_variables|
|
37
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
38
|
+
end
|
39
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
40
|
+
|
41
|
+
raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id]
|
42
|
+
|
43
|
+
arguments = arguments.clone
|
44
|
+
headers = arguments.delete(:headers) || {}
|
45
|
+
|
46
|
+
body = arguments.delete(:body)
|
47
|
+
|
48
|
+
_inference_id = arguments.delete(:inference_id)
|
49
|
+
|
50
|
+
method = Elasticsearch::API::HTTP_POST
|
51
|
+
path = "_inference/chat_completion/#{Utils.__listify(_inference_id)}/_stream"
|
52
|
+
params = {}
|
53
|
+
|
54
|
+
Elasticsearch::API::Response.new(
|
55
|
+
perform_request(method, path, params, body, headers, request_opts)
|
56
|
+
)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,61 @@
|
|
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 build hash f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec
|
20
|
+
#
|
21
|
+
module Elasticsearch
|
22
|
+
module API
|
23
|
+
module Inference
|
24
|
+
module Actions
|
25
|
+
# Perform completion inference
|
26
|
+
#
|
27
|
+
# @option arguments [String] :inference_id The inference Id
|
28
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
29
|
+
# @option arguments [Hash] :body The inference payload
|
30
|
+
#
|
31
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.17/post-inference-api.html
|
32
|
+
#
|
33
|
+
def completion(arguments = {})
|
34
|
+
request_opts = { endpoint: arguments[:endpoint] || 'inference.completion' }
|
35
|
+
|
36
|
+
defined_params = [:inference_id].each_with_object({}) do |variable, set_variables|
|
37
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
38
|
+
end
|
39
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
40
|
+
|
41
|
+
raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id]
|
42
|
+
|
43
|
+
arguments = arguments.clone
|
44
|
+
headers = arguments.delete(:headers) || {}
|
45
|
+
|
46
|
+
body = arguments.delete(:body)
|
47
|
+
|
48
|
+
_inference_id = arguments.delete(:inference_id)
|
49
|
+
|
50
|
+
method = Elasticsearch::API::HTTP_POST
|
51
|
+
path = "_inference/completion/#{Utils.__listify(_inference_id)}"
|
52
|
+
params = {}
|
53
|
+
|
54
|
+
Elasticsearch::API::Response.new(
|
55
|
+
perform_request(method, path, params, body, headers, request_opts)
|
56
|
+
)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,69 @@
|
|
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 build hash f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec
|
20
|
+
#
|
21
|
+
module Elasticsearch
|
22
|
+
module API
|
23
|
+
module Inference
|
24
|
+
module Actions
|
25
|
+
# Configure an AlibabaCloud AI Search inference endpoint
|
26
|
+
#
|
27
|
+
# @option arguments [String] :task_type The task type
|
28
|
+
# @option arguments [String] :alibabacloud_inference_id The inference Id
|
29
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
30
|
+
# @option arguments [Hash] :body The inference endpoint's task and service settings
|
31
|
+
#
|
32
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.17/infer-service-alibabacloud-ai-search.html
|
33
|
+
#
|
34
|
+
def put_alibabacloud(arguments = {})
|
35
|
+
request_opts = { endpoint: arguments[:endpoint] || 'inference.put_alibabacloud' }
|
36
|
+
|
37
|
+
defined_params = %i[task_type alibabacloud_inference_id].each_with_object({}) do |variable, set_variables|
|
38
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
39
|
+
end
|
40
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
41
|
+
|
42
|
+
raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
|
43
|
+
|
44
|
+
unless arguments[:alibabacloud_inference_id]
|
45
|
+
raise ArgumentError,
|
46
|
+
"Required argument 'alibabacloud_inference_id' missing"
|
47
|
+
end
|
48
|
+
|
49
|
+
arguments = arguments.clone
|
50
|
+
headers = arguments.delete(:headers) || {}
|
51
|
+
|
52
|
+
body = arguments.delete(:body)
|
53
|
+
|
54
|
+
_task_type = arguments.delete(:task_type)
|
55
|
+
|
56
|
+
_alibabacloud_inference_id = arguments.delete(:alibabacloud_inference_id)
|
57
|
+
|
58
|
+
method = Elasticsearch::API::HTTP_PUT
|
59
|
+
path = "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_alibabacloud_inference_id)}"
|
60
|
+
params = {}
|
61
|
+
|
62
|
+
Elasticsearch::API::Response.new(
|
63
|
+
perform_request(method, path, params, body, headers, request_opts)
|
64
|
+
)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,69 @@
|
|
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 build hash f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec
|
20
|
+
#
|
21
|
+
module Elasticsearch
|
22
|
+
module API
|
23
|
+
module Inference
|
24
|
+
module Actions
|
25
|
+
# Configure an Amazon Bedrock inference endpoint
|
26
|
+
#
|
27
|
+
# @option arguments [String] :task_type The task type
|
28
|
+
# @option arguments [String] :amazonbedrock_inference_id The inference Id
|
29
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
30
|
+
# @option arguments [Hash] :body The inference endpoint's task and service settings
|
31
|
+
#
|
32
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.17/infer-service-amazon-bedrock.html
|
33
|
+
#
|
34
|
+
def put_amazonbedrock(arguments = {})
|
35
|
+
request_opts = { endpoint: arguments[:endpoint] || 'inference.put_amazonbedrock' }
|
36
|
+
|
37
|
+
defined_params = %i[task_type amazonbedrock_inference_id].each_with_object({}) do |variable, set_variables|
|
38
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
39
|
+
end
|
40
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
41
|
+
|
42
|
+
raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
|
43
|
+
|
44
|
+
unless arguments[:amazonbedrock_inference_id]
|
45
|
+
raise ArgumentError,
|
46
|
+
"Required argument 'amazonbedrock_inference_id' missing"
|
47
|
+
end
|
48
|
+
|
49
|
+
arguments = arguments.clone
|
50
|
+
headers = arguments.delete(:headers) || {}
|
51
|
+
|
52
|
+
body = arguments.delete(:body)
|
53
|
+
|
54
|
+
_task_type = arguments.delete(:task_type)
|
55
|
+
|
56
|
+
_amazonbedrock_inference_id = arguments.delete(:amazonbedrock_inference_id)
|
57
|
+
|
58
|
+
method = Elasticsearch::API::HTTP_PUT
|
59
|
+
path = "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_amazonbedrock_inference_id)}"
|
60
|
+
params = {}
|
61
|
+
|
62
|
+
Elasticsearch::API::Response.new(
|
63
|
+
perform_request(method, path, params, body, headers, request_opts)
|
64
|
+
)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,69 @@
|
|
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 build hash f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec
|
20
|
+
#
|
21
|
+
module Elasticsearch
|
22
|
+
module API
|
23
|
+
module Inference
|
24
|
+
module Actions
|
25
|
+
# Configure an Anthropic inference endpoint
|
26
|
+
#
|
27
|
+
# @option arguments [String] :task_type The task type
|
28
|
+
# @option arguments [String] :anthropic_inference_id The inference Id
|
29
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
30
|
+
# @option arguments [Hash] :body The inference endpoint's task and service settings
|
31
|
+
#
|
32
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.17/infer-service-anthropic.html
|
33
|
+
#
|
34
|
+
def put_anthropic(arguments = {})
|
35
|
+
request_opts = { endpoint: arguments[:endpoint] || 'inference.put_anthropic' }
|
36
|
+
|
37
|
+
defined_params = %i[task_type anthropic_inference_id].each_with_object({}) do |variable, set_variables|
|
38
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
39
|
+
end
|
40
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
41
|
+
|
42
|
+
raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
|
43
|
+
|
44
|
+
unless arguments[:anthropic_inference_id]
|
45
|
+
raise ArgumentError,
|
46
|
+
"Required argument 'anthropic_inference_id' missing"
|
47
|
+
end
|
48
|
+
|
49
|
+
arguments = arguments.clone
|
50
|
+
headers = arguments.delete(:headers) || {}
|
51
|
+
|
52
|
+
body = arguments.delete(:body)
|
53
|
+
|
54
|
+
_task_type = arguments.delete(:task_type)
|
55
|
+
|
56
|
+
_anthropic_inference_id = arguments.delete(:anthropic_inference_id)
|
57
|
+
|
58
|
+
method = Elasticsearch::API::HTTP_PUT
|
59
|
+
path = "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_anthropic_inference_id)}"
|
60
|
+
params = {}
|
61
|
+
|
62
|
+
Elasticsearch::API::Response.new(
|
63
|
+
perform_request(method, path, params, body, headers, request_opts)
|
64
|
+
)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|