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
@@ -0,0 +1,67 @@
|
|
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
|
+
# Create or update roles.
|
26
|
+
# The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management.
|
27
|
+
# The create or update roles API cannot update roles that are defined in roles files.
|
28
|
+
# File-based role management is not available in Elastic Serverless.
|
29
|
+
#
|
30
|
+
# @option arguments [String] :name The name of the role that is being created or updated. On Elasticsearch Serverless, the role name must begin with a letter or digit and can only contain letters, digits and the characters '_', '-', and '.'. Each role must have a unique name, as this will serve as the identifier for that role. (*Required*)
|
31
|
+
# @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
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
33
|
+
# @option arguments [Hash] :body request body
|
34
|
+
#
|
35
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html
|
36
|
+
#
|
37
|
+
def put_role(arguments = {})
|
38
|
+
request_opts = { endpoint: arguments[:endpoint] || "security.put_role" }
|
39
|
+
|
40
|
+
defined_params = [:name].inject({}) do |set_variables, variable|
|
41
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
42
|
+
set_variables
|
43
|
+
end
|
44
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
45
|
+
|
46
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
47
|
+
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
48
|
+
|
49
|
+
arguments = arguments.clone
|
50
|
+
headers = arguments.delete(:headers) || {}
|
51
|
+
|
52
|
+
body = arguments.delete(:body)
|
53
|
+
|
54
|
+
_name = arguments.delete(:name)
|
55
|
+
|
56
|
+
method = ElasticsearchServerless::API::HTTP_PUT
|
57
|
+
path = "_security/role/#{Utils.listify(_name)}"
|
58
|
+
params = Utils.process_params(arguments)
|
59
|
+
|
60
|
+
ElasticsearchServerless::API::Response.new(
|
61
|
+
perform_request(method, path, params, body, headers, request_opts)
|
62
|
+
)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -22,8 +22,8 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Security
|
24
24
|
module Actions
|
25
|
-
#
|
26
|
-
#
|
25
|
+
# Find API keys with a query.
|
26
|
+
# Get a paginated list of API keys and their information. You can optionally filter the results with a query.
|
27
27
|
#
|
28
28
|
# @option arguments [Boolean] :with_limited_by Return the snapshot of the owner user's role descriptors associated with the API key.
|
29
29
|
# An API key's actual permission is the intersection of its assigned role descriptors and the owner user's role descriptors.
|
@@ -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 Tasks
|
24
|
+
module Actions
|
25
|
+
# Get task information.
|
26
|
+
# Returns information about the tasks currently executing in the cluster.
|
27
|
+
# This functionality is Experimental and may be changed or removed
|
28
|
+
# completely in a future release. Elastic will take a best effort approach
|
29
|
+
# to fix any issues, but experimental features are not subject to the
|
30
|
+
# support SLA of official GA features.
|
31
|
+
#
|
32
|
+
# @option arguments [String] :task_id ID of the task. (*Required*)
|
33
|
+
# @option arguments [Time] :timeout Period to wait for a response.
|
34
|
+
# If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
35
|
+
# @option arguments [Boolean] :wait_for_completion If +true+, the request blocks until the task has completed.
|
36
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
37
|
+
#
|
38
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html
|
39
|
+
#
|
40
|
+
def get(arguments = {})
|
41
|
+
request_opts = { endpoint: arguments[:endpoint] || "tasks.get" }
|
42
|
+
|
43
|
+
defined_params = [:task_id].inject({}) do |set_variables, variable|
|
44
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
45
|
+
set_variables
|
46
|
+
end
|
47
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
48
|
+
|
49
|
+
raise ArgumentError, "Required argument 'task_id' missing" unless arguments[:task_id]
|
50
|
+
|
51
|
+
arguments = arguments.clone
|
52
|
+
headers = arguments.delete(:headers) || {}
|
53
|
+
|
54
|
+
body = nil
|
55
|
+
|
56
|
+
_task_id = arguments.delete(:task_id)
|
57
|
+
|
58
|
+
method = ElasticsearchServerless::API::HTTP_GET
|
59
|
+
path = "_tasks/#{Utils.listify(_task_id)}"
|
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
|
@@ -21,7 +21,12 @@
|
|
21
21
|
module ElasticsearchServerless
|
22
22
|
module API
|
23
23
|
module Actions
|
24
|
-
#
|
24
|
+
# Get terms in an index.
|
25
|
+
# Discover terms that match a partial string in an index.
|
26
|
+
# This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios.
|
27
|
+
# If the +complete+ property in the response is false, the returned terms set may be incomplete and should be treated as approximate.
|
28
|
+
# This can occur due to a few reasons, such as a request timeout or a node error.
|
29
|
+
# NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents.
|
25
30
|
#
|
26
31
|
# @option arguments [String] :index Comma-separated list of data streams, indices, and index aliases to search. Wildcard (*) expressions are supported. (*Required*)
|
27
32
|
# @option arguments [Hash] :headers Custom HTTP headers
|
@@ -22,7 +22,7 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Actions
|
24
24
|
# Get term vector information.
|
25
|
-
#
|
25
|
+
# Get information and statistics about terms in the fields of a particular document.
|
26
26
|
#
|
27
27
|
# @option arguments [String] :index Name of the index that contains the document. (*Required*)
|
28
28
|
# @option arguments [String] :id Unique identifier of the document.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elasticsearch-serverless
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fernando Briano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: elastic-transport
|
@@ -87,7 +87,6 @@ files:
|
|
87
87
|
- lib/elasticsearch-serverless/api/enrich/execute_policy.rb
|
88
88
|
- lib/elasticsearch-serverless/api/enrich/get_policy.rb
|
89
89
|
- lib/elasticsearch-serverless/api/enrich/put_policy.rb
|
90
|
-
- lib/elasticsearch-serverless/api/enrich/stats.rb
|
91
90
|
- lib/elasticsearch-serverless/api/eql/delete.rb
|
92
91
|
- lib/elasticsearch-serverless/api/eql/get.rb
|
93
92
|
- lib/elasticsearch-serverless/api/eql/get_status.rb
|
@@ -107,7 +106,6 @@ files:
|
|
107
106
|
- lib/elasticsearch-serverless/api/indices/create_data_stream.rb
|
108
107
|
- lib/elasticsearch-serverless/api/indices/delete.rb
|
109
108
|
- lib/elasticsearch-serverless/api/indices/delete_alias.rb
|
110
|
-
- lib/elasticsearch-serverless/api/indices/delete_data_lifecycle.rb
|
111
109
|
- lib/elasticsearch-serverless/api/indices/delete_data_stream.rb
|
112
110
|
- lib/elasticsearch-serverless/api/indices/delete_index_template.rb
|
113
111
|
- lib/elasticsearch-serverless/api/indices/exists.rb
|
@@ -174,6 +172,7 @@ files:
|
|
174
172
|
- lib/elasticsearch-serverless/api/machine_learning/get_overall_buckets.rb
|
175
173
|
- lib/elasticsearch-serverless/api/machine_learning/get_trained_models.rb
|
176
174
|
- lib/elasticsearch-serverless/api/machine_learning/get_trained_models_stats.rb
|
175
|
+
- lib/elasticsearch-serverless/api/machine_learning/infer_trained_model.rb
|
177
176
|
- lib/elasticsearch-serverless/api/machine_learning/open_job.rb
|
178
177
|
- lib/elasticsearch-serverless/api/machine_learning/post_calendar_events.rb
|
179
178
|
- lib/elasticsearch-serverless/api/machine_learning/preview_data_frame_analytics.rb
|
@@ -214,6 +213,7 @@ files:
|
|
214
213
|
- lib/elasticsearch-serverless/api/query_rules/list_rulesets.rb
|
215
214
|
- lib/elasticsearch-serverless/api/query_rules/put_rule.rb
|
216
215
|
- lib/elasticsearch-serverless/api/query_rules/put_ruleset.rb
|
216
|
+
- lib/elasticsearch-serverless/api/query_rules/test.rb
|
217
217
|
- lib/elasticsearch-serverless/api/rank_eval.rb
|
218
218
|
- lib/elasticsearch-serverless/api/reindex.rb
|
219
219
|
- lib/elasticsearch-serverless/api/render_search_template.rb
|
@@ -233,9 +233,13 @@ files:
|
|
233
233
|
- lib/elasticsearch-serverless/api/search_template.rb
|
234
234
|
- lib/elasticsearch-serverless/api/security/authenticate.rb
|
235
235
|
- lib/elasticsearch-serverless/api/security/create_api_key.rb
|
236
|
+
- lib/elasticsearch-serverless/api/security/delete_role.rb
|
236
237
|
- lib/elasticsearch-serverless/api/security/get_api_key.rb
|
238
|
+
- lib/elasticsearch-serverless/api/security/get_builtin_privileges.rb
|
239
|
+
- lib/elasticsearch-serverless/api/security/get_role.rb
|
237
240
|
- lib/elasticsearch-serverless/api/security/has_privileges.rb
|
238
241
|
- lib/elasticsearch-serverless/api/security/invalidate_api_key.rb
|
242
|
+
- lib/elasticsearch-serverless/api/security/put_role.rb
|
239
243
|
- lib/elasticsearch-serverless/api/security/query_api_keys.rb
|
240
244
|
- lib/elasticsearch-serverless/api/sql/clear_cursor.rb
|
241
245
|
- lib/elasticsearch-serverless/api/sql/delete_async.rb
|
@@ -250,6 +254,7 @@ files:
|
|
250
254
|
- lib/elasticsearch-serverless/api/synonyms/get_synonyms_sets.rb
|
251
255
|
- lib/elasticsearch-serverless/api/synonyms/put_synonym.rb
|
252
256
|
- lib/elasticsearch-serverless/api/synonyms/put_synonym_rule.rb
|
257
|
+
- lib/elasticsearch-serverless/api/tasks/get.rb
|
253
258
|
- lib/elasticsearch-serverless/api/terms_enum.rb
|
254
259
|
- lib/elasticsearch-serverless/api/termvectors.rb
|
255
260
|
- lib/elasticsearch-serverless/api/transform/delete_transform.rb
|
@@ -285,7 +290,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
285
290
|
- !ruby/object:Gem::Version
|
286
291
|
version: '0'
|
287
292
|
requirements: []
|
288
|
-
rubygems_version: 3.5.
|
293
|
+
rubygems_version: 3.5.20
|
289
294
|
signing_key:
|
290
295
|
specification_version: 4
|
291
296
|
summary: Elasticsearch Serverless Client
|