elasticsearch-serverless 0.4.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/elasticsearch-serverless/api/async_search/delete.rb +2 -2
- data/lib/elasticsearch-serverless/api/async_search/get.rb +2 -1
- data/lib/elasticsearch-serverless/api/async_search/status.rb +5 -3
- data/lib/elasticsearch-serverless/api/async_search/submit.rb +5 -7
- data/lib/elasticsearch-serverless/api/cat/aliases.rb +0 -4
- data/lib/elasticsearch-serverless/api/cat/component_templates.rb +4 -4
- data/lib/elasticsearch-serverless/api/cat/count.rb +0 -4
- data/lib/elasticsearch-serverless/api/cat/help.rb +0 -4
- data/lib/elasticsearch-serverless/api/cat/indices.rb +0 -4
- data/lib/elasticsearch-serverless/api/cat/ml_data_frame_analytics.rb +0 -4
- data/lib/elasticsearch-serverless/api/cat/ml_datafeeds.rb +0 -4
- data/lib/elasticsearch-serverless/api/cat/ml_jobs.rb +0 -4
- data/lib/elasticsearch-serverless/api/cat/ml_trained_models.rb +0 -4
- data/lib/elasticsearch-serverless/api/cat/transforms.rb +0 -4
- data/lib/elasticsearch-serverless/api/clear_scroll.rb +3 -12
- data/lib/elasticsearch-serverless/api/close_point_in_time.rb +5 -1
- data/lib/elasticsearch-serverless/api/connector/check_in.rb +2 -1
- data/lib/elasticsearch-serverless/api/connector/delete.rb +5 -1
- data/lib/elasticsearch-serverless/api/connector/get.rb +2 -1
- data/lib/elasticsearch-serverless/api/connector/list.rb +2 -1
- data/lib/elasticsearch-serverless/api/connector/post.rb +4 -1
- data/lib/elasticsearch-serverless/api/connector/put.rb +1 -1
- data/lib/elasticsearch-serverless/api/connector/sync_job_cancel.rb +3 -1
- data/lib/elasticsearch-serverless/api/connector/sync_job_delete.rb +3 -1
- data/lib/elasticsearch-serverless/api/connector/sync_job_get.rb +1 -1
- data/lib/elasticsearch-serverless/api/connector/sync_job_list.rb +2 -1
- data/lib/elasticsearch-serverless/api/connector/sync_job_post.rb +2 -1
- data/lib/elasticsearch-serverless/api/connector/update_active_filtering.rb +1 -0
- data/lib/elasticsearch-serverless/api/connector/update_api_key_id.rb +5 -1
- data/lib/elasticsearch-serverless/api/connector/update_configuration.rb +2 -1
- data/lib/elasticsearch-serverless/api/connector/update_error.rb +4 -1
- data/lib/elasticsearch-serverless/api/connector/update_filtering.rb +4 -1
- data/lib/elasticsearch-serverless/api/connector/update_filtering_validation.rb +2 -1
- data/lib/elasticsearch-serverless/api/connector/update_index_name.rb +2 -1
- data/lib/elasticsearch-serverless/api/connector/update_name.rb +1 -1
- data/lib/elasticsearch-serverless/api/connector/update_native.rb +1 -1
- data/lib/elasticsearch-serverless/api/connector/update_pipeline.rb +2 -1
- data/lib/elasticsearch-serverless/api/connector/update_scheduling.rb +1 -1
- data/lib/elasticsearch-serverless/api/connector/update_service_type.rb +1 -1
- data/lib/elasticsearch-serverless/api/connector/update_status.rb +1 -1
- data/lib/elasticsearch-serverless/api/field_caps.rb +5 -3
- data/lib/elasticsearch-serverless/api/indices/analyze.rb +2 -1
- data/lib/elasticsearch-serverless/api/indices/exists_alias.rb +0 -1
- data/lib/elasticsearch-serverless/api/indices/get_alias.rb +0 -1
- data/lib/elasticsearch-serverless/api/indices/put_data_lifecycle.rb +2 -1
- data/lib/elasticsearch-serverless/api/inference/delete.rb +0 -4
- data/lib/elasticsearch-serverless/api/inference/get.rb +0 -4
- data/lib/elasticsearch-serverless/api/inference/inference.rb +0 -4
- data/lib/elasticsearch-serverless/api/inference/put.rb +0 -4
- data/lib/elasticsearch-serverless/api/machine_learning/infer_trained_model.rb +69 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_datafeed.rb +2 -2
- data/lib/elasticsearch-serverless/api/mget.rb +4 -1
- data/lib/elasticsearch-serverless/api/msearch.rb +11 -1
- data/lib/elasticsearch-serverless/api/msearch_template.rb +1 -1
- data/lib/elasticsearch-serverless/api/mtermvectors.rb +5 -1
- data/lib/elasticsearch-serverless/api/open_point_in_time.rb +6 -1
- data/lib/elasticsearch-serverless/api/query_rules/test.rb +63 -0
- data/lib/elasticsearch-serverless/api/rank_eval.rb +2 -1
- data/lib/elasticsearch-serverless/api/render_search_template.rb +2 -1
- data/lib/elasticsearch-serverless/api/scroll.rb +11 -12
- data/lib/elasticsearch-serverless/api/search.rb +2 -3
- data/lib/elasticsearch-serverless/api/search_mvt.rb +1 -1
- data/lib/elasticsearch-serverless/api/search_template.rb +1 -1
- data/lib/elasticsearch-serverless/api/security/create_api_key.rb +1 -1
- data/lib/elasticsearch-serverless/api/{indices/delete_data_lifecycle.rb → security/delete_role.rb} +9 -11
- data/lib/elasticsearch-serverless/api/{enrich/stats.rb → security/get_builtin_privileges.rb} +7 -7
- data/lib/elasticsearch-serverless/api/security/get_role.rb +72 -0
- data/lib/elasticsearch-serverless/api/security/has_privileges.rb +1 -1
- data/lib/elasticsearch-serverless/api/security/invalidate_api_key.rb +3 -2
- data/lib/elasticsearch-serverless/api/security/put_role.rb +67 -0
- data/lib/elasticsearch-serverless/api/security/query_api_keys.rb +2 -2
- data/lib/elasticsearch-serverless/api/tasks/get.rb +69 -0
- data/lib/elasticsearch-serverless/api/terms_enum.rb +6 -1
- data/lib/elasticsearch-serverless/api/termvectors.rb +1 -1
- data/lib/elasticsearch-serverless/api.rb +1 -0
- data/lib/elasticsearch-serverless/version.rb +1 -1
- metadata +10 -5
@@ -37,7 +37,7 @@ module ElasticsearchServerless
|
|
37
37
|
# @option arguments [Time] :timeout Period to wait for a response.
|
38
38
|
# If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
39
39
|
# @option arguments [Hash] :headers Custom HTTP headers
|
40
|
-
# @option arguments [Hash] :body
|
40
|
+
# @option arguments [Hash] :body lifecycle
|
41
41
|
#
|
42
42
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-put-lifecycle.html
|
43
43
|
#
|
@@ -50,6 +50,7 @@ module ElasticsearchServerless
|
|
50
50
|
end
|
51
51
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
52
52
|
|
53
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
53
54
|
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
54
55
|
|
55
56
|
arguments = arguments.clone
|
@@ -23,10 +23,6 @@ module ElasticsearchServerless
|
|
23
23
|
module Inference
|
24
24
|
module Actions
|
25
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
26
|
#
|
31
27
|
# @option arguments [String] :task_type The task type
|
32
28
|
# @option arguments [String] :inference_id The inference Id (*Required*)
|
@@ -23,10 +23,6 @@ module ElasticsearchServerless
|
|
23
23
|
module Inference
|
24
24
|
module Actions
|
25
25
|
# Get 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
26
|
#
|
31
27
|
# @option arguments [String] :task_type The task type
|
32
28
|
# @option arguments [String] :inference_id The inference Id
|
@@ -23,10 +23,6 @@ module ElasticsearchServerless
|
|
23
23
|
module Inference
|
24
24
|
module Actions
|
25
25
|
# Perform inference on the service
|
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
26
|
#
|
31
27
|
# @option arguments [String] :task_type The task type
|
32
28
|
# @option arguments [String] :inference_id The inference Id (*Required*)
|
@@ -23,10 +23,6 @@ module ElasticsearchServerless
|
|
23
23
|
module Inference
|
24
24
|
module Actions
|
25
25
|
# Create 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
26
|
#
|
31
27
|
# @option arguments [String] :task_type The task type
|
32
28
|
# @option arguments [String] :inference_id The inference Id (*Required*)
|
@@ -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 commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module MachineLearning
|
24
|
+
module Actions
|
25
|
+
# Evaluate a trained model.
|
26
|
+
#
|
27
|
+
# @option arguments [String] :model_id The unique identifier of the trained model. (*Required*)
|
28
|
+
# @option arguments [Time] :timeout Controls the amount of time to wait for inference results. Server default: 10s.
|
29
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
30
|
+
# @option arguments [Hash] :body request body
|
31
|
+
#
|
32
|
+
# *Deprecation notice*:
|
33
|
+
# /_ml/trained_models/{model_id}/deployment/_infer is deprecated. Use /_ml/trained_models/{model_id}/_infer instead
|
34
|
+
# Deprecated since version 8.3.0
|
35
|
+
#
|
36
|
+
#
|
37
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/infer-trained-model.html
|
38
|
+
#
|
39
|
+
def infer_trained_model(arguments = {})
|
40
|
+
request_opts = { endpoint: arguments[:endpoint] || "ml.infer_trained_model" }
|
41
|
+
|
42
|
+
defined_params = [:model_id].inject({}) do |set_variables, variable|
|
43
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
44
|
+
set_variables
|
45
|
+
end
|
46
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
47
|
+
|
48
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
49
|
+
raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id]
|
50
|
+
|
51
|
+
arguments = arguments.clone
|
52
|
+
headers = arguments.delete(:headers) || {}
|
53
|
+
|
54
|
+
body = arguments.delete(:body)
|
55
|
+
|
56
|
+
_model_id = arguments.delete(:model_id)
|
57
|
+
|
58
|
+
method = ElasticsearchServerless::API::HTTP_POST
|
59
|
+
path = "_ml/trained_models/#{Utils.listify(_model_id)}/_infer"
|
60
|
+
params = Utils.process_params(arguments)
|
61
|
+
|
62
|
+
ElasticsearchServerless::API::Response.new(
|
63
|
+
perform_request(method, path, params, body, headers, request_opts)
|
64
|
+
)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -26,12 +26,12 @@ module ElasticsearchServerless
|
|
26
26
|
# Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job.
|
27
27
|
# You can associate only one datafeed with each anomaly detection job.
|
28
28
|
# The datafeed contains a query that runs at a defined interval (+frequency+).
|
29
|
-
# If you are concerned about delayed data, you can add a delay (+query_delay
|
29
|
+
# If you are concerned about delayed data, you can add a delay (+query_delay+) at each interval.
|
30
30
|
# When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had
|
31
31
|
# at the time of creation and runs the query using those same roles. If you provide secondary authorization headers,
|
32
32
|
# those credentials are used instead.
|
33
33
|
# You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed
|
34
|
-
# directly to the+.ml-config+index. Do not give users+write+privileges on the+.ml-config
|
34
|
+
# directly to the +.ml-config+ index. Do not give users +write+ privileges on the +.ml-config+ index.
|
35
35
|
#
|
36
36
|
# @option arguments [String] :datafeed_id A numerical character string that uniquely identifies the datafeed.
|
37
37
|
# This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.
|
@@ -21,7 +21,10 @@
|
|
21
21
|
module ElasticsearchServerless
|
22
22
|
module API
|
23
23
|
module Actions
|
24
|
-
#
|
24
|
+
# Get multiple documents.
|
25
|
+
# Get multiple JSON documents by ID from one or more indices.
|
26
|
+
# If you specify an index in the request URI, you only need to specify the document IDs in the request body.
|
27
|
+
# To ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.
|
25
28
|
#
|
26
29
|
# @option arguments [String] :index Name of the index to retrieve documents from when +ids+ are specified, or when a document in the +docs+ array does not specify an index.
|
27
30
|
# @option arguments [Boolean] :force_synthetic_source Should this request force synthetic _source?
|
@@ -21,7 +21,17 @@
|
|
21
21
|
module ElasticsearchServerless
|
22
22
|
module API
|
23
23
|
module Actions
|
24
|
-
#
|
24
|
+
# Run multiple searches.
|
25
|
+
# The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format.
|
26
|
+
# The structure is as follows:
|
27
|
+
# header
|
28
|
+
# body
|
29
|
+
# header
|
30
|
+
# body
|
31
|
+
# This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node.
|
32
|
+
# IMPORTANT: The final line of data must end with a newline character +\n+.
|
33
|
+
# Each newline character may be preceded by a carriage return +\r+.
|
34
|
+
# When sending requests to this endpoint the +Content-Type+ header should be set to +application/x-ndjson+.
|
25
35
|
#
|
26
36
|
# @option arguments [String, Array] :index Comma-separated list of data streams, indices, and index aliases to search.
|
27
37
|
# @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.
|
@@ -21,7 +21,7 @@
|
|
21
21
|
module ElasticsearchServerless
|
22
22
|
module API
|
23
23
|
module Actions
|
24
|
-
#
|
24
|
+
# Run multiple templated searches.
|
25
25
|
#
|
26
26
|
# @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases to search.
|
27
27
|
# Supports wildcards (+*+).
|
@@ -21,7 +21,11 @@
|
|
21
21
|
module ElasticsearchServerless
|
22
22
|
module API
|
23
23
|
module Actions
|
24
|
-
#
|
24
|
+
# Get multiple term vectors.
|
25
|
+
# You can specify existing documents by index and ID or provide artificial documents in the body of the request.
|
26
|
+
# You can specify the index in the request body or request URI.
|
27
|
+
# The response contains a +docs+ array with all the fetched termvectors.
|
28
|
+
# Each element has the structure provided by the termvectors API.
|
25
29
|
#
|
26
30
|
# @option arguments [String] :index Name of the index that contains the documents.
|
27
31
|
# @option arguments [Array<String>] :ids A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body
|
@@ -21,12 +21,15 @@
|
|
21
21
|
module ElasticsearchServerless
|
22
22
|
module API
|
23
23
|
module Actions
|
24
|
-
#
|
24
|
+
# Open a point in time.
|
25
|
+
# A search request by default runs against the most recent visible data of the target indices,
|
25
26
|
# which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the
|
26
27
|
# state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple
|
27
28
|
# search requests using the same point in time. For example, if refreshes happen between
|
28
29
|
# +search_after+ requests, then the results of those requests might not be consistent as changes happening
|
29
30
|
# between searches are only visible to the more recent point in time.
|
31
|
+
# A point in time must be opened explicitly before being used in search requests.
|
32
|
+
# The +keep_alive+ parameter tells Elasticsearch how long it should persist.
|
30
33
|
#
|
31
34
|
# @option arguments [String, Array] :index A comma-separated list of index names to open point in time; use +_all+ or empty string to perform the operation on all indices (*Required*)
|
32
35
|
# @option arguments [Time] :keep_alive Extends the time to live of the corresponding point in time. (*Required*)
|
@@ -37,6 +40,8 @@ module ElasticsearchServerless
|
|
37
40
|
# @option arguments [String, Array<String>] :expand_wildcards Type of index that wildcard patterns can match.
|
38
41
|
# If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
|
39
42
|
# Supports comma-separated values, such as +open,hidden+. Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open.
|
43
|
+
# @option arguments [Boolean] :allow_partial_search_results If +false+, creating a point in time request when a shard is missing or unavailable will throw an exception.
|
44
|
+
# If +true+, the point in time will contain all the shards that are available at the time of the request.
|
40
45
|
# @option arguments [Hash] :headers Custom HTTP headers
|
41
46
|
# @option arguments [Hash] :body request body
|
42
47
|
#
|
@@ -0,0 +1,63 @@
|
|
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 QueryRules
|
24
|
+
module Actions
|
25
|
+
# Creates or updates a query ruleset.
|
26
|
+
#
|
27
|
+
# @option arguments [String] :ruleset_id The unique identifier of the query ruleset to be created or updated (*Required*)
|
28
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
29
|
+
# @option arguments [Hash] :body request body
|
30
|
+
#
|
31
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/test-query-ruleset.html
|
32
|
+
#
|
33
|
+
def test(arguments = {})
|
34
|
+
request_opts = { endpoint: arguments[:endpoint] || "query_rules.test" }
|
35
|
+
|
36
|
+
defined_params = [:ruleset_id].inject({}) do |set_variables, variable|
|
37
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
38
|
+
set_variables
|
39
|
+
end
|
40
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
41
|
+
|
42
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
43
|
+
raise ArgumentError, "Required argument 'ruleset_id' missing" unless arguments[:ruleset_id]
|
44
|
+
|
45
|
+
arguments = arguments.clone
|
46
|
+
headers = arguments.delete(:headers) || {}
|
47
|
+
|
48
|
+
body = arguments.delete(:body)
|
49
|
+
|
50
|
+
_ruleset_id = arguments.delete(:ruleset_id)
|
51
|
+
|
52
|
+
method = ElasticsearchServerless::API::HTTP_POST
|
53
|
+
path = "_query_rules/#{Utils.listify(_ruleset_id)}/_test"
|
54
|
+
params = {}
|
55
|
+
|
56
|
+
ElasticsearchServerless::API::Response.new(
|
57
|
+
perform_request(method, path, params, body, headers, request_opts)
|
58
|
+
)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -21,7 +21,8 @@
|
|
21
21
|
module ElasticsearchServerless
|
22
22
|
module API
|
23
23
|
module Actions
|
24
|
-
#
|
24
|
+
# Evaluate ranked search results.
|
25
|
+
# Evaluate the quality of ranked search results over a set of typical search queries.
|
25
26
|
#
|
26
27
|
# @option arguments [String, Array] :index Comma-separated list of data streams, indices, and index aliases used to limit the request. Wildcard (+*+) expressions are supported.
|
27
28
|
# To target all data streams and indices in a cluster, omit this parameter or use +_all+ or +*+.
|
@@ -21,7 +21,8 @@
|
|
21
21
|
module ElasticsearchServerless
|
22
22
|
module API
|
23
23
|
module Actions
|
24
|
-
#
|
24
|
+
# Render a search template.
|
25
|
+
# Render a search template as a search request body.
|
25
26
|
#
|
26
27
|
# @option arguments [String] :id ID of the search template to render.
|
27
28
|
# If no +source+ is specified, this or the +id+ request body parameter is required.
|
@@ -21,7 +21,16 @@
|
|
21
21
|
module ElasticsearchServerless
|
22
22
|
module API
|
23
23
|
module Actions
|
24
|
-
#
|
24
|
+
# Run a scrolling search.
|
25
|
+
# IMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the +search_after+ parameter with a point in time (PIT).
|
26
|
+
# The scroll API gets large sets of results from a single scrolling search request.
|
27
|
+
# To get the necessary scroll ID, submit a search API request that includes an argument for the +scroll+ query parameter.
|
28
|
+
# The +scroll+ parameter indicates how long Elasticsearch should retain the search context for the request.
|
29
|
+
# The search response returns a scroll ID in the +_scroll_id+ response body parameter.
|
30
|
+
# You can then use the scroll ID with the scroll API to retrieve the next batch of results for the request.
|
31
|
+
# If the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search.
|
32
|
+
# You can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context.
|
33
|
+
# IMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests.
|
25
34
|
#
|
26
35
|
# @option arguments [String] :scroll_id The scroll ID
|
27
36
|
# @option arguments [Time] :scroll Period to retain the search context for scrolling. Server default: 1d.
|
@@ -39,12 +48,6 @@ module ElasticsearchServerless
|
|
39
48
|
def scroll(arguments = {})
|
40
49
|
request_opts = { endpoint: arguments[:endpoint] || "scroll" }
|
41
50
|
|
42
|
-
defined_params = [:scroll_id].inject({}) do |set_variables, variable|
|
43
|
-
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
44
|
-
set_variables
|
45
|
-
end
|
46
|
-
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
47
|
-
|
48
51
|
arguments = arguments.clone
|
49
52
|
headers = arguments.delete(:headers) || {}
|
50
53
|
|
@@ -58,11 +61,7 @@ module ElasticsearchServerless
|
|
58
61
|
ElasticsearchServerless::API::HTTP_GET
|
59
62
|
end
|
60
63
|
|
61
|
-
path =
|
62
|
-
"_search/scroll/#{Utils.listify(_scroll_id)}"
|
63
|
-
else
|
64
|
-
"_search/scroll"
|
65
|
-
end
|
64
|
+
path = "_search/scroll"
|
66
65
|
params = Utils.process_params(arguments)
|
67
66
|
|
68
67
|
ElasticsearchServerless::API::Response.new(
|
@@ -21,7 +21,8 @@
|
|
21
21
|
module ElasticsearchServerless
|
22
22
|
module API
|
23
23
|
module Actions
|
24
|
-
#
|
24
|
+
# Run a search.
|
25
|
+
# Get search hits that match the query defined in the request.
|
25
26
|
# You can provide search queries using the +q+ query string parameter or the request body.
|
26
27
|
# If both are specified, only the query parameter is used.
|
27
28
|
#
|
@@ -60,8 +61,6 @@ module ElasticsearchServerless
|
|
60
61
|
# This parameter can only be used when the +q+ query string parameter is specified.
|
61
62
|
# @option arguments [Integer] :max_concurrent_shard_requests Defines the number of concurrent shard requests per node this search executes concurrently.
|
62
63
|
# This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests. Server default: 5.
|
63
|
-
# @option arguments [String] :min_compatible_shard_node The minimum version of the node that can handle the request
|
64
|
-
# Any handling node with a lower version will fail the request.
|
65
64
|
# @option arguments [String] :preference Nodes and shards used for the search.
|
66
65
|
# By default, Elasticsearch selects from eligible nodes and shards using adaptive replica selection, accounting for allocation awareness. Valid values are:
|
67
66
|
# +_only_local+ to run the search only on shards on the local node;
|
@@ -22,7 +22,7 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Actions
|
24
24
|
# Search a vector tile.
|
25
|
-
#
|
25
|
+
# Search a vector tile for geospatial values.
|
26
26
|
#
|
27
27
|
# @option arguments [String, Array] :index Comma-separated list of data streams, indices, or aliases to search (*Required*)
|
28
28
|
# @option arguments [String] :field Field containing geospatial data to return (*Required*)
|
@@ -21,7 +21,7 @@
|
|
21
21
|
module ElasticsearchServerless
|
22
22
|
module API
|
23
23
|
module Actions
|
24
|
-
#
|
24
|
+
# Run a search with a search template.
|
25
25
|
#
|
26
26
|
# @option arguments [String, Array] :index Comma-separated list of data streams, indices,
|
27
27
|
# and aliases to search. Supports wildcards (*).
|
@@ -23,7 +23,7 @@ module ElasticsearchServerless
|
|
23
23
|
module Security
|
24
24
|
module Actions
|
25
25
|
# Create an API key.
|
26
|
-
#
|
26
|
+
# Create an API key for access without requiring basic authentication.
|
27
27
|
# A successful request returns a JSON structure that contains the API key, its unique id, and its name.
|
28
28
|
# If applicable, it also returns expiration information for the API key in milliseconds.
|
29
29
|
# NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys.
|
data/lib/elasticsearch-serverless/api/{indices/delete_data_lifecycle.rb → security/delete_role.rb}
RENAMED
@@ -20,21 +20,19 @@
|
|
20
20
|
#
|
21
21
|
module ElasticsearchServerless
|
22
22
|
module API
|
23
|
-
module
|
23
|
+
module Security
|
24
24
|
module Actions
|
25
|
-
# Delete
|
26
|
-
#
|
25
|
+
# Delete roles.
|
26
|
+
# Delete roles in the native realm.
|
27
27
|
#
|
28
|
-
# @option arguments [String
|
29
|
-
# @option arguments [String
|
30
|
-
# @option arguments [Time] :master_timeout Specify timeout for connection to master
|
31
|
-
# @option arguments [Time] :timeout Explicit timestamp for the document
|
28
|
+
# @option arguments [String] :name Role name (*Required*)
|
29
|
+
# @option arguments [String] :refresh If +true+ (the default) then refresh the affected shards to make this operation visible to search, if +wait_for+ then wait for a refresh to make this operation visible to search, if +false+ then do nothing with refreshes.
|
32
30
|
# @option arguments [Hash] :headers Custom HTTP headers
|
33
31
|
#
|
34
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/
|
32
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html
|
35
33
|
#
|
36
|
-
def
|
37
|
-
request_opts = { endpoint: arguments[:endpoint] || "
|
34
|
+
def delete_role(arguments = {})
|
35
|
+
request_opts = { endpoint: arguments[:endpoint] || "security.delete_role" }
|
38
36
|
|
39
37
|
defined_params = [:name].inject({}) do |set_variables, variable|
|
40
38
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
@@ -52,7 +50,7 @@ module ElasticsearchServerless
|
|
52
50
|
_name = arguments.delete(:name)
|
53
51
|
|
54
52
|
method = ElasticsearchServerless::API::HTTP_DELETE
|
55
|
-
path = "
|
53
|
+
path = "_security/role/#{Utils.listify(_name)}"
|
56
54
|
params = Utils.process_params(arguments)
|
57
55
|
|
58
56
|
ElasticsearchServerless::API::Response.new(
|
data/lib/elasticsearch-serverless/api/{enrich/stats.rb → security/get_builtin_privileges.rb}
RENAMED
@@ -20,17 +20,17 @@
|
|
20
20
|
#
|
21
21
|
module ElasticsearchServerless
|
22
22
|
module API
|
23
|
-
module
|
23
|
+
module Security
|
24
24
|
module Actions
|
25
|
-
# Get
|
26
|
-
#
|
25
|
+
# Get builtin privileges.
|
26
|
+
# Get the list of cluster privileges and index privileges that are available in this version of Elasticsearch.
|
27
27
|
#
|
28
28
|
# @option arguments [Hash] :headers Custom HTTP headers
|
29
29
|
#
|
30
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/
|
30
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-builtin-privileges.html
|
31
31
|
#
|
32
|
-
def
|
33
|
-
request_opts = { endpoint: arguments[:endpoint] || "
|
32
|
+
def get_builtin_privileges(arguments = {})
|
33
|
+
request_opts = { endpoint: arguments[:endpoint] || "security.get_builtin_privileges" }
|
34
34
|
|
35
35
|
arguments = arguments.clone
|
36
36
|
headers = arguments.delete(:headers) || {}
|
@@ -38,7 +38,7 @@ module ElasticsearchServerless
|
|
38
38
|
body = nil
|
39
39
|
|
40
40
|
method = ElasticsearchServerless::API::HTTP_GET
|
41
|
-
path = "
|
41
|
+
path = "_security/privilege/_builtin"
|
42
42
|
params = {}
|
43
43
|
|
44
44
|
ElasticsearchServerless::API::Response.new(
|
@@ -0,0 +1,72 @@
|
|
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 Security
|
24
|
+
module Actions
|
25
|
+
# Get roles.
|
26
|
+
# Get roles in the native realm.
|
27
|
+
#
|
28
|
+
# @option arguments [String, Array<String>] :name The name of the role. You can specify multiple roles as a comma-separated list. If you do not specify this parameter, the API returns information about all roles.
|
29
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
30
|
+
#
|
31
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html
|
32
|
+
#
|
33
|
+
def get_role(arguments = {})
|
34
|
+
request_opts = { endpoint: arguments[:endpoint] || "security.get_role" }
|
35
|
+
|
36
|
+
defined_params = [:name].inject({}) do |set_variables, variable|
|
37
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
38
|
+
set_variables
|
39
|
+
end
|
40
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
41
|
+
|
42
|
+
arguments = arguments.clone
|
43
|
+
headers = arguments.delete(:headers) || {}
|
44
|
+
|
45
|
+
body = nil
|
46
|
+
|
47
|
+
_name = arguments.delete(:name)
|
48
|
+
|
49
|
+
method = ElasticsearchServerless::API::HTTP_GET
|
50
|
+
path = if _name
|
51
|
+
"_security/role/#{Utils.listify(_name)}"
|
52
|
+
else
|
53
|
+
"_security/role"
|
54
|
+
end
|
55
|
+
params = Utils.process_params(arguments)
|
56
|
+
|
57
|
+
if Array(arguments[:ignore]).include?(404)
|
58
|
+
Utils.rescue_from_not_found {
|
59
|
+
ElasticsearchServerless::API::Response.new(
|
60
|
+
perform_request(method, path, params, body, headers, request_opts)
|
61
|
+
)
|
62
|
+
}
|
63
|
+
else
|
64
|
+
ElasticsearchServerless::API::Response.new(
|
65
|
+
perform_request(method, path, params, body, headers, request_opts)
|
66
|
+
)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
@@ -23,7 +23,7 @@ module ElasticsearchServerless
|
|
23
23
|
module Security
|
24
24
|
module Actions
|
25
25
|
# Check user privileges.
|
26
|
-
#
|
26
|
+
# Determine whether the specified user has a specified list of privileges.
|
27
27
|
#
|
28
28
|
# @option arguments [String] :user Username
|
29
29
|
# @option arguments [Hash] :headers Custom HTTP headers
|
@@ -23,13 +23,14 @@ module ElasticsearchServerless
|
|
23
23
|
module Security
|
24
24
|
module Actions
|
25
25
|
# Invalidate API keys.
|
26
|
-
#
|
26
|
+
# This API invalidates API keys created by the create API key or grant API key APIs.
|
27
|
+
# Invalidated API keys fail authentication, but they can still be viewed using the get API key information and query API key information APIs, for at least the configured retention period, until they are automatically deleted.
|
27
28
|
# The +manage_api_key+ privilege allows deleting any API keys.
|
28
29
|
# The +manage_own_api_key+ only allows deleting API keys that are owned by the user.
|
29
30
|
# In addition, with the +manage_own_api_key+ privilege, an invalidation request must be issued in one of the three formats:
|
30
31
|
# - Set the parameter +owner=true+.
|
31
32
|
# - Or, set both +username+ and +realm_name+ to match the user’s identity.
|
32
|
-
# - Or, if the request is issued by an API key,
|
33
|
+
# - Or, if the request is issued by an API key, that is to say an API key invalidates itself, specify its ID in the +ids+ field.
|
33
34
|
#
|
34
35
|
# @option arguments [Hash] :headers Custom HTTP headers
|
35
36
|
# @option arguments [Hash] :body request body
|