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.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/lib/elasticsearch-serverless/api/async_search/delete.rb +2 -2
  3. data/lib/elasticsearch-serverless/api/async_search/get.rb +2 -1
  4. data/lib/elasticsearch-serverless/api/async_search/status.rb +5 -3
  5. data/lib/elasticsearch-serverless/api/async_search/submit.rb +5 -7
  6. data/lib/elasticsearch-serverless/api/cat/aliases.rb +0 -4
  7. data/lib/elasticsearch-serverless/api/cat/component_templates.rb +4 -4
  8. data/lib/elasticsearch-serverless/api/cat/count.rb +0 -4
  9. data/lib/elasticsearch-serverless/api/cat/help.rb +0 -4
  10. data/lib/elasticsearch-serverless/api/cat/indices.rb +0 -4
  11. data/lib/elasticsearch-serverless/api/cat/ml_data_frame_analytics.rb +0 -4
  12. data/lib/elasticsearch-serverless/api/cat/ml_datafeeds.rb +0 -4
  13. data/lib/elasticsearch-serverless/api/cat/ml_jobs.rb +0 -4
  14. data/lib/elasticsearch-serverless/api/cat/ml_trained_models.rb +0 -4
  15. data/lib/elasticsearch-serverless/api/cat/transforms.rb +0 -4
  16. data/lib/elasticsearch-serverless/api/clear_scroll.rb +3 -12
  17. data/lib/elasticsearch-serverless/api/close_point_in_time.rb +5 -1
  18. data/lib/elasticsearch-serverless/api/connector/check_in.rb +2 -1
  19. data/lib/elasticsearch-serverless/api/connector/delete.rb +5 -1
  20. data/lib/elasticsearch-serverless/api/connector/get.rb +2 -1
  21. data/lib/elasticsearch-serverless/api/connector/list.rb +2 -1
  22. data/lib/elasticsearch-serverless/api/connector/post.rb +4 -1
  23. data/lib/elasticsearch-serverless/api/connector/put.rb +1 -1
  24. data/lib/elasticsearch-serverless/api/connector/sync_job_cancel.rb +3 -1
  25. data/lib/elasticsearch-serverless/api/connector/sync_job_delete.rb +3 -1
  26. data/lib/elasticsearch-serverless/api/connector/sync_job_get.rb +1 -1
  27. data/lib/elasticsearch-serverless/api/connector/sync_job_list.rb +2 -1
  28. data/lib/elasticsearch-serverless/api/connector/sync_job_post.rb +2 -1
  29. data/lib/elasticsearch-serverless/api/connector/update_active_filtering.rb +1 -0
  30. data/lib/elasticsearch-serverless/api/connector/update_api_key_id.rb +5 -1
  31. data/lib/elasticsearch-serverless/api/connector/update_configuration.rb +2 -1
  32. data/lib/elasticsearch-serverless/api/connector/update_error.rb +4 -1
  33. data/lib/elasticsearch-serverless/api/connector/update_filtering.rb +4 -1
  34. data/lib/elasticsearch-serverless/api/connector/update_filtering_validation.rb +2 -1
  35. data/lib/elasticsearch-serverless/api/connector/update_index_name.rb +2 -1
  36. data/lib/elasticsearch-serverless/api/connector/update_name.rb +1 -1
  37. data/lib/elasticsearch-serverless/api/connector/update_native.rb +1 -1
  38. data/lib/elasticsearch-serverless/api/connector/update_pipeline.rb +2 -1
  39. data/lib/elasticsearch-serverless/api/connector/update_scheduling.rb +1 -1
  40. data/lib/elasticsearch-serverless/api/connector/update_service_type.rb +1 -1
  41. data/lib/elasticsearch-serverless/api/connector/update_status.rb +1 -1
  42. data/lib/elasticsearch-serverless/api/field_caps.rb +5 -3
  43. data/lib/elasticsearch-serverless/api/indices/analyze.rb +2 -1
  44. data/lib/elasticsearch-serverless/api/indices/exists_alias.rb +0 -1
  45. data/lib/elasticsearch-serverless/api/indices/get_alias.rb +0 -1
  46. data/lib/elasticsearch-serverless/api/indices/put_data_lifecycle.rb +2 -1
  47. data/lib/elasticsearch-serverless/api/inference/delete.rb +0 -4
  48. data/lib/elasticsearch-serverless/api/inference/get.rb +0 -4
  49. data/lib/elasticsearch-serverless/api/inference/inference.rb +0 -4
  50. data/lib/elasticsearch-serverless/api/inference/put.rb +0 -4
  51. data/lib/elasticsearch-serverless/api/machine_learning/infer_trained_model.rb +69 -0
  52. data/lib/elasticsearch-serverless/api/machine_learning/put_datafeed.rb +2 -2
  53. data/lib/elasticsearch-serverless/api/mget.rb +4 -1
  54. data/lib/elasticsearch-serverless/api/msearch.rb +11 -1
  55. data/lib/elasticsearch-serverless/api/msearch_template.rb +1 -1
  56. data/lib/elasticsearch-serverless/api/mtermvectors.rb +5 -1
  57. data/lib/elasticsearch-serverless/api/open_point_in_time.rb +6 -1
  58. data/lib/elasticsearch-serverless/api/query_rules/test.rb +63 -0
  59. data/lib/elasticsearch-serverless/api/rank_eval.rb +2 -1
  60. data/lib/elasticsearch-serverless/api/render_search_template.rb +2 -1
  61. data/lib/elasticsearch-serverless/api/scroll.rb +11 -12
  62. data/lib/elasticsearch-serverless/api/search.rb +2 -3
  63. data/lib/elasticsearch-serverless/api/search_mvt.rb +1 -1
  64. data/lib/elasticsearch-serverless/api/search_template.rb +1 -1
  65. data/lib/elasticsearch-serverless/api/security/create_api_key.rb +1 -1
  66. data/lib/elasticsearch-serverless/api/{indices/delete_data_lifecycle.rb → security/delete_role.rb} +9 -11
  67. data/lib/elasticsearch-serverless/api/{enrich/stats.rb → security/get_builtin_privileges.rb} +7 -7
  68. data/lib/elasticsearch-serverless/api/security/get_role.rb +72 -0
  69. data/lib/elasticsearch-serverless/api/security/has_privileges.rb +1 -1
  70. data/lib/elasticsearch-serverless/api/security/invalidate_api_key.rb +3 -2
  71. data/lib/elasticsearch-serverless/api/security/put_role.rb +67 -0
  72. data/lib/elasticsearch-serverless/api/security/query_api_keys.rb +2 -2
  73. data/lib/elasticsearch-serverless/api/tasks/get.rb +69 -0
  74. data/lib/elasticsearch-serverless/api/terms_enum.rb +6 -1
  75. data/lib/elasticsearch-serverless/api/termvectors.rb +1 -1
  76. data/lib/elasticsearch-serverless/api.rb +1 -0
  77. data/lib/elasticsearch-serverless/version.rb +1 -1
  78. 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
- # Query API keys.
26
- # Retrieves a paginated list of API keys and their information. You can optionally filter the results with a query.
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
- # The terms enum API can be used to discover terms in the index that begin with the provided string. It is designed for low-latency look-ups used in auto-complete scenarios.
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
- # Returns information and statistics about terms in the fields of a particular document.
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.
@@ -74,6 +74,7 @@ module ElasticsearchServerless
74
74
  :security,
75
75
  :sql,
76
76
  :synonyms,
77
+ :tasks,
77
78
  :transform
78
79
  ].freeze
79
80
  UPPERCASE_APIS = ['sql'].freeze
@@ -17,6 +17,6 @@
17
17
 
18
18
  module ElasticsearchServerless
19
19
  API_VERSION = '2023-10-31'.freeze
20
- CLIENT_VERSION = '0.4.0'.freeze
20
+ CLIENT_VERSION = '0.6.0'.freeze
21
21
  VERSION = CLIENT_VERSION
22
22
  end
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.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-10-02 00:00:00.000000000 Z
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.16
293
+ rubygems_version: 3.5.20
289
294
  signing_key:
290
295
  specification_version: 4
291
296
  summary: Elasticsearch Serverless Client