elasticsearch-serverless 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) 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 +2 -2
  5. data/lib/elasticsearch-serverless/api/async_search/submit.rb +4 -4
  6. data/lib/elasticsearch-serverless/api/clear_scroll.rb +1 -11
  7. data/lib/elasticsearch-serverless/api/connector/check_in.rb +2 -1
  8. data/lib/elasticsearch-serverless/api/connector/delete.rb +5 -1
  9. data/lib/elasticsearch-serverless/api/connector/get.rb +2 -1
  10. data/lib/elasticsearch-serverless/api/connector/list.rb +2 -1
  11. data/lib/elasticsearch-serverless/api/connector/post.rb +4 -1
  12. data/lib/elasticsearch-serverless/api/connector/put.rb +1 -1
  13. data/lib/elasticsearch-serverless/api/connector/sync_job_cancel.rb +3 -1
  14. data/lib/elasticsearch-serverless/api/connector/sync_job_delete.rb +3 -1
  15. data/lib/elasticsearch-serverless/api/connector/sync_job_get.rb +1 -1
  16. data/lib/elasticsearch-serverless/api/connector/sync_job_list.rb +2 -1
  17. data/lib/elasticsearch-serverless/api/connector/sync_job_post.rb +2 -1
  18. data/lib/elasticsearch-serverless/api/connector/update_active_filtering.rb +1 -0
  19. data/lib/elasticsearch-serverless/api/connector/update_api_key_id.rb +5 -1
  20. data/lib/elasticsearch-serverless/api/connector/update_configuration.rb +2 -1
  21. data/lib/elasticsearch-serverless/api/connector/update_error.rb +4 -1
  22. data/lib/elasticsearch-serverless/api/connector/update_filtering.rb +4 -1
  23. data/lib/elasticsearch-serverless/api/connector/update_filtering_validation.rb +2 -1
  24. data/lib/elasticsearch-serverless/api/connector/update_index_name.rb +2 -1
  25. data/lib/elasticsearch-serverless/api/connector/update_name.rb +1 -1
  26. data/lib/elasticsearch-serverless/api/connector/update_native.rb +1 -1
  27. data/lib/elasticsearch-serverless/api/connector/update_pipeline.rb +2 -1
  28. data/lib/elasticsearch-serverless/api/connector/update_scheduling.rb +1 -1
  29. data/lib/elasticsearch-serverless/api/connector/update_service_type.rb +1 -1
  30. data/lib/elasticsearch-serverless/api/connector/update_status.rb +1 -1
  31. data/lib/elasticsearch-serverless/api/indices/analyze.rb +2 -1
  32. data/lib/elasticsearch-serverless/api/indices/put_data_lifecycle.rb +2 -1
  33. data/lib/elasticsearch-serverless/api/machine_learning/infer_trained_model.rb +69 -0
  34. data/lib/elasticsearch-serverless/api/machine_learning/put_datafeed.rb +2 -2
  35. data/lib/elasticsearch-serverless/api/mget.rb +4 -1
  36. data/lib/elasticsearch-serverless/api/msearch.rb +11 -1
  37. data/lib/elasticsearch-serverless/api/mtermvectors.rb +5 -1
  38. data/lib/elasticsearch-serverless/api/query_rules/test.rb +63 -0
  39. data/lib/elasticsearch-serverless/api/scroll.rb +11 -12
  40. data/lib/elasticsearch-serverless/api/security/create_api_key.rb +1 -1
  41. data/lib/elasticsearch-serverless/api/{indices/delete_data_lifecycle.rb → security/delete_role.rb} +9 -11
  42. data/lib/elasticsearch-serverless/api/{enrich/stats.rb → security/get_builtin_privileges.rb} +7 -7
  43. data/lib/elasticsearch-serverless/api/security/get_role.rb +72 -0
  44. data/lib/elasticsearch-serverless/api/security/has_privileges.rb +1 -1
  45. data/lib/elasticsearch-serverless/api/security/invalidate_api_key.rb +3 -2
  46. data/lib/elasticsearch-serverless/api/security/put_role.rb +67 -0
  47. data/lib/elasticsearch-serverless/api/security/query_api_keys.rb +2 -2
  48. data/lib/elasticsearch-serverless/api/tasks/get.rb +69 -0
  49. data/lib/elasticsearch-serverless/api/terms_enum.rb +6 -1
  50. data/lib/elasticsearch-serverless/api.rb +1 -0
  51. data/lib/elasticsearch-serverless/version.rb +1 -1
  52. metadata +10 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8bde730a1cac096779c66fa3d59c1d58c20c7134e68a2b009bb7ef5e6a9d8ae7
4
- data.tar.gz: b2b1909d53c9ef64ebbf651ca0dd7b61bf409c6333840b78d4c477f4871edb87
3
+ metadata.gz: aedc93a8ab9cc3c28fe2fa52d0a4225e1e1a030c0ccd72dd1a29c003035bbdfc
4
+ data.tar.gz: f7c1fd06c870c37792572d51168583accc36c03b11e9b0e49c198dc0c42a1071
5
5
  SHA512:
6
- metadata.gz: 8b3192c5235b479cdfc5fc4b2b9e80f80c97624aad53140d37bfb066f31be1a594cea00b0e31bb5401949d5903f11856aece51f9c022d7fa33d2c9796a0e86fa
7
- data.tar.gz: d94a7b20610597b151002b81fcc61a51b6b59f4eb9a7d5d714dd6e32935b6fde759c571145dd73977827a9bcb88c963d5a6645d40f4af362e22ee1784b1e5c1d
6
+ metadata.gz: 55389aab59bfd1d8958156062c455b9c017d41f9e67f52bed901bf3f16c6b319b7655553caf8dd7b2d43a2756e15c7b72f85da6e56c79937252722ce2e143cf7
7
+ data.tar.gz: e554159e81d7e519e9e18c600150a19d4df80dc3707fbdd6c417ba4389743b85d622b50bce66746ba5e9baa2fdc5994928c3402be5d3a8d3b90074e28a9640f7
@@ -22,8 +22,8 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module AsyncSearch
24
24
  module Actions
25
- # Deletes an async search by identifier.
26
- # If the search is still running, the search request will be cancelled.
25
+ # Delete an async search.
26
+ # If the asynchronous search is still running, it is cancelled.
27
27
  # Otherwise, the saved search results are deleted.
28
28
  # If the Elasticsearch security features are enabled, the deletion of a specific async search is restricted to: the authenticated user that submitted the original search request; users that have the +cancel_task+ cluster privilege.
29
29
  #
@@ -22,7 +22,8 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module AsyncSearch
24
24
  module Actions
25
- # Retrieves the results of a previously submitted async search request given its identifier.
25
+ # Get async search results.
26
+ # Retrieve the results of a previously submitted asynchronous search request.
26
27
  # If the Elasticsearch security features are enabled, access to the results of a specific async search is restricted to the user or API key that submitted it.
27
28
  #
28
29
  # @option arguments [String] :id A unique identifier for the async search. (*Required*)
@@ -22,8 +22,8 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module AsyncSearch
24
24
  module Actions
25
- # Get async search status
26
- # Retrieves the status of a previously submitted async search request given its identifier, without retrieving search results.
25
+ # Get async search status.
26
+ # Retrieve the status of a previously submitted async search request given its identifier, without retrieving search results.
27
27
  # If the Elasticsearch security features are enabled, use of this API is restricted to the +monitoring_user+ role.
28
28
  #
29
29
  # @option arguments [String] :id A unique identifier for the async search. (*Required*)
@@ -22,10 +22,10 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module AsyncSearch
24
24
  module Actions
25
- # Runs a search request asynchronously.
26
- # When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field, hence partial results become available following the sort criteria that was requested.
27
- # Warning: Async search does not support scroll nor search requests that only include the suggest section.
28
- # By default, Elasticsearch doesn’t allow you to store an async search response larger than 10Mb and an attempt to do this results in an error.
25
+ # Run an async search.
26
+ # When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field. Partial results become available following the sort criteria that was requested.
27
+ # Warning: Asynchronous search does not support scroll or search requests that include only the suggest section.
28
+ # By default, Elasticsearch does not allow you to store an async search response larger than 10Mb and an attempt to do this results in an error.
29
29
  # The maximum allowed size for a stored async search response can be set by changing the +search.max_async_search_response_size+ cluster level setting.
30
30
  #
31
31
  # @option arguments [String, Array] :index A comma-separated list of index names to search; use +_all+ or empty string to perform the operation on all indices
@@ -38,12 +38,6 @@ module ElasticsearchServerless
38
38
  def clear_scroll(arguments = {})
39
39
  request_opts = { endpoint: arguments[:endpoint] || "clear_scroll" }
40
40
 
41
- defined_params = [:scroll_id].inject({}) do |set_variables, variable|
42
- set_variables[variable] = arguments[variable] if arguments.key?(variable)
43
- set_variables
44
- end
45
- request_opts[:defined_params] = defined_params unless defined_params.empty?
46
-
47
41
  arguments = arguments.clone
48
42
  headers = arguments.delete(:headers) || {}
49
43
 
@@ -52,11 +46,7 @@ module ElasticsearchServerless
52
46
  _scroll_id = arguments.delete(:scroll_id)
53
47
 
54
48
  method = ElasticsearchServerless::API::HTTP_DELETE
55
- path = if _scroll_id
56
- "_search/scroll/#{Utils.listify(_scroll_id)}"
57
- else
58
- "_search/scroll"
59
- end
49
+ path = "_search/scroll"
60
50
  params = Utils.process_params(arguments)
61
51
 
62
52
  if Array(arguments[:ignore]).include?(404)
@@ -22,7 +22,8 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Connector
24
24
  module Actions
25
- # Updates the last_seen field in the connector, and sets it to current timestamp
25
+ # Check in a connector.
26
+ # Update the +last_seen+ field in the connector and set it to the current timestamp.
26
27
  # This functionality is Experimental and may be changed or removed
27
28
  # completely in a future release. Elastic will take a best effort approach
28
29
  # to fix any issues, but experimental features are not subject to the
@@ -22,7 +22,11 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Connector
24
24
  module Actions
25
- # Deletes a connector.
25
+ # Delete a connector.
26
+ # Removes a connector and associated sync jobs.
27
+ # This is a destructive action that is not recoverable.
28
+ # NOTE: This action doesn’t delete any API keys, ingest pipelines, or data indices associated with the connector.
29
+ # These need to be removed manually.
26
30
  # This functionality is in Beta and is subject to change. The design and
27
31
  # code is less mature than official GA features and is being provided
28
32
  # as-is with no warranties. Beta features are not subject to the support
@@ -22,7 +22,8 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Connector
24
24
  module Actions
25
- # Retrieves a connector.
25
+ # Get a connector.
26
+ # Get the details about a connector.
26
27
  # This functionality is in Beta and is subject to change. The design and
27
28
  # code is less mature than official GA features and is being provided
28
29
  # as-is with no warranties. Beta features are not subject to the support
@@ -22,7 +22,8 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Connector
24
24
  module Actions
25
- # Returns existing connectors.
25
+ # Get all connectors.
26
+ # Get information about all connectors.
26
27
  # This functionality is in Beta and is subject to change. The design and
27
28
  # code is less mature than official GA features and is being provided
28
29
  # as-is with no warranties. Beta features are not subject to the support
@@ -22,7 +22,10 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Connector
24
24
  module Actions
25
- # Creates a connector.
25
+ # Create a connector.
26
+ # Connectors are Elasticsearch integrations that bring content from third-party data sources, which can be deployed on Elastic Cloud or hosted on your own infrastructure.
27
+ # Elastic managed connectors (Native connectors) are a managed service on Elastic Cloud.
28
+ # Self-managed connectors (Connector clients) are self-managed on your infrastructure.
26
29
  # This functionality is in Beta and is subject to change. The design and
27
30
  # code is less mature than official GA features and is being provided
28
31
  # as-is with no warranties. Beta features are not subject to the support
@@ -22,7 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Connector
24
24
  module Actions
25
- # Creates or updates a connector.
25
+ # Create or update a connector.
26
26
  # This functionality is in Beta and is subject to change. The design and
27
27
  # code is less mature than official GA features and is being provided
28
28
  # as-is with no warranties. Beta features are not subject to the support
@@ -22,7 +22,9 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Connector
24
24
  module Actions
25
- # Cancels a connector sync job.
25
+ # Cancel a connector sync job.
26
+ # Cancel a connector sync job, which sets the status to cancelling and updates +cancellation_requested_at+ to the current time.
27
+ # The connector service is then responsible for setting the status of connector sync jobs to cancelled.
26
28
  # This functionality is in Beta and is subject to change. The design and
27
29
  # code is less mature than official GA features and is being provided
28
30
  # as-is with no warranties. Beta features are not subject to the support
@@ -22,7 +22,9 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Connector
24
24
  module Actions
25
- # Deletes a connector sync job.
25
+ # Delete a connector sync job.
26
+ # Remove a connector sync job and its associated data.
27
+ # This is a destructive action that is not recoverable.
26
28
  # This functionality is in Beta and is subject to change. The design and
27
29
  # code is less mature than official GA features and is being provided
28
30
  # as-is with no warranties. Beta features are not subject to the support
@@ -22,7 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Connector
24
24
  module Actions
25
- # Retrieves a connector sync job.
25
+ # Get a connector sync job.
26
26
  # This functionality is in Beta and is subject to change. The design and
27
27
  # code is less mature than official GA features and is being provided
28
28
  # as-is with no warranties. Beta features are not subject to the support
@@ -22,7 +22,8 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Connector
24
24
  module Actions
25
- # Lists connector sync jobs.
25
+ # Get all connector sync jobs.
26
+ # Get information about all stored connector sync jobs listed by their creation date in ascending order.
26
27
  # This functionality is in Beta and is subject to change. The design and
27
28
  # code is less mature than official GA features and is being provided
28
29
  # as-is with no warranties. Beta features are not subject to the support
@@ -22,7 +22,8 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Connector
24
24
  module Actions
25
- # Creates a connector sync job.
25
+ # Create a connector sync job.
26
+ # Create a connector sync job document in the internal index and initialize its counters and timestamps with default values.
26
27
  # This functionality is in Beta and is subject to change. The design and
27
28
  # code is less mature than official GA features and is being provided
28
29
  # as-is with no warranties. Beta features are not subject to the support
@@ -22,6 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Connector
24
24
  module Actions
25
+ # Activate the connector draft filter.
25
26
  # Activates the valid draft filtering for a connector.
26
27
  # This functionality is Experimental and may be changed or removed
27
28
  # completely in a future release. Elastic will take a best effort approach
@@ -22,7 +22,11 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Connector
24
24
  module Actions
25
- # Updates the API key id in the connector document
25
+ # Update the connector API key ID.
26
+ # Update the +api_key_id+ and +api_key_secret_id+ fields of a connector.
27
+ # You can specify the ID of the API key used for authorization and the ID of the connector secret where the API key is stored.
28
+ # The connector secret ID is required only for Elastic managed (native) connectors.
29
+ # Self-managed connectors (connector clients) do not use this field.
26
30
  # This functionality is in Beta and is subject to change. The design and
27
31
  # code is less mature than official GA features and is being provided
28
32
  # as-is with no warranties. Beta features are not subject to the support
@@ -22,7 +22,8 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Connector
24
24
  module Actions
25
- # Updates the configuration field in the connector document
25
+ # Update the connector configuration.
26
+ # Update the configuration field in the connector document.
26
27
  # This functionality is in Beta and is subject to change. The design and
27
28
  # code is less mature than official GA features and is being provided
28
29
  # as-is with no warranties. Beta features are not subject to the support
@@ -22,7 +22,10 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Connector
24
24
  module Actions
25
- # Updates the filtering field in the connector document
25
+ # Update the connector error field.
26
+ # Set the error field for the connector.
27
+ # If the error provided in the request body is non-null, the connector’s status is updated to error.
28
+ # Otherwise, if the error is reset to null, the connector status is updated to connected.
26
29
  # This functionality is Experimental and may be changed or removed
27
30
  # completely in a future release. Elastic will take a best effort approach
28
31
  # to fix any issues, but experimental features are not subject to the
@@ -22,7 +22,10 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Connector
24
24
  module Actions
25
- # Updates the filtering field in the connector document
25
+ # Update the connector filtering.
26
+ # Update the draft filtering configuration of a connector and marks the draft validation state as edited.
27
+ # The filtering draft is activated once validated by the running Elastic connector service.
28
+ # The filtering property is used to configure sync rules (both basic and advanced) for a connector.
26
29
  # This functionality is in Beta and is subject to change. The design and
27
30
  # code is less mature than official GA features and is being provided
28
31
  # as-is with no warranties. Beta features are not subject to the support
@@ -22,7 +22,8 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Connector
24
24
  module Actions
25
- # Updates the draft filtering validation info for a connector.
25
+ # Update the connector draft filtering validation.
26
+ # Update the draft filtering validation info for a connector.
26
27
  # This functionality is Experimental and may be changed or removed
27
28
  # completely in a future release. Elastic will take a best effort approach
28
29
  # to fix any issues, but experimental features are not subject to the
@@ -22,7 +22,8 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Connector
24
24
  module Actions
25
- # Updates the index_name in the connector document
25
+ # Update the connector index name.
26
+ # Update the +index_name+ field of a connector, specifying the index where the data ingested by the connector is stored.
26
27
  # This functionality is in Beta and is subject to change. The design and
27
28
  # code is less mature than official GA features and is being provided
28
29
  # as-is with no warranties. Beta features are not subject to the support
@@ -22,7 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Connector
24
24
  module Actions
25
- # Updates the name and description fields in the connector document
25
+ # Update the connector name and description.
26
26
  # This functionality is in Beta and is subject to change. The design and
27
27
  # code is less mature than official GA features and is being provided
28
28
  # as-is with no warranties. Beta features are not subject to the support
@@ -22,7 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Connector
24
24
  module Actions
25
- # Updates the is_native flag in the connector document
25
+ # Update the connector is_native flag.
26
26
  # This functionality is in Beta and is subject to change. The design and
27
27
  # code is less mature than official GA features and is being provided
28
28
  # as-is with no warranties. Beta features are not subject to the support
@@ -22,7 +22,8 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Connector
24
24
  module Actions
25
- # Updates the pipeline field in the connector document
25
+ # Update the connector pipeline.
26
+ # When you create a new connector, the configuration of an ingest pipeline is populated with default settings.
26
27
  # This functionality is in Beta and is subject to change. The design and
27
28
  # code is less mature than official GA features and is being provided
28
29
  # as-is with no warranties. Beta features are not subject to the support
@@ -22,7 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Connector
24
24
  module Actions
25
- # Updates the scheduling field in the connector document
25
+ # Update the connector scheduling.
26
26
  # This functionality is in Beta and is subject to change. The design and
27
27
  # code is less mature than official GA features and is being provided
28
28
  # as-is with no warranties. Beta features are not subject to the support
@@ -22,7 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Connector
24
24
  module Actions
25
- # Updates the service type of the connector
25
+ # Update the connector service type.
26
26
  # This functionality is in Beta and is subject to change. The design and
27
27
  # code is less mature than official GA features and is being provided
28
28
  # as-is with no warranties. Beta features are not subject to the support
@@ -22,7 +22,7 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Connector
24
24
  module Actions
25
- # Updates the status of the connector
25
+ # Update the connector status.
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
@@ -22,7 +22,8 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Indices
24
24
  module Actions
25
- # Performs analysis on a text string and returns the resulting tokens.
25
+ # Get tokens from text analysis.
26
+ # The analyze API performs {https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis.html analysis} on a text string and returns the resulting tokens.
26
27
  #
27
28
  # @option arguments [String] :index Index used to derive the analyzer.
28
29
  # If specified, the +analyzer+ or field parameter overrides this value.
@@ -37,7 +37,7 @@ module ElasticsearchServerless
37
37
  # @option arguments [Time] :timeout Period to wait for a response.
38
38
  # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
39
39
  # @option arguments [Hash] :headers Custom HTTP headers
40
- # @option arguments [Hash] :body request body
40
+ # @option arguments [Hash] :body lifecycle
41
41
  #
42
42
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-put-lifecycle.html
43
43
  #
@@ -50,6 +50,7 @@ module ElasticsearchServerless
50
50
  end
51
51
  request_opts[:defined_params] = defined_params unless defined_params.empty?
52
52
 
53
+ raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
53
54
  raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
54
55
 
55
56
  arguments = arguments.clone
@@ -0,0 +1,69 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+ #
18
+ # Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
19
+ # @see https://github.com/elastic/elasticsearch-specification
20
+ #
21
+ module ElasticsearchServerless
22
+ module API
23
+ module MachineLearning
24
+ module Actions
25
+ # Evaluate a trained model.
26
+ #
27
+ # @option arguments [String] :model_id The unique identifier of the trained model. (*Required*)
28
+ # @option arguments [Time] :timeout Controls the amount of time to wait for inference results. Server default: 10s.
29
+ # @option arguments [Hash] :headers Custom HTTP headers
30
+ # @option arguments [Hash] :body request body
31
+ #
32
+ # *Deprecation notice*:
33
+ # /_ml/trained_models/{model_id}/deployment/_infer is deprecated. Use /_ml/trained_models/{model_id}/_infer instead
34
+ # Deprecated since version 8.3.0
35
+ #
36
+ #
37
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/infer-trained-model.html
38
+ #
39
+ def infer_trained_model(arguments = {})
40
+ request_opts = { endpoint: arguments[:endpoint] || "ml.infer_trained_model" }
41
+
42
+ defined_params = [:model_id].inject({}) do |set_variables, variable|
43
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
44
+ set_variables
45
+ end
46
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
47
+
48
+ raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
49
+ raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id]
50
+
51
+ arguments = arguments.clone
52
+ headers = arguments.delete(:headers) || {}
53
+
54
+ body = arguments.delete(:body)
55
+
56
+ _model_id = arguments.delete(:model_id)
57
+
58
+ method = ElasticsearchServerless::API::HTTP_POST
59
+ path = "_ml/trained_models/#{Utils.listify(_model_id)}/_infer"
60
+ params = Utils.process_params(arguments)
61
+
62
+ ElasticsearchServerless::API::Response.new(
63
+ perform_request(method, path, params, body, headers, request_opts)
64
+ )
65
+ end
66
+ end
67
+ end
68
+ end
69
+ end
@@ -26,12 +26,12 @@ module ElasticsearchServerless
26
26
  # Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job.
27
27
  # You can associate only one datafeed with each anomaly detection job.
28
28
  # The datafeed contains a query that runs at a defined interval (+frequency+).
29
- # If you are concerned about delayed data, you can add a delay (+query_delay') at each interval.
29
+ # If you are concerned about delayed data, you can add a delay (+query_delay+) at each interval.
30
30
  # When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had
31
31
  # at the time of creation and runs the query using those same roles. If you provide secondary authorization headers,
32
32
  # those credentials are used instead.
33
33
  # You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed
34
- # directly to the+.ml-config+index. Do not give users+write+privileges on the+.ml-config` index.
34
+ # directly to the +.ml-config+ index. Do not give users +write+ privileges on the +.ml-config+ index.
35
35
  #
36
36
  # @option arguments [String] :datafeed_id A numerical character string that uniquely identifies the datafeed.
37
37
  # This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.
@@ -21,7 +21,10 @@
21
21
  module ElasticsearchServerless
22
22
  module API
23
23
  module Actions
24
- # Allows to get multiple documents in one request.
24
+ # Get multiple documents.
25
+ # Get multiple JSON documents by ID from one or more indices.
26
+ # If you specify an index in the request URI, you only need to specify the document IDs in the request body.
27
+ # To ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.
25
28
  #
26
29
  # @option arguments [String] :index Name of the index to retrieve documents from when +ids+ are specified, or when a document in the +docs+ array does not specify an index.
27
30
  # @option arguments [Boolean] :force_synthetic_source Should this request force synthetic _source?
@@ -21,7 +21,17 @@
21
21
  module ElasticsearchServerless
22
22
  module API
23
23
  module Actions
24
- # Allows to execute several search operations in one request.
24
+ # Run multiple searches.
25
+ # The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format.
26
+ # The structure is as follows:
27
+ # header
28
+ # body
29
+ # header
30
+ # body
31
+ # This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node.
32
+ # IMPORTANT: The final line of data must end with a newline character +\n+.
33
+ # Each newline character may be preceded by a carriage return +\r+.
34
+ # When sending requests to this endpoint the +Content-Type+ header should be set to +application/x-ndjson+.
25
35
  #
26
36
  # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and index aliases to search.
27
37
  # @option arguments [Boolean] :allow_no_indices If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar.
@@ -21,7 +21,11 @@
21
21
  module ElasticsearchServerless
22
22
  module API
23
23
  module Actions
24
- # Returns multiple termvectors in one request.
24
+ # Get multiple term vectors.
25
+ # You can specify existing documents by index and ID or provide artificial documents in the body of the request.
26
+ # You can specify the index in the request body or request URI.
27
+ # The response contains a +docs+ array with all the fetched termvectors.
28
+ # Each element has the structure provided by the termvectors API.
25
29
  #
26
30
  # @option arguments [String] :index Name of the index that contains the documents.
27
31
  # @option arguments [Array<String>] :ids A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body
@@ -0,0 +1,63 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+ #
18
+ # Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
19
+ # @see https://github.com/elastic/elasticsearch-specification
20
+ #
21
+ module ElasticsearchServerless
22
+ module API
23
+ module QueryRules
24
+ module Actions
25
+ # Creates or updates a query ruleset.
26
+ #
27
+ # @option arguments [String] :ruleset_id The unique identifier of the query ruleset to be created or updated (*Required*)
28
+ # @option arguments [Hash] :headers Custom HTTP headers
29
+ # @option arguments [Hash] :body request body
30
+ #
31
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/test-query-ruleset.html
32
+ #
33
+ def test(arguments = {})
34
+ request_opts = { endpoint: arguments[:endpoint] || "query_rules.test" }
35
+
36
+ defined_params = [:ruleset_id].inject({}) do |set_variables, variable|
37
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
38
+ set_variables
39
+ end
40
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
41
+
42
+ raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
43
+ raise ArgumentError, "Required argument 'ruleset_id' missing" unless arguments[:ruleset_id]
44
+
45
+ arguments = arguments.clone
46
+ headers = arguments.delete(:headers) || {}
47
+
48
+ body = arguments.delete(:body)
49
+
50
+ _ruleset_id = arguments.delete(:ruleset_id)
51
+
52
+ method = ElasticsearchServerless::API::HTTP_POST
53
+ path = "_query_rules/#{Utils.listify(_ruleset_id)}/_test"
54
+ params = {}
55
+
56
+ ElasticsearchServerless::API::Response.new(
57
+ perform_request(method, path, params, body, headers, request_opts)
58
+ )
59
+ end
60
+ end
61
+ end
62
+ end
63
+ end
@@ -21,7 +21,16 @@
21
21
  module ElasticsearchServerless
22
22
  module API
23
23
  module Actions
24
- # Allows to retrieve a large numbers of results from a single search request.
24
+ # Run a scrolling search.
25
+ # IMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the +search_after+ parameter with a point in time (PIT).
26
+ # The scroll API gets large sets of results from a single scrolling search request.
27
+ # To get the necessary scroll ID, submit a search API request that includes an argument for the +scroll+ query parameter.
28
+ # The +scroll+ parameter indicates how long Elasticsearch should retain the search context for the request.
29
+ # The search response returns a scroll ID in the +_scroll_id+ response body parameter.
30
+ # You can then use the scroll ID with the scroll API to retrieve the next batch of results for the request.
31
+ # If the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search.
32
+ # You can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context.
33
+ # IMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests.
25
34
  #
26
35
  # @option arguments [String] :scroll_id The scroll ID
27
36
  # @option arguments [Time] :scroll Period to retain the search context for scrolling. Server default: 1d.
@@ -39,12 +48,6 @@ module ElasticsearchServerless
39
48
  def scroll(arguments = {})
40
49
  request_opts = { endpoint: arguments[:endpoint] || "scroll" }
41
50
 
42
- defined_params = [:scroll_id].inject({}) do |set_variables, variable|
43
- set_variables[variable] = arguments[variable] if arguments.key?(variable)
44
- set_variables
45
- end
46
- request_opts[:defined_params] = defined_params unless defined_params.empty?
47
-
48
51
  arguments = arguments.clone
49
52
  headers = arguments.delete(:headers) || {}
50
53
 
@@ -58,11 +61,7 @@ module ElasticsearchServerless
58
61
  ElasticsearchServerless::API::HTTP_GET
59
62
  end
60
63
 
61
- path = if _scroll_id
62
- "_search/scroll/#{Utils.listify(_scroll_id)}"
63
- else
64
- "_search/scroll"
65
- end
64
+ path = "_search/scroll"
66
65
  params = Utils.process_params(arguments)
67
66
 
68
67
  ElasticsearchServerless::API::Response.new(
@@ -23,7 +23,7 @@ module ElasticsearchServerless
23
23
  module Security
24
24
  module Actions
25
25
  # Create an API key.
26
- # Creates an API key for access without requiring basic authentication.
26
+ # Create an API key for access without requiring basic authentication.
27
27
  # A successful request returns a JSON structure that contains the API key, its unique id, and its name.
28
28
  # If applicable, it also returns expiration information for the API key in milliseconds.
29
29
  # NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys.
@@ -20,21 +20,19 @@
20
20
  #
21
21
  module ElasticsearchServerless
22
22
  module API
23
- module Indices
23
+ module Security
24
24
  module Actions
25
- # Delete data stream lifecycles.
26
- # Removes the data stream lifecycle from a data stream, rendering it not managed by the data stream lifecycle.
25
+ # Delete roles.
26
+ # Delete roles in the native realm.
27
27
  #
28
- # @option arguments [String, Array<String>] :name A comma-separated list of data streams of which the data stream lifecycle will be deleted; use +*+ to get all data streams (*Required*)
29
- # @option arguments [String, Array<String>] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open)
30
- # @option arguments [Time] :master_timeout Specify timeout for connection to master
31
- # @option arguments [Time] :timeout Explicit timestamp for the document
28
+ # @option arguments [String] :name Role name (*Required*)
29
+ # @option arguments [String] :refresh If +true+ (the default) then refresh the affected shards to make this operation visible to search, if +wait_for+ then wait for a refresh to make this operation visible to search, if +false+ then do nothing with refreshes.
32
30
  # @option arguments [Hash] :headers Custom HTTP headers
33
31
  #
34
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-delete-lifecycle.html
32
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html
35
33
  #
36
- def delete_data_lifecycle(arguments = {})
37
- request_opts = { endpoint: arguments[:endpoint] || "indices.delete_data_lifecycle" }
34
+ def delete_role(arguments = {})
35
+ request_opts = { endpoint: arguments[:endpoint] || "security.delete_role" }
38
36
 
39
37
  defined_params = [:name].inject({}) do |set_variables, variable|
40
38
  set_variables[variable] = arguments[variable] if arguments.key?(variable)
@@ -52,7 +50,7 @@ module ElasticsearchServerless
52
50
  _name = arguments.delete(:name)
53
51
 
54
52
  method = ElasticsearchServerless::API::HTTP_DELETE
55
- path = "_data_stream/#{Utils.listify(_name)}/_lifecycle"
53
+ path = "_security/role/#{Utils.listify(_name)}"
56
54
  params = Utils.process_params(arguments)
57
55
 
58
56
  ElasticsearchServerless::API::Response.new(
@@ -20,17 +20,17 @@
20
20
  #
21
21
  module ElasticsearchServerless
22
22
  module API
23
- module Enrich
23
+ module Security
24
24
  module Actions
25
- # Get enrich stats.
26
- # Returns enrich coordinator statistics and information about enrich policies that are currently executing.
25
+ # Get builtin privileges.
26
+ # Get the list of cluster privileges and index privileges that are available in this version of Elasticsearch.
27
27
  #
28
28
  # @option arguments [Hash] :headers Custom HTTP headers
29
29
  #
30
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-stats-api.html
30
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-builtin-privileges.html
31
31
  #
32
- def stats(arguments = {})
33
- request_opts = { endpoint: arguments[:endpoint] || "enrich.stats" }
32
+ def get_builtin_privileges(arguments = {})
33
+ request_opts = { endpoint: arguments[:endpoint] || "security.get_builtin_privileges" }
34
34
 
35
35
  arguments = arguments.clone
36
36
  headers = arguments.delete(:headers) || {}
@@ -38,7 +38,7 @@ module ElasticsearchServerless
38
38
  body = nil
39
39
 
40
40
  method = ElasticsearchServerless::API::HTTP_GET
41
- path = "_enrich/_stats"
41
+ path = "_security/privilege/_builtin"
42
42
  params = {}
43
43
 
44
44
  ElasticsearchServerless::API::Response.new(
@@ -0,0 +1,72 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+ #
18
+ # Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
19
+ # @see https://github.com/elastic/elasticsearch-specification
20
+ #
21
+ module ElasticsearchServerless
22
+ module API
23
+ module Security
24
+ module Actions
25
+ # Get roles.
26
+ # Get roles in the native realm.
27
+ #
28
+ # @option arguments [String, Array<String>] :name The name of the role. You can specify multiple roles as a comma-separated list. If you do not specify this parameter, the API returns information about all roles.
29
+ # @option arguments [Hash] :headers Custom HTTP headers
30
+ #
31
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html
32
+ #
33
+ def get_role(arguments = {})
34
+ request_opts = { endpoint: arguments[:endpoint] || "security.get_role" }
35
+
36
+ defined_params = [:name].inject({}) do |set_variables, variable|
37
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
38
+ set_variables
39
+ end
40
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
41
+
42
+ arguments = arguments.clone
43
+ headers = arguments.delete(:headers) || {}
44
+
45
+ body = nil
46
+
47
+ _name = arguments.delete(:name)
48
+
49
+ method = ElasticsearchServerless::API::HTTP_GET
50
+ path = if _name
51
+ "_security/role/#{Utils.listify(_name)}"
52
+ else
53
+ "_security/role"
54
+ end
55
+ params = Utils.process_params(arguments)
56
+
57
+ if Array(arguments[:ignore]).include?(404)
58
+ Utils.rescue_from_not_found {
59
+ ElasticsearchServerless::API::Response.new(
60
+ perform_request(method, path, params, body, headers, request_opts)
61
+ )
62
+ }
63
+ else
64
+ ElasticsearchServerless::API::Response.new(
65
+ perform_request(method, path, params, body, headers, request_opts)
66
+ )
67
+ end
68
+ end
69
+ end
70
+ end
71
+ end
72
+ end
@@ -23,7 +23,7 @@ module ElasticsearchServerless
23
23
  module Security
24
24
  module Actions
25
25
  # Check user privileges.
26
- # Determines whether the specified user has a specified list of privileges.
26
+ # Determine whether the specified user has a specified list of privileges.
27
27
  #
28
28
  # @option arguments [String] :user Username
29
29
  # @option arguments [Hash] :headers Custom HTTP headers
@@ -23,13 +23,14 @@ module ElasticsearchServerless
23
23
  module Security
24
24
  module Actions
25
25
  # Invalidate API keys.
26
- # Invalidates one or more API keys.
26
+ # This API invalidates API keys created by the create API key or grant API key APIs.
27
+ # Invalidated API keys fail authentication, but they can still be viewed using the get API key information and query API key information APIs, for at least the configured retention period, until they are automatically deleted.
27
28
  # The +manage_api_key+ privilege allows deleting any API keys.
28
29
  # The +manage_own_api_key+ only allows deleting API keys that are owned by the user.
29
30
  # In addition, with the +manage_own_api_key+ privilege, an invalidation request must be issued in one of the three formats:
30
31
  # - Set the parameter +owner=true+.
31
32
  # - Or, set both +username+ and +realm_name+ to match the user’s identity.
32
- # - Or, if the request is issued by an API key, i.e. an API key invalidates itself, specify its ID in the +ids+ field.
33
+ # - Or, if the request is issued by an API key, that is to say an API key invalidates itself, specify its ID in the +ids+ field.
33
34
  #
34
35
  # @option arguments [Hash] :headers Custom HTTP headers
35
36
  # @option arguments [Hash] :body request body
@@ -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
@@ -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.5.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.5.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-11-05 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