elasticsearch-serverless 0.1.0.20231031.pre → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/elasticsearch-serverless/api/async_search/delete.rb +4 -1
- data/lib/elasticsearch-serverless/api/async_search/get.rb +2 -1
- data/lib/elasticsearch-serverless/api/async_search/status.rb +3 -1
- data/lib/elasticsearch-serverless/api/async_search/submit.rb +5 -1
- data/lib/elasticsearch-serverless/api/bulk.rb +2 -1
- data/lib/elasticsearch-serverless/api/cat/aliases.rb +3 -1
- data/lib/elasticsearch-serverless/api/cat/component_templates.rb +4 -1
- data/lib/elasticsearch-serverless/api/cat/count.rb +4 -1
- data/lib/elasticsearch-serverless/api/cat/indices.rb +6 -1
- data/lib/elasticsearch-serverless/api/cat/ml_data_frame_analytics.rb +5 -1
- data/lib/elasticsearch-serverless/api/cat/ml_datafeeds.rb +8 -1
- data/lib/elasticsearch-serverless/api/cat/ml_jobs.rb +8 -1
- data/lib/elasticsearch-serverless/api/cat/ml_trained_models.rb +5 -1
- data/lib/elasticsearch-serverless/api/cat/transforms.rb +5 -1
- data/lib/elasticsearch-serverless/api/clear_scroll.rb +1 -1
- data/lib/elasticsearch-serverless/api/close_point_in_time.rb +1 -1
- data/lib/elasticsearch-serverless/api/cluster/delete_component_template.rb +2 -1
- data/lib/elasticsearch-serverless/api/cluster/get_component_template.rb +1 -1
- data/lib/elasticsearch-serverless/api/cluster/put_component_template.rb +15 -1
- data/lib/elasticsearch-serverless/api/connector/check_in.rb +57 -0
- data/lib/elasticsearch-serverless/api/connector/delete.rb +58 -0
- data/lib/elasticsearch-serverless/api/connector/get.rb +57 -0
- data/lib/elasticsearch-serverless/api/connector/last_sync.rb +59 -0
- data/lib/elasticsearch-serverless/api/connector/list.rb +58 -0
- data/lib/elasticsearch-serverless/api/connector/post.rb +53 -0
- data/lib/elasticsearch-serverless/api/connector/put.rb +60 -0
- data/lib/elasticsearch-serverless/api/connector/sync_job_cancel.rb +58 -0
- data/lib/elasticsearch-serverless/api/connector/sync_job_delete.rb +58 -0
- data/lib/elasticsearch-serverless/api/connector/sync_job_get.rb +58 -0
- data/lib/elasticsearch-serverless/api/connector/sync_job_list.rb +57 -0
- data/lib/elasticsearch-serverless/api/connector/sync_job_post.rb +55 -0
- data/lib/elasticsearch-serverless/api/connector/update_active_filtering.rb +57 -0
- data/lib/elasticsearch-serverless/api/connector/update_api_key_id.rb +59 -0
- data/lib/elasticsearch-serverless/api/connector/update_configuration.rb +59 -0
- data/lib/elasticsearch-serverless/api/connector/update_error.rb +59 -0
- data/lib/elasticsearch-serverless/api/connector/update_filtering.rb +59 -0
- data/lib/elasticsearch-serverless/api/connector/update_filtering_validation.rb +59 -0
- data/lib/elasticsearch-serverless/api/connector/update_index_name.rb +59 -0
- data/lib/elasticsearch-serverless/api/connector/update_name.rb +59 -0
- data/lib/elasticsearch-serverless/api/connector/update_native.rb +59 -0
- data/lib/elasticsearch-serverless/api/connector/update_pipeline.rb +59 -0
- data/lib/elasticsearch-serverless/api/connector/update_scheduling.rb +59 -0
- data/lib/elasticsearch-serverless/api/connector/update_service_type.rb +59 -0
- data/lib/elasticsearch-serverless/api/connector/update_status.rb +59 -0
- data/lib/elasticsearch-serverless/api/create.rb +2 -3
- data/lib/elasticsearch-serverless/api/delete.rb +1 -1
- data/lib/elasticsearch-serverless/api/delete_by_query.rb +1 -1
- data/lib/elasticsearch-serverless/api/delete_script.rb +1 -1
- data/lib/elasticsearch-serverless/api/enrich/get_policy.rb +1 -1
- data/lib/elasticsearch-serverless/api/enrich/put_policy.rb +1 -1
- data/lib/elasticsearch-serverless/api/enrich/stats.rb +1 -1
- data/lib/elasticsearch-serverless/api/eql/delete.rb +2 -1
- data/lib/elasticsearch-serverless/api/eql/get.rb +1 -1
- data/lib/elasticsearch-serverless/api/eql/get_status.rb +1 -1
- data/lib/elasticsearch-serverless/api/esql/query.rb +57 -0
- data/lib/elasticsearch-serverless/api/exists.rb +1 -1
- data/lib/elasticsearch-serverless/api/exists_source.rb +1 -1
- data/lib/elasticsearch-serverless/api/explain.rb +1 -1
- data/lib/elasticsearch-serverless/api/field_caps.rb +4 -1
- data/lib/elasticsearch-serverless/api/get.rb +1 -0
- data/lib/elasticsearch-serverless/api/get_script.rb +1 -1
- data/lib/elasticsearch-serverless/api/graph/explore.rb +1 -1
- data/lib/elasticsearch-serverless/api/index.rb +2 -1
- data/lib/elasticsearch-serverless/api/indices/analyze.rb +1 -1
- data/lib/elasticsearch-serverless/api/indices/create.rb +2 -2
- data/lib/elasticsearch-serverless/api/indices/create_data_stream.rb +2 -1
- data/lib/elasticsearch-serverless/api/indices/data_streams_stats.rb +1 -1
- data/lib/elasticsearch-serverless/api/indices/delete.rb +1 -1
- data/lib/elasticsearch-serverless/api/indices/delete_alias.rb +1 -1
- data/lib/elasticsearch-serverless/api/indices/delete_data_lifecycle.rb +1 -1
- data/lib/elasticsearch-serverless/api/indices/delete_data_stream.rb +1 -1
- data/lib/elasticsearch-serverless/api/indices/delete_index_template.rb +4 -1
- data/lib/elasticsearch-serverless/api/indices/exists.rb +1 -1
- data/lib/elasticsearch-serverless/api/indices/exists_alias.rb +1 -1
- data/lib/elasticsearch-serverless/api/indices/get.rb +2 -1
- data/lib/elasticsearch-serverless/api/indices/get_alias.rb +1 -1
- data/lib/elasticsearch-serverless/api/indices/get_data_lifecycle.rb +1 -1
- data/lib/elasticsearch-serverless/api/indices/get_data_stream.rb +1 -1
- data/lib/elasticsearch-serverless/api/indices/get_index_template.rb +2 -1
- data/lib/elasticsearch-serverless/api/indices/get_mapping.rb +2 -1
- data/lib/elasticsearch-serverless/api/indices/get_settings.rb +2 -1
- data/lib/elasticsearch-serverless/api/indices/migrate_to_data_stream.rb +10 -1
- data/lib/elasticsearch-serverless/api/indices/modify_data_stream.rb +1 -1
- data/lib/elasticsearch-serverless/api/indices/put_alias.rb +1 -1
- data/lib/elasticsearch-serverless/api/indices/put_data_lifecycle.rb +1 -1
- data/lib/elasticsearch-serverless/api/indices/put_index_template.rb +4 -1
- data/lib/elasticsearch-serverless/api/indices/put_mapping.rb +3 -1
- data/lib/elasticsearch-serverless/api/indices/put_settings.rb +2 -1
- data/lib/elasticsearch-serverless/api/indices/put_template.rb +60 -0
- data/lib/elasticsearch-serverless/api/indices/refresh.rb +2 -1
- data/lib/elasticsearch-serverless/api/indices/resolve_index.rb +2 -1
- data/lib/elasticsearch-serverless/api/indices/rollover.rb +1 -2
- data/lib/elasticsearch-serverless/api/indices/simulate_index_template.rb +4 -5
- data/lib/elasticsearch-serverless/api/indices/simulate_template.rb +3 -2
- data/lib/elasticsearch-serverless/api/indices/update_aliases.rb +1 -1
- data/lib/elasticsearch-serverless/api/indices/validate_query.rb +1 -1
- data/lib/elasticsearch-serverless/api/inference/delete.rb +66 -0
- data/lib/elasticsearch-serverless/api/inference/get.rb +64 -0
- data/lib/elasticsearch-serverless/api/inference/inference.rb +66 -0
- data/lib/elasticsearch-serverless/api/inference/put.rb +66 -0
- data/lib/elasticsearch-serverless/api/ingest/delete_pipeline.rb +1 -1
- data/lib/elasticsearch-serverless/api/ingest/get_pipeline.rb +2 -1
- data/lib/elasticsearch-serverless/api/ingest/processor_grok.rb +3 -1
- data/lib/elasticsearch-serverless/api/ingest/put_pipeline.rb +2 -1
- data/lib/elasticsearch-serverless/api/ingest/simulate.rb +1 -1
- data/lib/elasticsearch-serverless/api/license/get.rb +2 -1
- data/lib/elasticsearch-serverless/api/logstash/delete_pipeline.rb +1 -1
- data/lib/elasticsearch-serverless/api/logstash/get_pipeline.rb +1 -1
- data/lib/elasticsearch-serverless/api/logstash/put_pipeline.rb +1 -1
- data/lib/elasticsearch-serverless/api/machine_learning/close_job.rb +5 -1
- data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar.rb +1 -1
- data/lib/elasticsearch-serverless/api/machine_learning/delete_data_frame_analytics.rb +1 -1
- data/lib/elasticsearch-serverless/api/machine_learning/delete_filter.rb +2 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_job.rb +8 -1
- data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model.rb +2 -1
- data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model_alias.rb +4 -1
- data/lib/elasticsearch-serverless/api/machine_learning/estimate_model_memory.rb +3 -1
- data/lib/elasticsearch-serverless/api/machine_learning/evaluate_data_frame.rb +4 -0
- data/lib/elasticsearch-serverless/api/machine_learning/flush_job.rb +8 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics.rb +3 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_datafeed_stats.rb +6 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_datafeeds.rb +5 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_filters.rb +1 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_jobs.rb +4 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_overall_buckets.rb +17 -1
- data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models.rb +2 -2
- data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models_stats.rb +2 -1
- data/lib/elasticsearch-serverless/api/machine_learning/infer_trained_model.rb +63 -0
- data/lib/elasticsearch-serverless/api/machine_learning/open_job.rb +7 -0
- data/lib/elasticsearch-serverless/api/machine_learning/post_calendar_events.rb +1 -1
- data/lib/elasticsearch-serverless/api/machine_learning/preview_data_frame_analytics.rb +1 -1
- data/lib/elasticsearch-serverless/api/machine_learning/preview_datafeed.rb +8 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_calendar.rb +1 -1
- data/lib/elasticsearch-serverless/api/machine_learning/put_calendar_job.rb +1 -1
- data/lib/elasticsearch-serverless/api/machine_learning/put_data_frame_analytics.rb +2 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_datafeed.rb +9 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_filter.rb +2 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_job.rb +1 -1
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model.rb +2 -1
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_alias.rb +16 -1
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_definition_part.rb +1 -1
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_vocabulary.rb +3 -1
- data/lib/elasticsearch-serverless/api/machine_learning/reset_job.rb +5 -1
- data/lib/elasticsearch-serverless/api/machine_learning/start_data_frame_analytics.rb +11 -0
- data/lib/elasticsearch-serverless/api/machine_learning/start_datafeed.rb +12 -0
- data/lib/elasticsearch-serverless/api/machine_learning/start_trained_model_deployment.rb +1 -1
- data/lib/elasticsearch-serverless/api/machine_learning/stop_data_frame_analytics.rb +2 -0
- data/lib/elasticsearch-serverless/api/machine_learning/stop_datafeed.rb +2 -0
- data/lib/elasticsearch-serverless/api/machine_learning/stop_trained_model_deployment.rb +1 -1
- data/lib/elasticsearch-serverless/api/machine_learning/update_data_frame_analytics.rb +1 -1
- data/lib/elasticsearch-serverless/api/machine_learning/update_datafeed.rb +5 -1
- data/lib/elasticsearch-serverless/api/machine_learning/update_filter.rb +1 -1
- data/lib/elasticsearch-serverless/api/machine_learning/update_trained_model_deployment.rb +55 -0
- data/lib/elasticsearch-serverless/api/mget.rb +1 -0
- data/lib/elasticsearch-serverless/api/msearch_template.rb +1 -1
- data/lib/elasticsearch-serverless/api/open_point_in_time.rb +6 -1
- data/lib/elasticsearch-serverless/api/put_script.rb +1 -1
- data/lib/elasticsearch-serverless/api/query_rules/delete_rule.rb +57 -0
- data/lib/elasticsearch-serverless/api/{query_ruleset/delete.rb → query_rules/delete_ruleset.rb} +2 -6
- data/lib/elasticsearch-serverless/api/query_rules/get_rule.rb +57 -0
- data/lib/elasticsearch-serverless/api/{query_ruleset/get.rb → query_rules/get_ruleset.rb} +3 -7
- data/lib/elasticsearch-serverless/api/{query_ruleset/list.rb → query_rules/list_rulesets.rb} +3 -7
- data/lib/elasticsearch-serverless/api/query_rules/put_rule.rb +59 -0
- data/lib/elasticsearch-serverless/api/{query_ruleset/put.rb → query_rules/put_ruleset.rb} +2 -6
- data/lib/elasticsearch-serverless/api/rank_eval.rb +1 -1
- data/lib/elasticsearch-serverless/api/render_search_template.rb +1 -1
- data/lib/elasticsearch-serverless/api/scripts_painless_execute.rb +1 -1
- data/lib/elasticsearch-serverless/api/search.rb +4 -1
- data/lib/elasticsearch-serverless/api/search_application/get.rb +1 -1
- data/lib/elasticsearch-serverless/api/search_application/search.rb +3 -2
- data/lib/elasticsearch-serverless/api/search_template.rb +1 -1
- data/lib/elasticsearch-serverless/api/security/authenticate.rb +3 -1
- data/lib/elasticsearch-serverless/api/security/create_api_key.rb +3 -0
- data/lib/elasticsearch-serverless/api/security/get_api_key.rb +4 -0
- data/lib/elasticsearch-serverless/api/security/invalidate_api_key.rb +6 -0
- data/lib/elasticsearch-serverless/api/security/query_api_keys.rb +4 -2
- data/lib/elasticsearch-serverless/api/security/update_api_key.rb +66 -0
- data/lib/elasticsearch-serverless/api/synonyms/put_synonym.rb +1 -1
- data/lib/elasticsearch-serverless/api/tasks/get.rb +57 -0
- data/lib/elasticsearch-serverless/api/transform/delete_transform.rb +1 -1
- data/lib/elasticsearch-serverless/api/transform/preview_transform.rb +4 -0
- data/lib/elasticsearch-serverless/api/transform/put_transform.rb +21 -1
- data/lib/elasticsearch-serverless/api/transform/reset_transform.rb +3 -1
- data/lib/elasticsearch-serverless/api/transform/schedule_now_transform.rb +5 -0
- data/lib/elasticsearch-serverless/api/transform/start_transform.rb +16 -1
- data/lib/elasticsearch-serverless/api/transform/update_transform.rb +6 -0
- data/lib/elasticsearch-serverless/api/update_by_query.rb +2 -2
- data/lib/elasticsearch-serverless/api.rb +6 -4
- data/lib/elasticsearch-serverless/version.rb +3 -3
- data/lib/elasticsearch-serverless.rb +13 -5
- metadata +59 -7
@@ -0,0 +1,59 @@
|
|
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 rule within a query ruleset.
|
26
|
+
#
|
27
|
+
# @option arguments [String] :ruleset_id The unique identifier of the query ruleset containing the rule to be created or updated (*Required*)
|
28
|
+
# @option arguments [String] :rule_id The unique identifier of the query rule within the specified ruleset to be created or updated (*Required*)
|
29
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
30
|
+
# @option arguments [Hash] :body request body
|
31
|
+
#
|
32
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-query-rule.html
|
33
|
+
#
|
34
|
+
def put_rule(arguments = {})
|
35
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
36
|
+
raise ArgumentError, "Required argument 'ruleset_id' missing" unless arguments[:ruleset_id]
|
37
|
+
raise ArgumentError, "Required argument 'rule_id' missing" unless arguments[:rule_id]
|
38
|
+
|
39
|
+
arguments = arguments.clone
|
40
|
+
headers = arguments.delete(:headers) || {}
|
41
|
+
|
42
|
+
body = arguments.delete(:body)
|
43
|
+
|
44
|
+
_ruleset_id = arguments.delete(:ruleset_id)
|
45
|
+
|
46
|
+
_rule_id = arguments.delete(:rule_id)
|
47
|
+
|
48
|
+
method = ElasticsearchServerless::API::HTTP_PUT
|
49
|
+
path = "_query_rules/#{Utils.listify(_ruleset_id)}/_rule/#{Utils.listify(_rule_id)}"
|
50
|
+
params = {}
|
51
|
+
|
52
|
+
ElasticsearchServerless::API::Response.new(
|
53
|
+
perform_request(method, path, params, body, headers)
|
54
|
+
)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -20,13 +20,9 @@
|
|
20
20
|
#
|
21
21
|
module ElasticsearchServerless
|
22
22
|
module API
|
23
|
-
module
|
23
|
+
module QueryRules
|
24
24
|
module Actions
|
25
25
|
# Creates or updates a query ruleset.
|
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] :ruleset_id The unique identifier of the query ruleset to be created or updated (*Required*)
|
32
28
|
# @option arguments [Hash] :headers Custom HTTP headers
|
@@ -34,7 +30,7 @@ module ElasticsearchServerless
|
|
34
30
|
#
|
35
31
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-query-ruleset.html
|
36
32
|
#
|
37
|
-
def
|
33
|
+
def put_ruleset(arguments = {})
|
38
34
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
39
35
|
raise ArgumentError, "Required argument 'ruleset_id' missing" unless arguments[:ruleset_id]
|
40
36
|
|
@@ -21,7 +21,7 @@
|
|
21
21
|
module ElasticsearchServerless
|
22
22
|
module API
|
23
23
|
module Actions
|
24
|
-
#
|
24
|
+
# Enables you to evaluate the quality of ranked search results over a set of typical search queries.
|
25
25
|
#
|
26
26
|
# @option arguments [String, Array] :index Comma-separated list of data streams, indices, and index aliases used to limit the request. Wildcard (+*+) expressions are supported. To target all data streams and indices in a cluster, omit this parameter or use +_all+ or +*+.
|
27
27
|
# @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+. Server default: true.
|
@@ -21,7 +21,7 @@
|
|
21
21
|
module ElasticsearchServerless
|
22
22
|
module API
|
23
23
|
module Actions
|
24
|
-
#
|
24
|
+
# Renders a search template as a search request body.
|
25
25
|
#
|
26
26
|
# @option arguments [String] :id ID of the search template to render. If no +source+ is specified, this or the +id+ request body parameter is required.
|
27
27
|
# @option arguments [Hash] :headers Custom HTTP headers
|
@@ -21,7 +21,7 @@
|
|
21
21
|
module ElasticsearchServerless
|
22
22
|
module API
|
23
23
|
module Actions
|
24
|
-
#
|
24
|
+
# Runs a script and returns a result.
|
25
25
|
# This functionality is Experimental and may be changed or removed
|
26
26
|
# completely in a future release. Elastic will take a best effort approach
|
27
27
|
# to fix any issues, but experimental features are not subject to the
|
@@ -21,7 +21,9 @@
|
|
21
21
|
module ElasticsearchServerless
|
22
22
|
module API
|
23
23
|
module Actions
|
24
|
-
# Returns
|
24
|
+
# Returns search hits that match the query defined in the request.
|
25
|
+
# You can provide search queries using the +q+ query string parameter or the request body.
|
26
|
+
# If both are specified, only the query parameter is used.
|
25
27
|
#
|
26
28
|
# @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (+*+). To search all data streams and indices, omit this parameter or use +*+ or +_all+.
|
27
29
|
# @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+. Server default: true.
|
@@ -67,6 +69,7 @@ module ElasticsearchServerless
|
|
67
69
|
# @option arguments [Integer] :size Defines the number of hits to return. By default, you cannot page through more than 10,000 hits using the +from+ and +size+ parameters. To page through more hits, use the +search_after+ parameter. Server default: 10.
|
68
70
|
# @option arguments [Integer] :from Starting document offset. Needs to be non-negative. By default, you cannot page through more than 10,000 hits using the +from+ and +size+ parameters. To page through more hits, use the +search_after+ parameter. Server default: 0.
|
69
71
|
# @option arguments [String] :sort A comma-separated list of <field>:<direction> pairs.
|
72
|
+
# @option arguments [Boolean] :force_synthetic_source Should this request force synthetic _source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index.
|
70
73
|
# @option arguments [Hash] :headers Custom HTTP headers
|
71
74
|
# @option arguments [Hash] :body request body
|
72
75
|
#
|
@@ -22,7 +22,7 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module SearchApplication
|
24
24
|
module Actions
|
25
|
-
# Returns the details about a search application
|
25
|
+
# Returns the details about a search application
|
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,13 +22,14 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module SearchApplication
|
24
24
|
module Actions
|
25
|
-
# Perform a search against a search application
|
25
|
+
# Perform a search against a search application.
|
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
|
29
29
|
# SLA of official GA features.
|
30
30
|
#
|
31
31
|
# @option arguments [String] :name The name of the search application to be searched. (*Required*)
|
32
|
+
# @option arguments [Boolean] :typed_keys Determines whether aggregation names are prefixed by their respective types in the response.
|
32
33
|
# @option arguments [Hash] :headers Custom HTTP headers
|
33
34
|
# @option arguments [Hash] :body request body
|
34
35
|
#
|
@@ -51,7 +52,7 @@ module ElasticsearchServerless
|
|
51
52
|
end
|
52
53
|
|
53
54
|
path = "_application/search_application/#{Utils.listify(_name)}/_search"
|
54
|
-
params =
|
55
|
+
params = Utils.process_params(arguments)
|
55
56
|
|
56
57
|
ElasticsearchServerless::API::Response.new(
|
57
58
|
perform_request(method, path, params, body, headers)
|
@@ -21,7 +21,7 @@
|
|
21
21
|
module ElasticsearchServerless
|
22
22
|
module API
|
23
23
|
module Actions
|
24
|
-
#
|
24
|
+
# Runs a search with a search template.
|
25
25
|
#
|
26
26
|
# @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (*).
|
27
27
|
# @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+. Server default: true.
|
@@ -22,7 +22,9 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Security
|
24
24
|
module Actions
|
25
|
-
# Enables
|
25
|
+
# Enables you to submit a request with a basic auth header to authenticate a user and retrieve information about the authenticated user.
|
26
|
+
# A successful call returns a JSON structure that shows user information such as their username, the roles that are assigned to the user, any assigned metadata, and information about the realms that authenticated and authorized the user.
|
27
|
+
# If the user cannot be authenticated, this API returns a 401 status code.
|
26
28
|
#
|
27
29
|
# @option arguments [Hash] :headers Custom HTTP headers
|
28
30
|
#
|
@@ -23,6 +23,9 @@ module ElasticsearchServerless
|
|
23
23
|
module Security
|
24
24
|
module Actions
|
25
25
|
# Creates an API key for access without requiring basic authentication.
|
26
|
+
# A successful request returns a JSON structure that contains the API key, its unique id, and its name.
|
27
|
+
# If applicable, it also returns expiration information for the API key in milliseconds.
|
28
|
+
# NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys.
|
26
29
|
#
|
27
30
|
# @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.
|
28
31
|
# @option arguments [Hash] :headers Custom HTTP headers
|
@@ -23,6 +23,8 @@ module ElasticsearchServerless
|
|
23
23
|
module Security
|
24
24
|
module Actions
|
25
25
|
# Retrieves information for one or more API keys.
|
26
|
+
# NOTE: If you have only the +manage_own_api_key+ privilege, this API returns only the API keys that you own.
|
27
|
+
# If you have +read_security+, +manage_api_key+ or greater privileges (including +manage_security+), this API returns all API keys regardless of ownership.
|
26
28
|
#
|
27
29
|
# @option arguments [String] :id An API key id. This parameter cannot be used with any of +name+, +realm_name+ or +username+.
|
28
30
|
# @option arguments [String] :name An API key name. This parameter cannot be used with any of +id+, +realm_name+ or +username+. It supports prefix search with wildcard.
|
@@ -30,6 +32,8 @@ module ElasticsearchServerless
|
|
30
32
|
# @option arguments [String] :realm_name The name of an authentication realm. This parameter cannot be used with either +id+ or +name+ or when +owner+ flag is set to +true+.
|
31
33
|
# @option arguments [String] :username The username of a user. This parameter cannot be used with either +id+ or +name+ or when +owner+ flag is set to +true+.
|
32
34
|
# @option arguments [Boolean] :with_limited_by Return the snapshot of the owner user's role descriptors associated with the API key. An API key's actual permission is the intersection of its assigned role descriptors and the owner user's role descriptors.
|
35
|
+
# @option arguments [Boolean] :active_only A boolean flag that can be used to query API keys that are currently active. An API key is considered active if it is neither invalidated, nor expired at query time. You can specify this together with other parameters such as +owner+ or +name+. If +active_only+ is false, the response will include both active and inactive (expired or invalidated) keys.
|
36
|
+
# @option arguments [Boolean] :with_profile_uid Determines whether to also retrieve the profile uid, for the API key owner principal, if it exists.
|
33
37
|
# @option arguments [Hash] :headers Custom HTTP headers
|
34
38
|
#
|
35
39
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html
|
@@ -23,6 +23,12 @@ module ElasticsearchServerless
|
|
23
23
|
module Security
|
24
24
|
module Actions
|
25
25
|
# Invalidates one or more API keys.
|
26
|
+
# The +manage_api_key+ privilege allows deleting any API keys.
|
27
|
+
# The +manage_own_api_key+ only allows deleting API keys that are owned by the user.
|
28
|
+
# In addition, with the +manage_own_api_key+ privilege, an invalidation request must be issued in one of the three formats:
|
29
|
+
# - Set the parameter +owner=true+.
|
30
|
+
# - Or, set both +username+ and +realm_name+ to match the user’s identity.
|
31
|
+
# - Or, if the request is issued by an API key, i.e. an API key invalidates itself, specify its ID in the +ids+ field.
|
26
32
|
#
|
27
33
|
# @option arguments [Hash] :headers Custom HTTP headers
|
28
34
|
# @option arguments [Hash] :body request body
|
@@ -22,9 +22,11 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Security
|
24
24
|
module Actions
|
25
|
-
# Retrieves information for API keys
|
25
|
+
# Retrieves information for API keys in a paginated manner. You can optionally filter the results with a query.
|
26
26
|
#
|
27
|
-
# @option arguments [Boolean] :with_limited_by Return the snapshot of the owner user's role descriptors associated with the API key.
|
27
|
+
# @option arguments [Boolean] :with_limited_by Return the snapshot of the owner user's role descriptors associated with the API key. An API key's actual permission is the intersection of its assigned role descriptors and the owner user's role descriptors.
|
28
|
+
# @option arguments [Boolean] :with_profile_uid Determines whether to also retrieve the profile uid, for the API key owner principal, if it exists.
|
29
|
+
# @option arguments [Boolean] :typed_keys Determines whether aggregation names are prefixed by their respective types in the response.
|
28
30
|
# @option arguments [Hash] :headers Custom HTTP headers
|
29
31
|
# @option arguments [Hash] :body request body
|
30
32
|
#
|
@@ -0,0 +1,66 @@
|
|
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
|
+
# Users can only update API keys that they created or that were granted to them.
|
27
|
+
# Use this API to update API keys created by the create API Key or grant API Key APIs.
|
28
|
+
# If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead.
|
29
|
+
# It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key.
|
30
|
+
# This API supports updates to an API key’s access scope and metadata.
|
31
|
+
# The access scope of an API key is derived from the +role_descriptors+ you specify in the request, and a snapshot of the owner user’s permissions at the time of the request.
|
32
|
+
# The snapshot of the owner’s permissions is updated automatically on every call.
|
33
|
+
# If you don’t specify +role_descriptors+ in the request, a call to this API might still change the API key’s access scope.
|
34
|
+
# This change can occur if the owner user’s permissions have changed since the API key was created or last modified.
|
35
|
+
# To update another user’s API key, use the +run_as+ feature to submit a request on behalf of another user.
|
36
|
+
# IMPORTANT: It’s not possible to use an API key as the authentication credential for this API.
|
37
|
+
# To update an API key, the owner user’s credentials are required.
|
38
|
+
#
|
39
|
+
# @option arguments [String] :id The ID of the API key to update. (*Required*)
|
40
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
41
|
+
# @option arguments [Hash] :body request body
|
42
|
+
#
|
43
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-api-key.html
|
44
|
+
#
|
45
|
+
def update_api_key(arguments = {})
|
46
|
+
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
47
|
+
|
48
|
+
arguments = arguments.clone
|
49
|
+
headers = arguments.delete(:headers) || {}
|
50
|
+
|
51
|
+
body = arguments.delete(:body)
|
52
|
+
|
53
|
+
_id = arguments.delete(:id)
|
54
|
+
|
55
|
+
method = ElasticsearchServerless::API::HTTP_PUT
|
56
|
+
path = "_security/api_key/#{Utils.listify(_id)}"
|
57
|
+
params = {}
|
58
|
+
|
59
|
+
ElasticsearchServerless::API::Response.new(
|
60
|
+
perform_request(method, path, params, body, headers)
|
61
|
+
)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -22,7 +22,7 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Synonyms
|
24
24
|
module Actions
|
25
|
-
# Creates or updates a
|
25
|
+
# Creates or updates a synonym set.
|
26
26
|
#
|
27
27
|
# @option arguments [String] :id The id of the synonyms set to be created or updated (*Required*)
|
28
28
|
# @option arguments [Hash] :headers Custom HTTP headers
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
#
|
18
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module Tasks
|
24
|
+
module Actions
|
25
|
+
# Returns information about a task.
|
26
|
+
# This functionality is Experimental and may be changed or removed
|
27
|
+
# completely in a future release. Elastic will take a best effort approach
|
28
|
+
# to fix any issues, but experimental features are not subject to the
|
29
|
+
# support SLA of official GA features.
|
30
|
+
#
|
31
|
+
# @option arguments [String] :task_id ID of the task. (*Required*)
|
32
|
+
# @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
33
|
+
# @option arguments [Boolean] :wait_for_completion If +true+, the request blocks until the task has completed.
|
34
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
35
|
+
#
|
36
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html
|
37
|
+
#
|
38
|
+
def get(arguments = {})
|
39
|
+
arguments = arguments.clone
|
40
|
+
headers = arguments.delete(:headers) || {}
|
41
|
+
|
42
|
+
body = nil
|
43
|
+
|
44
|
+
_task_id = arguments.delete(:task_id)
|
45
|
+
|
46
|
+
method = ElasticsearchServerless::API::HTTP_GET
|
47
|
+
path = "_tasks/#{Utils.listify(_task_id)}"
|
48
|
+
params = Utils.process_params(arguments)
|
49
|
+
|
50
|
+
ElasticsearchServerless::API::Response.new(
|
51
|
+
perform_request(method, path, params, body, headers)
|
52
|
+
)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -22,7 +22,7 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Transform
|
24
24
|
module Actions
|
25
|
-
# Deletes
|
25
|
+
# Deletes a transform.
|
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.
|
@@ -24,6 +24,10 @@ module ElasticsearchServerless
|
|
24
24
|
module Actions
|
25
25
|
# Previews a transform.
|
26
26
|
#
|
27
|
+
# It returns a maximum of 100 results. The calculations are based on all the current data in the source index. It also
|
28
|
+
# generates a list of mappings and settings for the destination index. These values are determined based on the field
|
29
|
+
# types of the source index and the transform aggregations.
|
30
|
+
#
|
27
31
|
# @option arguments [String] :transform_id Identifier for the transform to preview. If you specify this path parameter, you cannot provide transform configuration details in the request body.
|
28
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.
|
29
33
|
# @option arguments [Hash] :headers Custom HTTP headers
|
@@ -22,7 +22,27 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Transform
|
24
24
|
module Actions
|
25
|
-
#
|
25
|
+
# Creates a transform.
|
26
|
+
#
|
27
|
+
# A transform copies data from source indices, transforms it, and persists it into an entity-centric destination index. You can also think of the destination index as a two-dimensional tabular data structure (known as
|
28
|
+
# a data frame). The ID for each document in the data frame is generated from a hash of the entity, so there is a
|
29
|
+
# unique row per entity.
|
30
|
+
#
|
31
|
+
# You must choose either the latest or pivot method for your transform; you cannot use both in a single transform. If
|
32
|
+
# you choose to use the pivot method for your transform, the entities are defined by the set of +group_by+ fields in
|
33
|
+
# the pivot object. If you choose to use the latest method, the entities are defined by the +unique_key+ field values
|
34
|
+
# in the latest object.
|
35
|
+
#
|
36
|
+
# You must have +create_index+, +index+, and +read+ privileges on the destination index and +read+ and
|
37
|
+
# +view_index_metadata+ privileges on the source indices. When Elasticsearch security features are enabled, the
|
38
|
+
# transform remembers which roles the user that created it had at the time of creation and uses those same roles. If
|
39
|
+
# those roles do not have the required privileges on the source and destination indices, the transform fails when it
|
40
|
+
# attempts unauthorized operations.
|
41
|
+
#
|
42
|
+
# NOTE: You must use Kibana or this API to create a transform. Do not add a transform directly into any
|
43
|
+
# +.transform-internal*+ indices using the Elasticsearch index API. If Elasticsearch security features are enabled, do
|
44
|
+
# not give users any privileges on +.transform-internal*+ indices. If you used transforms prior to 7.5, also do not
|
45
|
+
# give users any privileges on +.data-frame-internal*+ indices.
|
26
46
|
#
|
27
47
|
# @option arguments [String] :transform_id Identifier for the transform. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It has a 64 character limit and must start and end with alphanumeric characters. (*Required*)
|
28
48
|
# @option arguments [Boolean] :defer_validation When the transform is created, a series of validations occur to ensure its success. For example, there is a check for the existence of the source indices and a check that the destination index is not part of the source index pattern. You can use this parameter to skip the checks, for example when the source index does not exist until after the transform is created. The validations are always run when you start the transform, however, with the exception of privilege checks.
|
@@ -22,7 +22,9 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Transform
|
24
24
|
module Actions
|
25
|
-
# Resets
|
25
|
+
# Resets a transform.
|
26
|
+
# Before you can reset it, you must stop it; alternatively, use the +force+ query parameter.
|
27
|
+
# If the destination index was created by the transform, it is deleted.
|
26
28
|
#
|
27
29
|
# @option arguments [String] :transform_id Identifier for the transform. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It has a 64 character limit and must start and end with alphanumeric characters. (*Required*)
|
28
30
|
# @option arguments [Boolean] :force If this value is +true+, the transform is reset regardless of its current state. If it's +false+, the transform must be stopped before it can be reset.
|
@@ -24,6 +24,11 @@ module ElasticsearchServerless
|
|
24
24
|
module Actions
|
25
25
|
# Schedules now a transform.
|
26
26
|
#
|
27
|
+
# If you _schedule_now a transform, it will process the new data instantly,
|
28
|
+
# without waiting for the configured frequency interval. After _schedule_now API is called,
|
29
|
+
# the transform will be processed again at now + frequency unless _schedule_now API
|
30
|
+
# is called again in the meantime.
|
31
|
+
#
|
27
32
|
# @option arguments [String] :transform_id Identifier for the transform. (*Required*)
|
28
33
|
# @option arguments [Time] :timeout Controls the time to wait for the scheduling to take place Server default: 30s.
|
29
34
|
# @option arguments [Hash] :headers Custom HTTP headers
|
@@ -22,7 +22,22 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Transform
|
24
24
|
module Actions
|
25
|
-
# Starts
|
25
|
+
# Starts a transform.
|
26
|
+
#
|
27
|
+
# When you start a transform, it creates the destination index if it does not already exist. The +number_of_shards+ is
|
28
|
+
# set to +1+ and the +auto_expand_replicas+ is set to +0-1+. If it is a pivot transform, it deduces the mapping
|
29
|
+
# definitions for the destination index from the source indices and the transform aggregations. If fields in the
|
30
|
+
# destination index are derived from scripts (as in the case of +scripted_metric+ or +bucket_script+ aggregations),
|
31
|
+
# the transform uses dynamic mappings unless an index template exists. If it is a latest transform, it does not deduce
|
32
|
+
# mapping definitions; it uses dynamic mappings. To use explicit mappings, create the destination index before you
|
33
|
+
# start the transform. Alternatively, you can create an index template, though it does not affect the deduced mappings
|
34
|
+
# in a pivot transform.
|
35
|
+
#
|
36
|
+
# When the transform starts, a series of validations occur to ensure its success. If you deferred validation when you
|
37
|
+
# created the transform, they occur when you start the transform—with the exception of privilege checks. When
|
38
|
+
# Elasticsearch security features are enabled, the transform remembers which roles the user that created it had at the
|
39
|
+
# time of creation and uses those same roles. If those roles do not have the required privileges on the source and
|
40
|
+
# destination indices, the transform fails when it attempts unauthorized operations.
|
26
41
|
#
|
27
42
|
# @option arguments [String] :transform_id Identifier for the transform. (*Required*)
|
28
43
|
# @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.
|
@@ -24,6 +24,12 @@ module ElasticsearchServerless
|
|
24
24
|
module Actions
|
25
25
|
# Updates certain properties of a transform.
|
26
26
|
#
|
27
|
+
# All updated properties except +description+ do not take effect until after the transform starts the next checkpoint,
|
28
|
+
# thus there is data consistency in each checkpoint. To use this API, you must have +read+ and +view_index_metadata+
|
29
|
+
# privileges for the source indices. You must also have +index+ and +read+ privileges for the destination index. When
|
30
|
+
# Elasticsearch security features are enabled, the transform remembers which roles the user who updated it had at the
|
31
|
+
# time of update and runs with those privileges.
|
32
|
+
#
|
27
33
|
# @option arguments [String] :transform_id Identifier for the transform. (*Required*)
|
28
34
|
# @option arguments [Boolean] :defer_validation When true, deferrable validations are not run. This behavior may be desired if the source index does not exist until after the transform is created.
|
29
35
|
# @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.
|
@@ -21,8 +21,8 @@
|
|
21
21
|
module ElasticsearchServerless
|
22
22
|
module API
|
23
23
|
module Actions
|
24
|
-
#
|
25
|
-
#
|
24
|
+
# Updates documents that match the specified query.
|
25
|
+
# If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes.
|
26
26
|
#
|
27
27
|
# @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (+*+). To search all data streams or indices, omit this parameter or use +*+ or +_all+. (*Required*)
|
28
28
|
# @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+. Server default: true.
|
@@ -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,13 +61,15 @@ module ElasticsearchServerless
|
|
61
61
|
:cluster,
|
62
62
|
:enrich,
|
63
63
|
:eql,
|
64
|
+
:esql,
|
64
65
|
:graph,
|
65
66
|
:indices,
|
67
|
+
:inference,
|
66
68
|
:ingest,
|
67
69
|
:license,
|
68
70
|
:logstash,
|
69
71
|
:machine_learning,
|
70
|
-
:
|
72
|
+
:query_rules,
|
71
73
|
:search_application,
|
72
74
|
:security,
|
73
75
|
:sql,
|
@@ -81,7 +83,7 @@ module ElasticsearchServerless
|
|
81
83
|
module_name = if UPPERCASE_APIS.include?(name)
|
82
84
|
name.upcase
|
83
85
|
else
|
84
|
-
name.split(
|
86
|
+
name.split('_').map(&:capitalize).join
|
85
87
|
end
|
86
88
|
class_name = "#{module_name}Client"
|
87
89
|
|
@@ -94,6 +96,6 @@ module ElasticsearchServerless
|
|
94
96
|
end
|
95
97
|
end
|
96
98
|
# TODO: If there are more aliases, make this dynamic and add them to constant
|
97
|
-
alias
|
99
|
+
alias ml machine_learning
|
98
100
|
end
|
99
101
|
end
|
@@ -16,7 +16,7 @@
|
|
16
16
|
# under the License.
|
17
17
|
|
18
18
|
module ElasticsearchServerless
|
19
|
-
API_VERSION = '2023-10-31'
|
20
|
-
CLIENT_VERSION = '0.
|
21
|
-
VERSION =
|
19
|
+
API_VERSION = '2023-10-31'.freeze
|
20
|
+
CLIENT_VERSION = '0.2.0'.freeze
|
21
|
+
VERSION = CLIENT_VERSION
|
22
22
|
end
|
@@ -23,16 +23,24 @@ module ElasticsearchServerless
|
|
23
23
|
class Client
|
24
24
|
include ElasticsearchServerless::API
|
25
25
|
|
26
|
-
VALID_PARAMETERS = [:adapter, :log, :logger, :serializer_class, :trace, :tracer, :headers
|
26
|
+
VALID_PARAMETERS = [:adapter, :log, :logger, :serializer_class, :trace, :tracer, :headers,
|
27
|
+
:request_timeout, :retry_on_status, :retry_on_failure, :delay_on_retry]
|
27
28
|
|
28
29
|
# Initializes an Elasticsearch Serverless Client
|
29
30
|
#
|
30
|
-
# @param
|
31
|
-
# @param
|
32
|
-
# @param
|
31
|
+
# @param [String] api_key Base64 String, format used to authenticate with Elasticsearch
|
32
|
+
# @param [String] url Elasticsearch endpoint
|
33
|
+
# @param [Hash] arguments Other optional arguments.
|
33
34
|
# @option arguments [Symbol] :adapter A specific adapter for Faraday (e.g. `:patron`)
|
34
35
|
# @option arguments [Boolean] :log Use the default logger (disabled by default)
|
35
36
|
# @option arguments [Object] :logger An instance of a Logger-compatible object
|
37
|
+
# @option arguments [Integer] :request_timeout The request timeout to be passed to transport in
|
38
|
+
# options in seconds
|
39
|
+
# @option arguments [Boolean,Number] :retry_on_failure Retry X times when request fails before raising and
|
40
|
+
# exception (false by default)
|
41
|
+
# @option arguments Array<Number> :retry_on_status Retry when specific status codes are returned
|
42
|
+
# @option arguments [Number] :delay_on_retry Delay in milliseconds between each retry (0 by default)
|
43
|
+
# @option arguments [Boolean] :trace Use the default tracer (disabled by default)
|
36
44
|
# @option arguments [Boolean] :trace Use the default tracer (disabled by default)
|
37
45
|
# @option arguments [Object] :tracer An instance of a Logger-compatible object
|
38
46
|
# @option arguments [Constant] :serializer_class A specific serializer class to use, will be initialized by
|
@@ -53,7 +61,7 @@ module ElasticsearchServerless
|
|
53
61
|
'Authorization' => "ApiKey #{api_key}",
|
54
62
|
'Elastic-Api-Version' => ElasticsearchServerless::API_VERSION,
|
55
63
|
user_agent: user_agent
|
56
|
-
}
|
64
|
+
}
|
57
65
|
},
|
58
66
|
compression: true
|
59
67
|
}
|