elasticsearch-serverless 0.0.8.20231031.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/elasticsearch-serverless/api/async_search/delete.rb +53 -0
- data/lib/elasticsearch-serverless/api/async_search/get.rb +56 -0
- data/lib/elasticsearch-serverless/api/async_search/status.rb +53 -0
- data/lib/elasticsearch-serverless/api/async_search/submit.rb +102 -0
- data/lib/elasticsearch-serverless/api/bulk.rb +72 -0
- data/lib/elasticsearch-serverless/api/cat/aliases.rb +64 -0
- data/lib/elasticsearch-serverless/api/cat/component_templates.rb +62 -0
- data/lib/elasticsearch-serverless/api/cat/count.rb +63 -0
- data/lib/elasticsearch-serverless/api/cat/help.rb +55 -0
- data/lib/elasticsearch-serverless/api/cat/indices.rb +69 -0
- data/lib/elasticsearch-serverless/api/cat/ml_data_frame_analytics.rb +67 -0
- data/lib/elasticsearch-serverless/api/cat/ml_datafeeds.rb +66 -0
- data/lib/elasticsearch-serverless/api/cat/ml_jobs.rb +67 -0
- data/lib/elasticsearch-serverless/api/cat/ml_trained_models.rb +68 -0
- data/lib/elasticsearch-serverless/api/cat/transforms.rb +68 -0
- data/lib/elasticsearch-serverless/api/clear_scroll.rb +67 -0
- data/lib/elasticsearch-serverless/api/close_point_in_time.rb +47 -0
- data/lib/elasticsearch-serverless/api/cluster/delete_component_template.rb +55 -0
- data/lib/elasticsearch-serverless/api/cluster/exists_component_template.rb +57 -0
- data/lib/elasticsearch-serverless/api/cluster/get_component_template.rb +59 -0
- data/lib/elasticsearch-serverless/api/cluster/info.rb +53 -0
- data/lib/elasticsearch-serverless/api/cluster/put_component_template.rb +57 -0
- data/lib/elasticsearch-serverless/api/count.rb +73 -0
- data/lib/elasticsearch-serverless/api/create.rb +51 -0
- data/lib/elasticsearch-serverless/api/delete.rb +71 -0
- data/lib/elasticsearch-serverless/api/delete_by_query.rb +82 -0
- data/lib/elasticsearch-serverless/api/delete_script.rb +53 -0
- data/lib/elasticsearch-serverless/api/enrich/delete_policy.rb +53 -0
- data/lib/elasticsearch-serverless/api/enrich/execute_policy.rb +54 -0
- data/lib/elasticsearch-serverless/api/enrich/get_policy.rb +55 -0
- data/lib/elasticsearch-serverless/api/enrich/put_policy.rb +55 -0
- data/lib/elasticsearch-serverless/api/enrich/stats.rb +48 -0
- data/lib/elasticsearch-serverless/api/eql/delete.rb +53 -0
- data/lib/elasticsearch-serverless/api/eql/get.rb +55 -0
- data/lib/elasticsearch-serverless/api/eql/get_status.rb +53 -0
- data/lib/elasticsearch-serverless/api/eql/search.rb +61 -0
- data/lib/elasticsearch-serverless/api/exists.rb +67 -0
- data/lib/elasticsearch-serverless/api/exists_source.rb +66 -0
- data/lib/elasticsearch-serverless/api/explain.rb +73 -0
- data/lib/elasticsearch-serverless/api/field_caps.rb +66 -0
- data/lib/elasticsearch-serverless/api/get.rb +73 -0
- data/lib/elasticsearch-serverless/api/get_script.rb +52 -0
- data/lib/elasticsearch-serverless/api/get_source.rb +65 -0
- data/lib/elasticsearch-serverless/api/graph/explore.rb +61 -0
- data/lib/elasticsearch-serverless/api/index.rb +71 -0
- data/lib/elasticsearch-serverless/api/indices/add_block.rb +62 -0
- data/lib/elasticsearch-serverless/api/indices/analyze.rb +61 -0
- data/lib/elasticsearch-serverless/api/indices/create.rb +57 -0
- data/lib/elasticsearch-serverless/api/indices/create_data_stream.rb +53 -0
- data/lib/elasticsearch-serverless/api/indices/data_streams_stats.rb +56 -0
- data/lib/elasticsearch-serverless/api/indices/delete.rb +66 -0
- data/lib/elasticsearch-serverless/api/indices/delete_alias.rb +61 -0
- data/lib/elasticsearch-serverless/api/indices/delete_data_lifecycle.rb +56 -0
- data/lib/elasticsearch-serverless/api/indices/delete_data_stream.rb +54 -0
- data/lib/elasticsearch-serverless/api/indices/delete_index_template.rb +55 -0
- data/lib/elasticsearch-serverless/api/indices/exists.rb +61 -0
- data/lib/elasticsearch-serverless/api/indices/exists_alias.rb +66 -0
- data/lib/elasticsearch-serverless/api/indices/exists_index_template.rb +56 -0
- data/lib/elasticsearch-serverless/api/indices/explain_data_lifecycle.rb +55 -0
- data/lib/elasticsearch-serverless/api/indices/get.rb +61 -0
- data/lib/elasticsearch-serverless/api/indices/get_alias.rb +66 -0
- data/lib/elasticsearch-serverless/api/indices/get_data_lifecycle.rb +55 -0
- data/lib/elasticsearch-serverless/api/indices/get_data_stream.rb +57 -0
- data/lib/elasticsearch-serverless/api/indices/get_index_template.rb +59 -0
- data/lib/elasticsearch-serverless/api/indices/get_mapping.rb +60 -0
- data/lib/elasticsearch-serverless/api/indices/get_settings.rb +69 -0
- data/lib/elasticsearch-serverless/api/indices/migrate_to_data_stream.rb +53 -0
- data/lib/elasticsearch-serverless/api/indices/modify_data_stream.rb +51 -0
- data/lib/elasticsearch-serverless/api/indices/put_alias.rb +62 -0
- data/lib/elasticsearch-serverless/api/indices/put_data_lifecycle.rb +57 -0
- data/lib/elasticsearch-serverless/api/indices/put_index_template.rb +56 -0
- data/lib/elasticsearch-serverless/api/indices/put_mapping.rb +61 -0
- data/lib/elasticsearch-serverless/api/indices/put_settings.rb +65 -0
- data/lib/elasticsearch-serverless/api/indices/put_template.rb +60 -0
- data/lib/elasticsearch-serverless/api/indices/refresh.rb +58 -0
- data/lib/elasticsearch-serverless/api/indices/resolve_index.rb +54 -0
- data/lib/elasticsearch-serverless/api/indices/rollover.rb +66 -0
- data/lib/elasticsearch-serverless/api/indices/simulate_index_template.rb +57 -0
- data/lib/elasticsearch-serverless/api/indices/simulate_template.rb +59 -0
- data/lib/elasticsearch-serverless/api/indices/update_aliases.rb +53 -0
- data/lib/elasticsearch-serverless/api/indices/validate_query.rb +73 -0
- data/lib/elasticsearch-serverless/api/info.rb +46 -0
- data/lib/elasticsearch-serverless/api/ingest/delete_pipeline.rb +55 -0
- data/lib/elasticsearch-serverless/api/ingest/get_pipeline.rb +57 -0
- data/lib/elasticsearch-serverless/api/ingest/processor_grok.rb +48 -0
- data/lib/elasticsearch-serverless/api/ingest/put_pipeline.rb +58 -0
- data/lib/elasticsearch-serverless/api/ingest/simulate.rb +59 -0
- data/lib/elasticsearch-serverless/api/license/get.rb +50 -0
- data/lib/elasticsearch-serverless/api/logstash/delete_pipeline.rb +53 -0
- data/lib/elasticsearch-serverless/api/logstash/get_pipeline.rb +55 -0
- data/lib/elasticsearch-serverless/api/logstash/put_pipeline.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/close_job.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar.rb +53 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_event.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_job.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_data_frame_analytics.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_datafeed.rb +54 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_filter.rb +53 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_job.rb +56 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model.rb +54 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model_alias.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/estimate_model_memory.rb +51 -0
- data/lib/elasticsearch-serverless/api/machine_learning/evaluate_data_frame.rb +51 -0
- data/lib/elasticsearch-serverless/api/machine_learning/flush_job.rb +59 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_calendar_events.rb +58 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_calendars.rb +63 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics.rb +59 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics_stats.rb +59 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_datafeed_stats.rb +56 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_datafeeds.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_filters.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_job_stats.rb +56 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_jobs.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_overall_buckets.rb +66 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models.rb +62 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models_stats.rb +58 -0
- data/lib/elasticsearch-serverless/api/machine_learning/infer_trained_model.rb +63 -0
- data/lib/elasticsearch-serverless/api/machine_learning/open_job.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/post_calendar_events.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/preview_data_frame_analytics.rb +61 -0
- data/lib/elasticsearch-serverless/api/machine_learning/preview_datafeed.rb +63 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_calendar.rb +54 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_calendar_job.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_data_frame_analytics.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_datafeed.rb +59 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_filter.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_job.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model.rb +56 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_alias.rb +58 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_definition_part.rb +59 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_vocabulary.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/reset_job.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/start_data_frame_analytics.rb +54 -0
- data/lib/elasticsearch-serverless/api/machine_learning/start_datafeed.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/start_trained_model_deployment.rb +60 -0
- data/lib/elasticsearch-serverless/api/machine_learning/stop_data_frame_analytics.rb +56 -0
- data/lib/elasticsearch-serverless/api/machine_learning/stop_datafeed.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/stop_trained_model_deployment.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/update_data_frame_analytics.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/update_datafeed.rb +59 -0
- data/lib/elasticsearch-serverless/api/machine_learning/update_filter.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/update_job.rb +55 -0
- data/lib/elasticsearch-serverless/api/mget.rb +64 -0
- data/lib/elasticsearch-serverless/api/msearch.rb +91 -0
- data/lib/elasticsearch-serverless/api/msearch_template.rb +72 -0
- data/lib/elasticsearch-serverless/api/mtermvectors.rb +75 -0
- data/lib/elasticsearch-serverless/api/open_point_in_time.rb +56 -0
- data/lib/elasticsearch-serverless/api/ping.rb +52 -0
- data/lib/elasticsearch-serverless/api/put_script.rb +62 -0
- data/lib/elasticsearch-serverless/api/query_ruleset/delete.rb +57 -0
- data/lib/elasticsearch-serverless/api/query_ruleset/get.rb +57 -0
- data/lib/elasticsearch-serverless/api/query_ruleset/list.rb +54 -0
- data/lib/elasticsearch-serverless/api/query_ruleset/put.rb +59 -0
- data/lib/elasticsearch-serverless/api/rank_eval.rb +60 -0
- data/lib/elasticsearch-serverless/api/reindex.rb +59 -0
- data/lib/elasticsearch-serverless/api/render_search_template.rb +59 -0
- data/lib/elasticsearch-serverless/api/response.rb +48 -0
- data/lib/elasticsearch-serverless/api/scripts_painless_execute.rb +56 -0
- data/lib/elasticsearch-serverless/api/scroll.rb +66 -0
- data/lib/elasticsearch-serverless/api/search.rb +102 -0
- data/lib/elasticsearch-serverless/api/search_application/delete.rb +57 -0
- data/lib/elasticsearch-serverless/api/search_application/delete_behavioral_analytics.rb +57 -0
- data/lib/elasticsearch-serverless/api/search_application/get.rb +57 -0
- data/lib/elasticsearch-serverless/api/search_application/get_behavioral_analytics.rb +59 -0
- data/lib/elasticsearch-serverless/api/search_application/list.rb +55 -0
- data/lib/elasticsearch-serverless/api/search_application/put.rb +60 -0
- data/lib/elasticsearch-serverless/api/search_application/put_behavioral_analytics.rb +57 -0
- data/lib/elasticsearch-serverless/api/search_application/search.rb +63 -0
- data/lib/elasticsearch-serverless/api/search_mvt.rb +75 -0
- data/lib/elasticsearch-serverless/api/search_template.rb +69 -0
- data/lib/elasticsearch-serverless/api/security/authenticate.rb +48 -0
- data/lib/elasticsearch-serverless/api/security/create_api_key.rb +52 -0
- data/lib/elasticsearch-serverless/api/security/get_api_key.rb +54 -0
- data/lib/elasticsearch-serverless/api/security/has_privileges.rb +58 -0
- data/lib/elasticsearch-serverless/api/security/invalidate_api_key.rb +51 -0
- data/lib/elasticsearch-serverless/api/security/query_api_keys.rb +55 -0
- data/lib/elasticsearch-serverless/api/security/update_api_key.rb +54 -0
- data/lib/elasticsearch-serverless/api/sql/clear_cursor.rb +51 -0
- data/lib/elasticsearch-serverless/api/sql/delete_async.rb +53 -0
- data/lib/elasticsearch-serverless/api/sql/get_async.rb +57 -0
- data/lib/elasticsearch-serverless/api/sql/get_async_status.rb +53 -0
- data/lib/elasticsearch-serverless/api/sql/query.rb +52 -0
- data/lib/elasticsearch-serverless/api/sql/translate.rb +51 -0
- data/lib/elasticsearch-serverless/api/synonyms/delete_synonym.rb +57 -0
- data/lib/elasticsearch-serverless/api/synonyms/delete_synonym_rule.rb +61 -0
- data/lib/elasticsearch-serverless/api/synonyms/get_synonym.rb +59 -0
- data/lib/elasticsearch-serverless/api/synonyms/get_synonym_rule.rb +61 -0
- data/lib/elasticsearch-serverless/api/synonyms/get_synonyms_sets.rb +54 -0
- data/lib/elasticsearch-serverless/api/synonyms/put_synonym.rb +59 -0
- data/lib/elasticsearch-serverless/api/synonyms/put_synonym_rule.rb +63 -0
- data/lib/elasticsearch-serverless/api/tasks/get.rb +57 -0
- data/lib/elasticsearch-serverless/api/terms_enum.rb +57 -0
- data/lib/elasticsearch-serverless/api/termvectors.rb +82 -0
- data/lib/elasticsearch-serverless/api/transform/delete_transform.rb +55 -0
- data/lib/elasticsearch-serverless/api/transform/get_transform.rb +59 -0
- data/lib/elasticsearch-serverless/api/transform/get_transform_stats.rb +57 -0
- data/lib/elasticsearch-serverless/api/transform/preview_transform.rb +62 -0
- data/lib/elasticsearch-serverless/api/transform/put_transform.rb +57 -0
- data/lib/elasticsearch-serverless/api/transform/reset_transform.rb +54 -0
- data/lib/elasticsearch-serverless/api/transform/schedule_now_transform.rb +54 -0
- data/lib/elasticsearch-serverless/api/transform/start_transform.rb +55 -0
- data/lib/elasticsearch-serverless/api/transform/stop_transform.rb +58 -0
- data/lib/elasticsearch-serverless/api/transform/update_transform.rb +57 -0
- data/lib/elasticsearch-serverless/api/update.rb +77 -0
- data/lib/elasticsearch-serverless/api/update_by_query.rb +83 -0
- data/lib/elasticsearch-serverless/api/utils.rb +138 -0
- data/lib/elasticsearch-serverless/api.rb +98 -0
- data/lib/elasticsearch-serverless/version.rb +22 -0
- data/lib/elasticsearch-serverless.rb +105 -0
- metadata +321 -0
@@ -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 Cluster
|
24
|
+
module Actions
|
25
|
+
# Returns one or more component templates
|
26
|
+
#
|
27
|
+
# @option arguments [String] :name Comma-separated list of component template names used to limit the request. Wildcard (+*+) expressions are supported.
|
28
|
+
# @option arguments [Boolean] :flat_settings If +true+, returns settings in flat format.
|
29
|
+
# @option arguments [Boolean] :include_defaults Return all default configurations for the component template (default: false)
|
30
|
+
# @option arguments [Boolean] :local If +true+, the request retrieves information from the local node only. If +false+, information is retrieved from the master node.
|
31
|
+
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
32
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
33
|
+
#
|
34
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html
|
35
|
+
#
|
36
|
+
def get_component_template(arguments = {})
|
37
|
+
arguments = arguments.clone
|
38
|
+
headers = arguments.delete(:headers) || {}
|
39
|
+
|
40
|
+
body = nil
|
41
|
+
|
42
|
+
_name = arguments.delete(:name)
|
43
|
+
|
44
|
+
method = ElasticsearchServerless::API::HTTP_GET
|
45
|
+
path = if _name
|
46
|
+
"_component_template/#{Utils.listify(_name)}"
|
47
|
+
else
|
48
|
+
"_component_template"
|
49
|
+
end
|
50
|
+
params = Utils.process_params(arguments)
|
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
|
@@ -0,0 +1,53 @@
|
|
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 Cluster
|
24
|
+
module Actions
|
25
|
+
# Returns different information about the cluster.
|
26
|
+
#
|
27
|
+
# @option arguments [String, Array<String>] :target Limits the information returned to the specific target. Supports a comma-separated list, such as http,ingest. (*Required*)
|
28
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
29
|
+
#
|
30
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-info.html
|
31
|
+
#
|
32
|
+
def info(arguments = {})
|
33
|
+
raise ArgumentError, "Required argument 'target' missing" unless arguments[:target]
|
34
|
+
|
35
|
+
arguments = arguments.clone
|
36
|
+
headers = arguments.delete(:headers) || {}
|
37
|
+
|
38
|
+
body = nil
|
39
|
+
|
40
|
+
_target = arguments.delete(:target)
|
41
|
+
|
42
|
+
method = ElasticsearchServerless::API::HTTP_GET
|
43
|
+
path = "_info/#{Utils.listify(_target)}"
|
44
|
+
params = {}
|
45
|
+
|
46
|
+
ElasticsearchServerless::API::Response.new(
|
47
|
+
perform_request(method, path, params, body, headers)
|
48
|
+
)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -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 Cluster
|
24
|
+
module Actions
|
25
|
+
# Creates or updates a component template
|
26
|
+
#
|
27
|
+
# @option arguments [String] :name Name of the component template to create. Elasticsearch includes the following built-in component templates: +logs-mappings+; 'logs-settings+; +metrics-mappings+; +metrics-settings+;+synthetics-mapping+; +synthetics-settings+. Elastic Agent uses these templates to configure backing indices for its data streams. If you use Elastic Agent and want to overwrite one of these templates, set the +version+ for your replacement template higher than the current version. If you don’t use Elastic Agent and want to disable all built-in component and index templates, set +stack.templates.enabled+ to +false+ using the cluster update settings API. (*Required*)
|
28
|
+
# @option arguments [Boolean] :create If +true+, this request cannot replace or update existing component templates.
|
29
|
+
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
30
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
31
|
+
# @option arguments [Hash] :body request body
|
32
|
+
#
|
33
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html
|
34
|
+
#
|
35
|
+
def put_component_template(arguments = {})
|
36
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
37
|
+
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
38
|
+
|
39
|
+
arguments = arguments.clone
|
40
|
+
headers = arguments.delete(:headers) || {}
|
41
|
+
|
42
|
+
body = arguments.delete(:body)
|
43
|
+
|
44
|
+
_name = arguments.delete(:name)
|
45
|
+
|
46
|
+
method = ElasticsearchServerless::API::HTTP_PUT
|
47
|
+
path = "_component_template/#{Utils.listify(_name)}"
|
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
|
@@ -0,0 +1,73 @@
|
|
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 Actions
|
24
|
+
# Returns number of documents matching a query.
|
25
|
+
#
|
26
|
+
# @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
|
+
# @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. Server default: true.
|
28
|
+
# @option arguments [String] :analyzer Analyzer to use for the query string. This parameter can only be used when the +q+ query string parameter is specified.
|
29
|
+
# @option arguments [Boolean] :analyze_wildcard If +true+, wildcard and prefix queries are analyzed. This parameter can only be used when the +q+ query string parameter is specified.
|
30
|
+
# @option arguments [String] :default_operator The default operator for query string query: +AND+ or +OR+. This parameter can only be used when the +q+ query string parameter is specified.
|
31
|
+
# @option arguments [String] :df Field to use as default where no field prefix is given in the query string. This parameter can only be used when the +q+ query string parameter is specified.
|
32
|
+
# @option arguments [String, Array<String>] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as +open,hidden+. Server default: open.
|
33
|
+
# @option arguments [Boolean] :ignore_throttled If +true+, concrete, expanded or aliased indices are ignored when frozen. Server default: true.
|
34
|
+
# @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index.
|
35
|
+
# @option arguments [Boolean] :lenient If +true+, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.
|
36
|
+
# @option arguments [Float] :min_score Sets the minimum +_score+ value that documents must have to be included in the result.
|
37
|
+
# @option arguments [String] :preference Specifies the node or shard the operation should be performed on. Random by default.
|
38
|
+
# @option arguments [String] :routing Custom value used to route operations to a specific shard.
|
39
|
+
# @option arguments [Integer] :terminate_after Maximum number of documents to collect for each shard. If a query reaches this limit, Elasticsearch terminates the query early. Elasticsearch collects documents before sorting.
|
40
|
+
# @option arguments [String] :q Query in the Lucene query string syntax.
|
41
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
42
|
+
# @option arguments [Hash] :body request body
|
43
|
+
#
|
44
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html
|
45
|
+
#
|
46
|
+
def count(arguments = {})
|
47
|
+
arguments = arguments.clone
|
48
|
+
headers = arguments.delete(:headers) || {}
|
49
|
+
|
50
|
+
body = arguments.delete(:body)
|
51
|
+
|
52
|
+
_index = arguments.delete(:index)
|
53
|
+
|
54
|
+
method = if body
|
55
|
+
ElasticsearchServerless::API::HTTP_POST
|
56
|
+
else
|
57
|
+
ElasticsearchServerless::API::HTTP_GET
|
58
|
+
end
|
59
|
+
|
60
|
+
path = if _index
|
61
|
+
"#{Utils.listify(_index)}/_count"
|
62
|
+
else
|
63
|
+
"_count"
|
64
|
+
end
|
65
|
+
params = Utils.process_params(arguments)
|
66
|
+
|
67
|
+
ElasticsearchServerless::API::Response.new(
|
68
|
+
perform_request(method, path, params, body, headers)
|
69
|
+
)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,51 @@
|
|
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 Actions
|
24
|
+
# Creates a new document in the index.
|
25
|
+
#
|
26
|
+
# Returns a 409 response when a document with a same ID already exists in the index.
|
27
|
+
#
|
28
|
+
# @option arguments [String] :id Unique identifier for the document. (*Required*)
|
29
|
+
# @option arguments [String] :index Name of the data stream or index to target. If the target doesn’t exist and matches the name or wildcard (+*+) pattern of an index template with a +data_stream+ definition, this request creates the data stream. If the target doesn’t exist and doesn’t match a data stream template, this request creates the index. (*Required*)
|
30
|
+
# @option arguments [String] :pipeline ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, then setting the value to +_none+ disables the default ingest pipeline for this request. If a final pipeline is configured it will always run, regardless of the value of this parameter.
|
31
|
+
# @option arguments [String] :refresh If +true+, Elasticsearch refreshes 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+ do nothing with refreshes. Valid values: +true+, +false+, +wait_for+. Server default: false.
|
32
|
+
# @option arguments [String] :routing Custom value used to route operations to a specific shard.
|
33
|
+
# @option arguments [Time] :timeout Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. Server default: 1m.
|
34
|
+
# @option arguments [Integer] :version Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.
|
35
|
+
# @option arguments [String] :version_type Specific version type: +external+, +external_gte+.
|
36
|
+
# @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation. Set to +all+ or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). Server default: 1.
|
37
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
38
|
+
# @option arguments [Hash] :body document
|
39
|
+
#
|
40
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html
|
41
|
+
#
|
42
|
+
def create(arguments = {})
|
43
|
+
if arguments[:id]
|
44
|
+
index arguments.update op_type: 'create'
|
45
|
+
else
|
46
|
+
index arguments
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,71 @@
|
|
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 Actions
|
24
|
+
# Removes a document from the index.
|
25
|
+
#
|
26
|
+
# @option arguments [String] :id Unique identifier for the document. (*Required*)
|
27
|
+
# @option arguments [String] :index Name of the target index. (*Required*)
|
28
|
+
# @option arguments [Integer] :if_primary_term Only perform the operation if the document has this primary term.
|
29
|
+
# @option arguments [Integer] :if_seq_no Only perform the operation if the document has this sequence number.
|
30
|
+
# @option arguments [String] :refresh If +true+, Elasticsearch refreshes 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+ do nothing with refreshes. Valid values: +true+, +false+, +wait_for+. Server default: false.
|
31
|
+
# @option arguments [String] :routing Custom value used to route operations to a specific shard.
|
32
|
+
# @option arguments [Time] :timeout Period to wait for active shards. Server default: 1m.
|
33
|
+
# @option arguments [Integer] :version Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.
|
34
|
+
# @option arguments [String] :version_type Specific version type: +external+, +external_gte+.
|
35
|
+
# @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation. Set to +all+ or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). Server default: 1.
|
36
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
37
|
+
#
|
38
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html
|
39
|
+
#
|
40
|
+
def delete(arguments = {})
|
41
|
+
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
42
|
+
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
43
|
+
|
44
|
+
arguments = arguments.clone
|
45
|
+
headers = arguments.delete(:headers) || {}
|
46
|
+
|
47
|
+
body = nil
|
48
|
+
|
49
|
+
_id = arguments.delete(:id)
|
50
|
+
|
51
|
+
_index = arguments.delete(:index)
|
52
|
+
|
53
|
+
method = ElasticsearchServerless::API::HTTP_DELETE
|
54
|
+
path = "#{Utils.listify(_index)}/_doc/#{Utils.listify(_id)}"
|
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)
|
61
|
+
)
|
62
|
+
}
|
63
|
+
else
|
64
|
+
ElasticsearchServerless::API::Response.new(
|
65
|
+
perform_request(method, path, params, body, headers)
|
66
|
+
)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -0,0 +1,82 @@
|
|
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 Actions
|
24
|
+
# Deletes documents matching the provided query.
|
25
|
+
#
|
26
|
+
# @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*)
|
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.
|
28
|
+
# @option arguments [String] :analyzer Analyzer to use for the query string.
|
29
|
+
# @option arguments [Boolean] :analyze_wildcard If +true+, wildcard and prefix queries are analyzed.
|
30
|
+
# @option arguments [String] :conflicts What to do if delete by query hits version conflicts: +abort+ or +proceed+. Server default: abort.
|
31
|
+
# @option arguments [String] :default_operator The default operator for query string query: +AND+ or +OR+. Server default: OR.
|
32
|
+
# @option arguments [String] :df Field to use as default where no field prefix is given in the query string.
|
33
|
+
# @option arguments [String, Array<String>] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as +open,hidden+. Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open.
|
34
|
+
# @option arguments [Integer] :from Starting offset (default: 0)
|
35
|
+
# @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index.
|
36
|
+
# @option arguments [Boolean] :lenient If +true+, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.
|
37
|
+
# @option arguments [Integer] :max_docs Maximum number of documents to process. Defaults to all documents.
|
38
|
+
# @option arguments [String] :preference Specifies the node or shard the operation should be performed on. Random by default.
|
39
|
+
# @option arguments [Boolean] :refresh If +true+, Elasticsearch refreshes all shards involved in the delete by query after the request completes.
|
40
|
+
# @option arguments [Boolean] :request_cache If +true+, the request cache is used for this request. Defaults to the index-level setting.
|
41
|
+
# @option arguments [Float] :requests_per_second The throttle for this request in sub-requests per second.
|
42
|
+
# @option arguments [String] :routing Custom value used to route operations to a specific shard.
|
43
|
+
# @option arguments [String] :q Query in the Lucene query string syntax.
|
44
|
+
# @option arguments [Time] :scroll Period to retain the search context for scrolling.
|
45
|
+
# @option arguments [Integer] :scroll_size Size of the scroll request that powers the operation. Server default: 1000.
|
46
|
+
# @option arguments [Time] :search_timeout Explicit timeout for each search request. Defaults to no timeout.
|
47
|
+
# @option arguments [String] :search_type The type of the search operation. Available options: +query_then_fetch+, +dfs_query_then_fetch+.
|
48
|
+
# @option arguments [Integer, String] :slices The number of slices this task should be divided into. Server default: 1.
|
49
|
+
# @option arguments [Array<String>] :sort A comma-separated list of <field>:<direction> pairs.
|
50
|
+
# @option arguments [Array<String>] :stats Specific +tag+ of the request for logging and statistical purposes.
|
51
|
+
# @option arguments [Integer] :terminate_after Maximum number of documents to collect for each shard. If a query reaches this limit, Elasticsearch terminates the query early. Elasticsearch collects documents before sorting. Use with caution. Elasticsearch applies this parameter to each shard handling the request. When possible, let Elasticsearch perform early termination automatically. Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.
|
52
|
+
# @option arguments [Time] :timeout Period each deletion request waits for active shards. Server default: 1m.
|
53
|
+
# @option arguments [Boolean] :version If +true+, returns the document version as part of a hit.
|
54
|
+
# @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation. Set to all or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). Server default: 1.
|
55
|
+
# @option arguments [Boolean] :wait_for_completion If +true+, the request blocks until the operation is complete. Server default: true.
|
56
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
57
|
+
# @option arguments [Hash] :body request body
|
58
|
+
#
|
59
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html
|
60
|
+
#
|
61
|
+
def delete_by_query(arguments = {})
|
62
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
63
|
+
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
64
|
+
|
65
|
+
arguments = arguments.clone
|
66
|
+
headers = arguments.delete(:headers) || {}
|
67
|
+
|
68
|
+
body = arguments.delete(:body)
|
69
|
+
|
70
|
+
_index = arguments.delete(:index)
|
71
|
+
|
72
|
+
method = ElasticsearchServerless::API::HTTP_POST
|
73
|
+
path = "#{Utils.listify(_index)}/_delete_by_query"
|
74
|
+
params = Utils.process_params(arguments)
|
75
|
+
|
76
|
+
ElasticsearchServerless::API::Response.new(
|
77
|
+
perform_request(method, path, params, body, headers)
|
78
|
+
)
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
@@ -0,0 +1,53 @@
|
|
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 Actions
|
24
|
+
# Deletes a script.
|
25
|
+
#
|
26
|
+
# @option arguments [String] :id Identifier for the stored script or search template. (*Required*)
|
27
|
+
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
28
|
+
# @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
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
30
|
+
#
|
31
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
|
32
|
+
#
|
33
|
+
def delete_script(arguments = {})
|
34
|
+
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
35
|
+
|
36
|
+
arguments = arguments.clone
|
37
|
+
headers = arguments.delete(:headers) || {}
|
38
|
+
|
39
|
+
body = nil
|
40
|
+
|
41
|
+
_id = arguments.delete(:id)
|
42
|
+
|
43
|
+
method = ElasticsearchServerless::API::HTTP_DELETE
|
44
|
+
path = "_scripts/#{Utils.listify(_id)}"
|
45
|
+
params = Utils.process_params(arguments)
|
46
|
+
|
47
|
+
ElasticsearchServerless::API::Response.new(
|
48
|
+
perform_request(method, path, params, body, headers)
|
49
|
+
)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,53 @@
|
|
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 Enrich
|
24
|
+
module Actions
|
25
|
+
# Deletes an existing enrich policy and its enrich index.
|
26
|
+
#
|
27
|
+
# @option arguments [String] :name Enrich policy to delete. (*Required*)
|
28
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
29
|
+
#
|
30
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-enrich-policy-api.html
|
31
|
+
#
|
32
|
+
def delete_policy(arguments = {})
|
33
|
+
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
34
|
+
|
35
|
+
arguments = arguments.clone
|
36
|
+
headers = arguments.delete(:headers) || {}
|
37
|
+
|
38
|
+
body = nil
|
39
|
+
|
40
|
+
_name = arguments.delete(:name)
|
41
|
+
|
42
|
+
method = ElasticsearchServerless::API::HTTP_DELETE
|
43
|
+
path = "_enrich/policy/#{Utils.listify(_name)}"
|
44
|
+
params = {}
|
45
|
+
|
46
|
+
ElasticsearchServerless::API::Response.new(
|
47
|
+
perform_request(method, path, params, body, headers)
|
48
|
+
)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,54 @@
|
|
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 Enrich
|
24
|
+
module Actions
|
25
|
+
# Creates the enrich index for an existing enrich policy.
|
26
|
+
#
|
27
|
+
# @option arguments [String] :name Enrich policy to execute. (*Required*)
|
28
|
+
# @option arguments [Boolean] :wait_for_completion If +true+, the request blocks other enrich policy execution requests until complete. Server default: true.
|
29
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
30
|
+
#
|
31
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/execute-enrich-policy-api.html
|
32
|
+
#
|
33
|
+
def execute_policy(arguments = {})
|
34
|
+
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
35
|
+
|
36
|
+
arguments = arguments.clone
|
37
|
+
headers = arguments.delete(:headers) || {}
|
38
|
+
|
39
|
+
body = nil
|
40
|
+
|
41
|
+
_name = arguments.delete(:name)
|
42
|
+
|
43
|
+
method = ElasticsearchServerless::API::HTTP_PUT
|
44
|
+
path = "_enrich/policy/#{Utils.listify(_name)}/_execute"
|
45
|
+
params = Utils.process_params(arguments)
|
46
|
+
|
47
|
+
ElasticsearchServerless::API::Response.new(
|
48
|
+
perform_request(method, path, params, body, headers)
|
49
|
+
)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|