elasticsearch-serverless 0.0.8.20231031.pre → 0.1.0.20231031.pre
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/eql/get.rb +1 -1
- data/lib/elasticsearch-serverless/api/eql/get_status.rb +1 -1
- data/lib/elasticsearch-serverless/api/indices/delete_index_template.rb +1 -1
- data/lib/elasticsearch-serverless/api/indices/exists_index_template.rb +1 -1
- data/lib/elasticsearch-serverless/api/indices/get_index_template.rb +1 -1
- data/lib/elasticsearch-serverless/api/indices/put_index_template.rb +1 -1
- data/lib/elasticsearch-serverless/api/indices/simulate_index_template.rb +1 -1
- data/lib/elasticsearch-serverless/api/indices/simulate_template.rb +1 -1
- data/lib/elasticsearch-serverless/api/machine_learning/start_trained_model_deployment.rb +1 -0
- data/lib/elasticsearch-serverless/api/search_application/delete.rb +1 -1
- data/lib/elasticsearch-serverless/api/synonyms/delete_synonym.rb +0 -4
- data/lib/elasticsearch-serverless/api/synonyms/delete_synonym_rule.rb +0 -4
- data/lib/elasticsearch-serverless/api/synonyms/get_synonym.rb +0 -4
- data/lib/elasticsearch-serverless/api/synonyms/get_synonym_rule.rb +0 -4
- data/lib/elasticsearch-serverless/api/synonyms/get_synonyms_sets.rb +0 -4
- data/lib/elasticsearch-serverless/api/synonyms/put_synonym.rb +0 -4
- data/lib/elasticsearch-serverless/api/synonyms/put_synonym_rule.rb +0 -4
- data/lib/elasticsearch-serverless/api/transform/delete_transform.rb +1 -0
- data/lib/elasticsearch-serverless/api.rb +4 -3
- data/lib/elasticsearch-serverless/version.rb +3 -3
- data/lib/elasticsearch-serverless.rb +3 -4
- metadata +5 -9
- data/lib/elasticsearch-serverless/api/indices/put_template.rb +0 -60
- data/lib/elasticsearch-serverless/api/machine_learning/infer_trained_model.rb +0 -63
- data/lib/elasticsearch-serverless/api/security/update_api_key.rb +0 -54
- data/lib/elasticsearch-serverless/api/tasks/get.rb +0 -57
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c9b9517cbe9ed2b4dff59ac559f8e0b91e820479ad486ed6fc4397ae970033c
|
4
|
+
data.tar.gz: 0342a7ee417d26b506af13093f6e3194fb5d3433e8091579ade28b8389c0042c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 546f51170bd9756ef58ad11e98d8e6ba7c2ffc5f897c095779c3beff85ed084c712aebdf5ae7fb0373dcc09985fad6d1bc7443931912c2213a02ac58573f1aaa
|
7
|
+
data.tar.gz: 4aee469710a57647663b34301f48893185ab035ed1c260577e788d67a4405c2ab31bd322495ffaac9cd7f452d71c64b749bef04aa9caeb6efe8b7e66e8936a3f
|
@@ -29,7 +29,7 @@ module ElasticsearchServerless
|
|
29
29
|
# @option arguments [Time] :wait_for_completion_timeout Timeout duration to wait for the request to finish. Defaults to no timeout, meaning the request waits for complete search results.
|
30
30
|
# @option arguments [Hash] :headers Custom HTTP headers
|
31
31
|
#
|
32
|
-
# @see
|
32
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-async-eql-search-api.html
|
33
33
|
#
|
34
34
|
def get(arguments = {})
|
35
35
|
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
@@ -27,7 +27,7 @@ module ElasticsearchServerless
|
|
27
27
|
# @option arguments [String] :id Identifier for the search. (*Required*)
|
28
28
|
# @option arguments [Hash] :headers Custom HTTP headers
|
29
29
|
#
|
30
|
-
# @see
|
30
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-async-eql-status-api.html
|
31
31
|
#
|
32
32
|
def get_status(arguments = {})
|
33
33
|
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
@@ -29,7 +29,7 @@ module ElasticsearchServerless
|
|
29
29
|
# @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
30
30
|
# @option arguments [Hash] :headers Custom HTTP headers
|
31
31
|
#
|
32
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-
|
32
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-template.html
|
33
33
|
#
|
34
34
|
def delete_index_template(arguments = {})
|
35
35
|
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
@@ -28,7 +28,7 @@ module ElasticsearchServerless
|
|
28
28
|
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
29
29
|
# @option arguments [Hash] :headers Custom HTTP headers
|
30
30
|
#
|
31
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/
|
31
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/index-templates.html
|
32
32
|
#
|
33
33
|
def exists_index_template(arguments = {})
|
34
34
|
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
@@ -31,7 +31,7 @@ module ElasticsearchServerless
|
|
31
31
|
# @option arguments [Boolean] :include_defaults If true, returns all relevant default configurations for the index template.
|
32
32
|
# @option arguments [Hash] :headers Custom HTTP headers
|
33
33
|
#
|
34
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-
|
34
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-template.html
|
35
35
|
#
|
36
36
|
def get_index_template(arguments = {})
|
37
37
|
arguments = arguments.clone
|
@@ -29,7 +29,7 @@ module ElasticsearchServerless
|
|
29
29
|
# @option arguments [Hash] :headers Custom HTTP headers
|
30
30
|
# @option arguments [Hash] :body request body
|
31
31
|
#
|
32
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-
|
32
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-template.html
|
33
33
|
#
|
34
34
|
def put_index_template(arguments = {})
|
35
35
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
@@ -31,7 +31,7 @@ module ElasticsearchServerless
|
|
31
31
|
# @option arguments [Hash] :headers Custom HTTP headers
|
32
32
|
# @option arguments [Hash] :body request body
|
33
33
|
#
|
34
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-
|
34
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-index.html
|
35
35
|
#
|
36
36
|
def simulate_index_template(arguments = {})
|
37
37
|
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
@@ -31,7 +31,7 @@ module ElasticsearchServerless
|
|
31
31
|
# @option arguments [Hash] :headers Custom HTTP headers
|
32
32
|
# @option arguments [Hash] :body template
|
33
33
|
#
|
34
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-
|
34
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-template.html
|
35
35
|
#
|
36
36
|
def simulate_template(arguments = {})
|
37
37
|
arguments = arguments.clone
|
@@ -26,6 +26,7 @@ module ElasticsearchServerless
|
|
26
26
|
#
|
27
27
|
# @option arguments [String] :model_id The unique identifier of the trained model. Currently, only PyTorch models are supported. (*Required*)
|
28
28
|
# @option arguments [Integer, String] :cache_size The inference cache size (in memory outside the JVM heap) per node for the model. The default value is the same size as the +model_size_bytes+. To disable the cache, +0b+ can be provided.
|
29
|
+
# @option arguments [String] :deployment_id A unique identifier for the deployment of the model.
|
29
30
|
# @option arguments [Integer] :number_of_allocations The number of model allocations on each node where the model is deployed. All allocations on a node share the same copy of the model in memory but use a separate set of threads to evaluate the model. Increasing this value generally increases the throughput. If this setting is greater than the number of hardware threads it will automatically be changed to a value less than the number of hardware threads. Server default: 1.
|
30
31
|
# @option arguments [String] :priority The deployment priority.
|
31
32
|
# @option arguments [Integer] :queue_capacity Specifies the number of inference requests that are allowed in the queue. After the number of requests exceeds this value, new requests are rejected with a 429 error. Server default: 1024.
|
@@ -31,7 +31,7 @@ module ElasticsearchServerless
|
|
31
31
|
# @option arguments [String] :name The name of the search application to delete (*Required*)
|
32
32
|
# @option arguments [Hash] :headers Custom HTTP headers
|
33
33
|
#
|
34
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/
|
34
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-search-application.html
|
35
35
|
#
|
36
36
|
def delete(arguments = {})
|
37
37
|
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
@@ -23,10 +23,6 @@ module ElasticsearchServerless
|
|
23
23
|
module Synonyms
|
24
24
|
module Actions
|
25
25
|
# Deletes a synonym set
|
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] :id The id of the synonyms set to be deleted (*Required*)
|
32
28
|
# @option arguments [Hash] :headers Custom HTTP headers
|
@@ -23,10 +23,6 @@ module ElasticsearchServerless
|
|
23
23
|
module Synonyms
|
24
24
|
module Actions
|
25
25
|
# Deletes a synonym rule in a synonym set
|
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] :set_id The id of the synonym set to be updated (*Required*)
|
32
28
|
# @option arguments [String] :rule_id The id of the synonym rule to be deleted (*Required*)
|
@@ -23,10 +23,6 @@ module ElasticsearchServerless
|
|
23
23
|
module Synonyms
|
24
24
|
module Actions
|
25
25
|
# Retrieves a synonym set
|
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] :id "The id of the synonyms set to be retrieved (*Required*)
|
32
28
|
# @option arguments [Integer] :from Starting offset for query rules to be retrieved Server default: 0.
|
@@ -23,10 +23,6 @@ module ElasticsearchServerless
|
|
23
23
|
module Synonyms
|
24
24
|
module Actions
|
25
25
|
# Retrieves a synonym rule from a synonym set
|
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] :set_id The id of the synonym set to retrieve the synonym rule from (*Required*)
|
32
28
|
# @option arguments [String] :rule_id The id of the synonym rule to retrieve (*Required*)
|
@@ -23,10 +23,6 @@ module ElasticsearchServerless
|
|
23
23
|
module Synonyms
|
24
24
|
module Actions
|
25
25
|
# Retrieves a summary of all defined synonym sets
|
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 [Integer] :from Starting offset Server default: 0.
|
32
28
|
# @option arguments [Integer] :size specifies a max number of results to get Server default: 10.
|
@@ -23,10 +23,6 @@ module ElasticsearchServerless
|
|
23
23
|
module Synonyms
|
24
24
|
module Actions
|
25
25
|
# Creates or updates a synonyms set
|
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] :id The id of the synonyms set to be created or updated (*Required*)
|
32
28
|
# @option arguments [Hash] :headers Custom HTTP headers
|
@@ -23,10 +23,6 @@ module ElasticsearchServerless
|
|
23
23
|
module Synonyms
|
24
24
|
module Actions
|
25
25
|
# Creates or updates a synonym rule in a synonym set
|
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] :set_id The id of the synonym set to be updated with the synonym rule (*Required*)
|
32
28
|
# @option arguments [String] :rule_id The id of the synonym rule to be updated or created (*Required*)
|
@@ -26,6 +26,7 @@ module ElasticsearchServerless
|
|
26
26
|
#
|
27
27
|
# @option arguments [String] :transform_id Identifier for the transform. (*Required*)
|
28
28
|
# @option arguments [Boolean] :force If this value is false, the transform must be stopped before it can be deleted. If true, the transform is deleted regardless of its current state.
|
29
|
+
# @option arguments [Boolean] :delete_dest_index If this value is true, the destination index is deleted together with the transform. If false, the destination index will not be deleted
|
29
30
|
# @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
30
31
|
# @option arguments [Hash] :headers Custom HTTP headers
|
31
32
|
#
|
@@ -66,19 +66,18 @@ module ElasticsearchServerless
|
|
66
66
|
:ingest,
|
67
67
|
:license,
|
68
68
|
:logstash,
|
69
|
+
:machine_learning,
|
70
|
+
:query_ruleset,
|
69
71
|
:search_application,
|
70
72
|
:security,
|
71
73
|
:sql,
|
72
74
|
:synonyms,
|
73
75
|
:transform
|
74
76
|
].freeze
|
75
|
-
|
76
77
|
UPPERCASE_APIS = ['sql'].freeze
|
77
78
|
|
78
79
|
API_NAMESPACES.each do |namespace|
|
79
80
|
name = namespace.to_s
|
80
|
-
# TODO: consider if we need to do something for APIs that have aliases (if any of these are
|
81
|
-
# available in serverless), like 'ccr', 'ilm', 'ml' and 'slm'
|
82
81
|
module_name = if UPPERCASE_APIS.include?(name)
|
83
82
|
name.upcase
|
84
83
|
else
|
@@ -94,5 +93,7 @@ module ElasticsearchServerless
|
|
94
93
|
instance_variable_set("@#{name}", klass.new(self))
|
95
94
|
end
|
96
95
|
end
|
96
|
+
# TODO: If there are more aliases, make this dynamic and add them to constant
|
97
|
+
alias :ml :machine_learning
|
97
98
|
end
|
98
99
|
end
|
@@ -16,7 +16,7 @@
|
|
16
16
|
# under the License.
|
17
17
|
|
18
18
|
module ElasticsearchServerless
|
19
|
-
API_VERSION = '
|
20
|
-
CLIENT_VERSION = '0.0
|
21
|
-
VERSION = "#{CLIENT_VERSION}.#{API_VERSION}.pre".freeze
|
19
|
+
API_VERSION = '2023-10-31'
|
20
|
+
CLIENT_VERSION = '0.1.0'
|
21
|
+
VERSION = "#{CLIENT_VERSION}.#{API_VERSION.split('-').join}.pre".freeze
|
22
22
|
end
|
@@ -51,6 +51,7 @@ module ElasticsearchServerless
|
|
51
51
|
transport_options: {
|
52
52
|
headers: {
|
53
53
|
'Authorization' => "ApiKey #{api_key}",
|
54
|
+
'Elastic-Api-Version' => ElasticsearchServerless::API_VERSION,
|
54
55
|
user_agent: user_agent
|
55
56
|
},
|
56
57
|
},
|
@@ -94,11 +95,9 @@ end
|
|
94
95
|
module Elastic
|
95
96
|
# If the version is X.X.X.pre/alpha/beta, use X.X.Xp for the meta-header:
|
96
97
|
def self.client_meta_version
|
97
|
-
|
98
|
-
match = ElasticsearchServerless::VERSION.match(regexp)
|
99
|
-
return "#{match[1]}p" if match[2]
|
98
|
+
return "#{ElasticsearchServerless::CLIENT_VERSION}p" if ElasticsearchServerless::VERSION.match(/[a-z]+/)
|
100
99
|
|
101
|
-
ElasticsearchServerless::
|
100
|
+
ElasticsearchServerless::CLIENT_VERSION
|
102
101
|
end
|
103
102
|
|
104
103
|
ELASTICSEARCH_SERVICE_VERSION = [:esv, client_meta_version].freeze
|
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.0.
|
4
|
+
version: 0.1.0.20231031.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fernando Briano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: elastic-transport
|
@@ -161,7 +161,6 @@ files:
|
|
161
161
|
- lib/elasticsearch-serverless/api/indices/put_index_template.rb
|
162
162
|
- lib/elasticsearch-serverless/api/indices/put_mapping.rb
|
163
163
|
- lib/elasticsearch-serverless/api/indices/put_settings.rb
|
164
|
-
- lib/elasticsearch-serverless/api/indices/put_template.rb
|
165
164
|
- lib/elasticsearch-serverless/api/indices/refresh.rb
|
166
165
|
- lib/elasticsearch-serverless/api/indices/resolve_index.rb
|
167
166
|
- lib/elasticsearch-serverless/api/indices/rollover.rb
|
@@ -204,7 +203,6 @@ files:
|
|
204
203
|
- lib/elasticsearch-serverless/api/machine_learning/get_overall_buckets.rb
|
205
204
|
- lib/elasticsearch-serverless/api/machine_learning/get_trained_models.rb
|
206
205
|
- lib/elasticsearch-serverless/api/machine_learning/get_trained_models_stats.rb
|
207
|
-
- lib/elasticsearch-serverless/api/machine_learning/infer_trained_model.rb
|
208
206
|
- lib/elasticsearch-serverless/api/machine_learning/open_job.rb
|
209
207
|
- lib/elasticsearch-serverless/api/machine_learning/post_calendar_events.rb
|
210
208
|
- lib/elasticsearch-serverless/api/machine_learning/preview_data_frame_analytics.rb
|
@@ -264,7 +262,6 @@ files:
|
|
264
262
|
- lib/elasticsearch-serverless/api/security/has_privileges.rb
|
265
263
|
- lib/elasticsearch-serverless/api/security/invalidate_api_key.rb
|
266
264
|
- lib/elasticsearch-serverless/api/security/query_api_keys.rb
|
267
|
-
- lib/elasticsearch-serverless/api/security/update_api_key.rb
|
268
265
|
- lib/elasticsearch-serverless/api/sql/clear_cursor.rb
|
269
266
|
- lib/elasticsearch-serverless/api/sql/delete_async.rb
|
270
267
|
- lib/elasticsearch-serverless/api/sql/get_async.rb
|
@@ -278,7 +275,6 @@ files:
|
|
278
275
|
- lib/elasticsearch-serverless/api/synonyms/get_synonyms_sets.rb
|
279
276
|
- lib/elasticsearch-serverless/api/synonyms/put_synonym.rb
|
280
277
|
- lib/elasticsearch-serverless/api/synonyms/put_synonym_rule.rb
|
281
|
-
- lib/elasticsearch-serverless/api/tasks/get.rb
|
282
278
|
- lib/elasticsearch-serverless/api/terms_enum.rb
|
283
279
|
- lib/elasticsearch-serverless/api/termvectors.rb
|
284
280
|
- lib/elasticsearch-serverless/api/transform/delete_transform.rb
|
@@ -310,11 +306,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
310
306
|
version: '0'
|
311
307
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
312
308
|
requirements:
|
313
|
-
- - "
|
309
|
+
- - ">="
|
314
310
|
- !ruby/object:Gem::Version
|
315
|
-
version:
|
311
|
+
version: '0'
|
316
312
|
requirements: []
|
317
|
-
rubygems_version: 3.
|
313
|
+
rubygems_version: 3.5.3
|
318
314
|
signing_key:
|
319
315
|
specification_version: 4
|
320
316
|
summary: Elasticsearch Serverless Client
|
@@ -1,60 +0,0 @@
|
|
1
|
-
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
-
# license agreements. See the NOTICE file distributed with
|
3
|
-
# this work for additional information regarding copyright
|
4
|
-
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
-
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
-
# not use this file except in compliance with the License.
|
7
|
-
# You may obtain a copy of the License at
|
8
|
-
#
|
9
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
#
|
11
|
-
# Unless required by applicable law or agreed to in writing,
|
12
|
-
# software distributed under the License is distributed on an
|
13
|
-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
-
# KIND, either express or implied. See the License for the
|
15
|
-
# specific language governing permissions and limitations
|
16
|
-
# under the License.
|
17
|
-
#
|
18
|
-
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
-
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
-
#
|
21
|
-
module ElasticsearchServerless
|
22
|
-
module API
|
23
|
-
module Indices
|
24
|
-
module Actions
|
25
|
-
# Creates or updates an index template.
|
26
|
-
#
|
27
|
-
# @option arguments [String] :name The name of the template (*Required*)
|
28
|
-
# @option arguments [Boolean] :create If true, this request cannot replace or update existing index templates.
|
29
|
-
# @option arguments [Boolean] :flat_settings If +true+, returns settings in flat format.
|
30
|
-
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
31
|
-
# @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
32
|
-
# @option arguments [Integer] :order Order in which Elasticsearch applies this template if index matches multiple templates. Templates with lower 'order' values are merged first. Templates with higher 'order' values are merged later, overriding templates with lower values.
|
33
|
-
# @option arguments [Hash] :headers Custom HTTP headers
|
34
|
-
# @option arguments [Hash] :body request body
|
35
|
-
#
|
36
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
|
37
|
-
#
|
38
|
-
def put_template(arguments = {})
|
39
|
-
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
40
|
-
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
41
|
-
|
42
|
-
arguments = arguments.clone
|
43
|
-
headers = arguments.delete(:headers) || {}
|
44
|
-
|
45
|
-
body = arguments.delete(:body)
|
46
|
-
|
47
|
-
_name = arguments.delete(:name)
|
48
|
-
|
49
|
-
method = ElasticsearchServerless::API::HTTP_PUT
|
50
|
-
path = "_template/#{Utils.listify(_name)}"
|
51
|
-
params = Utils.process_params(arguments)
|
52
|
-
|
53
|
-
ElasticsearchServerless::API::Response.new(
|
54
|
-
perform_request(method, path, params, body, headers)
|
55
|
-
)
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
@@ -1,63 +0,0 @@
|
|
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
|
-
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
41
|
-
raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id]
|
42
|
-
|
43
|
-
arguments = arguments.clone
|
44
|
-
headers = arguments.delete(:headers) || {}
|
45
|
-
|
46
|
-
body = arguments.delete(:body)
|
47
|
-
|
48
|
-
_model_id = arguments.delete(:model_id)
|
49
|
-
|
50
|
-
method = ElasticsearchServerless::API::HTTP_POST
|
51
|
-
path = if _model_id
|
52
|
-
"_ml/trained_models/#{Utils.listify(_model_id)}/deployment/_infer"
|
53
|
-
end
|
54
|
-
params = Utils.process_params(arguments)
|
55
|
-
|
56
|
-
ElasticsearchServerless::API::Response.new(
|
57
|
-
perform_request(method, path, params, body, headers)
|
58
|
-
)
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
@@ -1,54 +0,0 @@
|
|
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
|
-
# Updates attributes of an existing API key.
|
26
|
-
#
|
27
|
-
# @option arguments [String] :id The ID of the API key to update. (*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/current/security-api-update-api-key.html
|
32
|
-
#
|
33
|
-
def update_api_key(arguments = {})
|
34
|
-
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
35
|
-
|
36
|
-
arguments = arguments.clone
|
37
|
-
headers = arguments.delete(:headers) || {}
|
38
|
-
|
39
|
-
body = arguments.delete(:body)
|
40
|
-
|
41
|
-
_id = arguments.delete(:id)
|
42
|
-
|
43
|
-
method = ElasticsearchServerless::API::HTTP_PUT
|
44
|
-
path = "_security/api_key/#{Utils.listify(_id)}"
|
45
|
-
params = {}
|
46
|
-
|
47
|
-
ElasticsearchServerless::API::Response.new(
|
48
|
-
perform_request(method, path, params, body, headers)
|
49
|
-
)
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
@@ -1,57 +0,0 @@
|
|
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
|
-
# Returns information about a task.
|
26
|
-
# This functionality is Experimental and may be changed or removed
|
27
|
-
# completely in a future release. Elastic will take a best effort approach
|
28
|
-
# to fix any issues, but experimental features are not subject to the
|
29
|
-
# support SLA of official GA features.
|
30
|
-
#
|
31
|
-
# @option arguments [String] :task_id ID of the task. (*Required*)
|
32
|
-
# @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
33
|
-
# @option arguments [Boolean] :wait_for_completion If +true+, the request blocks until the task has completed.
|
34
|
-
# @option arguments [Hash] :headers Custom HTTP headers
|
35
|
-
#
|
36
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html
|
37
|
-
#
|
38
|
-
def get(arguments = {})
|
39
|
-
arguments = arguments.clone
|
40
|
-
headers = arguments.delete(:headers) || {}
|
41
|
-
|
42
|
-
body = nil
|
43
|
-
|
44
|
-
_task_id = arguments.delete(:task_id)
|
45
|
-
|
46
|
-
method = ElasticsearchServerless::API::HTTP_GET
|
47
|
-
path = "_tasks/#{Utils.listify(_task_id)}"
|
48
|
-
params = Utils.process_params(arguments)
|
49
|
-
|
50
|
-
ElasticsearchServerless::API::Response.new(
|
51
|
-
perform_request(method, path, params, body, headers)
|
52
|
-
)
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|