elasticsearch-serverless 0.0.8.20231031.pre → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/lib/elasticsearch-serverless/api/eql/get.rb +1 -1
  3. data/lib/elasticsearch-serverless/api/eql/get_status.rb +1 -1
  4. data/lib/elasticsearch-serverless/api/{tasks/get.rb → esql/query.rb} +12 -12
  5. data/lib/elasticsearch-serverless/api/indices/delete_index_template.rb +1 -1
  6. data/lib/elasticsearch-serverless/api/indices/exists_index_template.rb +1 -1
  7. data/lib/elasticsearch-serverless/api/indices/get_index_template.rb +1 -1
  8. data/lib/elasticsearch-serverless/api/indices/put_index_template.rb +3 -1
  9. data/lib/elasticsearch-serverless/api/indices/simulate_index_template.rb +3 -5
  10. data/lib/elasticsearch-serverless/api/indices/simulate_template.rb +1 -1
  11. data/lib/elasticsearch-serverless/api/machine_learning/start_trained_model_deployment.rb +1 -0
  12. data/lib/elasticsearch-serverless/api/search_application/delete.rb +1 -1
  13. data/lib/elasticsearch-serverless/api/synonyms/delete_synonym.rb +0 -4
  14. data/lib/elasticsearch-serverless/api/synonyms/delete_synonym_rule.rb +0 -4
  15. data/lib/elasticsearch-serverless/api/synonyms/get_synonym.rb +0 -4
  16. data/lib/elasticsearch-serverless/api/synonyms/get_synonym_rule.rb +0 -4
  17. data/lib/elasticsearch-serverless/api/synonyms/get_synonyms_sets.rb +0 -4
  18. data/lib/elasticsearch-serverless/api/synonyms/put_synonym.rb +0 -4
  19. data/lib/elasticsearch-serverless/api/synonyms/put_synonym_rule.rb +0 -4
  20. data/lib/elasticsearch-serverless/api/transform/delete_transform.rb +1 -0
  21. data/lib/elasticsearch-serverless/api.rb +7 -5
  22. data/lib/elasticsearch-serverless/version.rb +3 -3
  23. data/lib/elasticsearch-serverless.rb +4 -5
  24. metadata +6 -9
  25. data/lib/elasticsearch-serverless/api/indices/put_template.rb +0 -60
  26. data/lib/elasticsearch-serverless/api/machine_learning/infer_trained_model.rb +0 -63
  27. data/lib/elasticsearch-serverless/api/security/update_api_key.rb +0 -54
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 360407581095acc1e52ffcc4c03f1f2d263d56427a0b1c48807aba4d7a776e82
4
- data.tar.gz: 890548d5242aa5688ad25d5c85dff021015091190dc8585f025c1e4273d0993d
3
+ metadata.gz: '09c1daf34377a8e2d94926ebbb2e3e7b69d646683b65f05a4b2a3beda0f71648'
4
+ data.tar.gz: 1ecb7093b7846cbd4c61ad5486d5c2ffe31914c3452af49e12b1721b7cc372c9
5
5
  SHA512:
6
- metadata.gz: a78500ad31ed7be19428791d702a4c1807130d8f091855ce5b2036c8cc1352d787f335b8fc0facd13933dc6b9a14b12352348be531f66f7d1b3c2aab95c11fdb
7
- data.tar.gz: 0be05a9426b1ca80fb829929eb7992a9d7741b7f05bc2114ee1138a5daa49f570ad33435cdf87b674948eef89aec5616313677eedb9e65ca59711747af353e09
6
+ metadata.gz: 70ca28dcabaec5aa170c618d3122c26e1754af25741d7af5e25596f386c9a07c26639d72971150f0e9967b5c36f4f89de14616199bd047ca1736e2dd28af1cd5
7
+ data.tar.gz: f0b6a9542e3e83647e1378866d0053e3cf3fa2530ea292e49963337272ac5af0ac399af7d85db7a15d233eba7850dacce44170cef79fa958bec85f734f9cee87
@@ -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 https://www.elastic.co/guide/en/elasticsearch/reference/current/get-async-eql-search-api.html
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 https://www.elastic.co/guide/en/elasticsearch/reference/current/get-async-eql-status-api.html
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]
@@ -20,31 +20,31 @@
20
20
  #
21
21
  module ElasticsearchServerless
22
22
  module API
23
- module Tasks
23
+ module Esql
24
24
  module Actions
25
- # Returns information about a task.
25
+ # Executes an ESQL request
26
26
  # This functionality is Experimental and may be changed or removed
27
27
  # completely in a future release. Elastic will take a best effort approach
28
28
  # to fix any issues, but experimental features are not subject to the
29
29
  # support SLA of official GA features.
30
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.
31
+ # @option arguments [String] :format A short version of the Accept header, e.g. json, yaml.
32
+ # @option arguments [String] :delimiter The character to use between values within a CSV row. Only valid for the CSV format.
34
33
  # @option arguments [Hash] :headers Custom HTTP headers
34
+ # @option arguments [Hash] :body request body
35
35
  #
36
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html
36
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-rest.html
37
37
  #
38
- def get(arguments = {})
38
+ def query(arguments = {})
39
+ raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
40
+
39
41
  arguments = arguments.clone
40
42
  headers = arguments.delete(:headers) || {}
41
43
 
42
- body = nil
43
-
44
- _task_id = arguments.delete(:task_id)
44
+ body = arguments.delete(:body)
45
45
 
46
- method = ElasticsearchServerless::API::HTTP_GET
47
- path = "_tasks/#{Utils.listify(_task_id)}"
46
+ method = ElasticsearchServerless::API::HTTP_POST
47
+ path = "_query"
48
48
  params = Utils.process_params(arguments)
49
49
 
50
50
  ElasticsearchServerless::API::Response.new(
@@ -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-templates.html
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/indices-templates.html
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-templates.html
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
@@ -26,10 +26,12 @@ module ElasticsearchServerless
26
26
  #
27
27
  # @option arguments [String] :name Index or template name (*Required*)
28
28
  # @option arguments [Boolean] :create If +true+, this request cannot replace or update existing index templates.
29
+ # @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.
30
+ # @option arguments [String] :cause User defined reason for creating/updating the index template
29
31
  # @option arguments [Hash] :headers Custom HTTP headers
30
32
  # @option arguments [Hash] :body request body
31
33
  #
32
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
34
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-template.html
33
35
  #
34
36
  def put_index_template(arguments = {})
35
37
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
@@ -24,14 +24,12 @@ module ElasticsearchServerless
24
24
  module Actions
25
25
  # Simulate matching the given index name against the index templates in the system
26
26
  #
27
- # @option arguments [String] :name Index or template name to simulate (*Required*)
28
- # @option arguments [Boolean] :create If +true+, the template passed in the body is only used if no existing templates match the same index patterns. If +false+, the simulation uses the template with the highest priority. Note that the template is not permanently added or updated in either case; it is only used for the simulation.
27
+ # @option arguments [String] :name Name of the index to simulate (*Required*)
29
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.
30
29
  # @option arguments [Boolean] :include_defaults If true, returns all relevant default configurations for the index template.
31
30
  # @option arguments [Hash] :headers Custom HTTP headers
32
- # @option arguments [Hash] :body request body
33
31
  #
34
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
32
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-index.html
35
33
  #
36
34
  def simulate_index_template(arguments = {})
37
35
  raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
@@ -39,7 +37,7 @@ module ElasticsearchServerless
39
37
  arguments = arguments.clone
40
38
  headers = arguments.delete(:headers) || {}
41
39
 
42
- body = arguments.delete(:body)
40
+ body = nil
43
41
 
44
42
  _name = arguments.delete(:name)
45
43
 
@@ -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-templates.html
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/put-search-application.html
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
  #
@@ -19,7 +19,7 @@ require 'elasticsearch-serverless/api/response'
19
19
  require 'elasticsearch-serverless/api/utils'
20
20
 
21
21
  # Require everything in /api
22
- Dir["#{File.dirname(__FILE__)}/api/**/*.rb"].each { |f| require f}
22
+ Dir["#{File.dirname(__FILE__)}/api/**/*.rb"].each { |f| require f }
23
23
 
24
24
  module ElasticsearchServerless
25
25
  module API
@@ -61,28 +61,28 @@ module ElasticsearchServerless
61
61
  :cluster,
62
62
  :enrich,
63
63
  :eql,
64
+ :esql,
64
65
  :graph,
65
66
  :indices,
66
67
  :ingest,
67
68
  :license,
68
69
  :logstash,
70
+ :machine_learning,
71
+ :query_ruleset,
69
72
  :search_application,
70
73
  :security,
71
74
  :sql,
72
75
  :synonyms,
73
76
  :transform
74
77
  ].freeze
75
-
76
78
  UPPERCASE_APIS = ['sql'].freeze
77
79
 
78
80
  API_NAMESPACES.each do |namespace|
79
81
  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
82
  module_name = if UPPERCASE_APIS.include?(name)
83
83
  name.upcase
84
84
  else
85
- name.split("_").map(&:capitalize).join
85
+ name.split('_').map(&:capitalize).join
86
86
  end
87
87
  class_name = "#{module_name}Client"
88
88
 
@@ -94,5 +94,7 @@ module ElasticsearchServerless
94
94
  instance_variable_set("@#{name}", klass.new(self))
95
95
  end
96
96
  end
97
+ # TODO: If there are more aliases, make this dynamic and add them to constant
98
+ alias ml machine_learning
97
99
  end
98
100
  end
@@ -16,7 +16,7 @@
16
16
  # under the License.
17
17
 
18
18
  module ElasticsearchServerless
19
- API_VERSION = '20231031'
20
- CLIENT_VERSION = '0.0.8'
21
- VERSION = "#{CLIENT_VERSION}.#{API_VERSION}.pre".freeze
19
+ API_VERSION = '2023-10-31'.freeze
20
+ CLIENT_VERSION = '0.1.0'.freeze
21
+ VERSION = CLIENT_VERSION
22
22
  end
@@ -51,8 +51,9 @@ 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
  },
57
58
  compression: true
58
59
  }
@@ -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
- regexp = /^([0-9]+\.[0-9]+\.[0-9]+)\.?([a-z0-9.-]+)?$/
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::VERSION
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.8.20231031.pre
4
+ version: 0.1.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: 2023-10-12 00:00:00.000000000 Z
11
+ date: 2024-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: elastic-transport
@@ -124,6 +124,7 @@ files:
124
124
  - lib/elasticsearch-serverless/api/eql/get.rb
125
125
  - lib/elasticsearch-serverless/api/eql/get_status.rb
126
126
  - lib/elasticsearch-serverless/api/eql/search.rb
127
+ - lib/elasticsearch-serverless/api/esql/query.rb
127
128
  - lib/elasticsearch-serverless/api/exists.rb
128
129
  - lib/elasticsearch-serverless/api/exists_source.rb
129
130
  - lib/elasticsearch-serverless/api/explain.rb
@@ -161,7 +162,6 @@ files:
161
162
  - lib/elasticsearch-serverless/api/indices/put_index_template.rb
162
163
  - lib/elasticsearch-serverless/api/indices/put_mapping.rb
163
164
  - lib/elasticsearch-serverless/api/indices/put_settings.rb
164
- - lib/elasticsearch-serverless/api/indices/put_template.rb
165
165
  - lib/elasticsearch-serverless/api/indices/refresh.rb
166
166
  - lib/elasticsearch-serverless/api/indices/resolve_index.rb
167
167
  - lib/elasticsearch-serverless/api/indices/rollover.rb
@@ -204,7 +204,6 @@ files:
204
204
  - lib/elasticsearch-serverless/api/machine_learning/get_overall_buckets.rb
205
205
  - lib/elasticsearch-serverless/api/machine_learning/get_trained_models.rb
206
206
  - lib/elasticsearch-serverless/api/machine_learning/get_trained_models_stats.rb
207
- - lib/elasticsearch-serverless/api/machine_learning/infer_trained_model.rb
208
207
  - lib/elasticsearch-serverless/api/machine_learning/open_job.rb
209
208
  - lib/elasticsearch-serverless/api/machine_learning/post_calendar_events.rb
210
209
  - lib/elasticsearch-serverless/api/machine_learning/preview_data_frame_analytics.rb
@@ -264,7 +263,6 @@ files:
264
263
  - lib/elasticsearch-serverless/api/security/has_privileges.rb
265
264
  - lib/elasticsearch-serverless/api/security/invalidate_api_key.rb
266
265
  - lib/elasticsearch-serverless/api/security/query_api_keys.rb
267
- - lib/elasticsearch-serverless/api/security/update_api_key.rb
268
266
  - lib/elasticsearch-serverless/api/sql/clear_cursor.rb
269
267
  - lib/elasticsearch-serverless/api/sql/delete_async.rb
270
268
  - lib/elasticsearch-serverless/api/sql/get_async.rb
@@ -278,7 +276,6 @@ files:
278
276
  - lib/elasticsearch-serverless/api/synonyms/get_synonyms_sets.rb
279
277
  - lib/elasticsearch-serverless/api/synonyms/put_synonym.rb
280
278
  - lib/elasticsearch-serverless/api/synonyms/put_synonym_rule.rb
281
- - lib/elasticsearch-serverless/api/tasks/get.rb
282
279
  - lib/elasticsearch-serverless/api/terms_enum.rb
283
280
  - lib/elasticsearch-serverless/api/termvectors.rb
284
281
  - lib/elasticsearch-serverless/api/transform/delete_transform.rb
@@ -310,11 +307,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
310
307
  version: '0'
311
308
  required_rubygems_version: !ruby/object:Gem::Requirement
312
309
  requirements:
313
- - - ">"
310
+ - - ">="
314
311
  - !ruby/object:Gem::Version
315
- version: 1.3.1
312
+ version: '0'
316
313
  requirements: []
317
- rubygems_version: 3.4.19
314
+ rubygems_version: 3.5.9
318
315
  signing_key:
319
316
  specification_version: 4
320
317
  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