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,55 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
#
|
18
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module Indices
|
24
|
+
module Actions
|
25
|
+
# Returns the data stream lifecycle of the selected data streams.
|
26
|
+
#
|
27
|
+
# @option arguments [String, Array<String>] :name Comma-separated list of data streams to limit the request. Supports wildcards (+*+). To target all data streams, omit this parameter or use +*+ or +_all+. (*Required*)
|
28
|
+
# @option arguments [String, Array<String>] :expand_wildcards Type of data stream that wildcard patterns can match. Supports comma-separated values, such as +open,hidden+. Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open.
|
29
|
+
# @option arguments [Boolean] :include_defaults If +true+, return all default settings in the response.
|
30
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
31
|
+
#
|
32
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-get-lifecycle.html
|
33
|
+
#
|
34
|
+
def get_data_lifecycle(arguments = {})
|
35
|
+
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
36
|
+
|
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 = "_data_stream/#{Utils.listify(_name)}/_lifecycle"
|
46
|
+
params = Utils.process_params(arguments)
|
47
|
+
|
48
|
+
ElasticsearchServerless::API::Response.new(
|
49
|
+
perform_request(method, path, params, body, headers)
|
50
|
+
)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
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 Indices
|
24
|
+
module Actions
|
25
|
+
# Returns data streams.
|
26
|
+
#
|
27
|
+
# @option arguments [String, Array<String>] :name Comma-separated list of data stream names used to limit the request. Wildcard (+*+) expressions are supported. If omitted, all data streams are returned.
|
28
|
+
# @option arguments [String, Array<String>] :expand_wildcards Type of data stream that wildcard patterns can match. Supports comma-separated values, such as +open,hidden+. Server default: open.
|
29
|
+
# @option arguments [Boolean] :include_defaults If true, returns all relevant default configurations for the index template.
|
30
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
31
|
+
#
|
32
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
|
33
|
+
#
|
34
|
+
def get_data_stream(arguments = {})
|
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_GET
|
43
|
+
path = if _name
|
44
|
+
"_data_stream/#{Utils.listify(_name)}"
|
45
|
+
else
|
46
|
+
"_data_stream"
|
47
|
+
end
|
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,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 Indices
|
24
|
+
module Actions
|
25
|
+
# Returns an index template.
|
26
|
+
#
|
27
|
+
# @option arguments [String] :name Comma-separated list of index template names used to limit the request. Wildcard (*) expressions are supported.
|
28
|
+
# @option arguments [Boolean] :local If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node.
|
29
|
+
# @option arguments [Boolean] :flat_settings If true, returns settings in flat format.
|
30
|
+
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
31
|
+
# @option arguments [Boolean] :include_defaults If true, returns all relevant default configurations for the index template.
|
32
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
33
|
+
#
|
34
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
|
35
|
+
#
|
36
|
+
def get_index_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
|
+
"_index_template/#{Utils.listify(_name)}"
|
47
|
+
else
|
48
|
+
"_index_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,60 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
#
|
18
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module Indices
|
24
|
+
module Actions
|
25
|
+
# Returns mappings for one or more indices.
|
26
|
+
#
|
27
|
+
# @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (+*+). To target all data streams and indices, omit this parameter or use +*+ or +_all+.
|
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. Server default: true.
|
29
|
+
# @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.
|
30
|
+
# @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index.
|
31
|
+
# @option arguments [Boolean] :local If +true+, the request retrieves information from the local node only.
|
32
|
+
# @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.
|
33
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
34
|
+
#
|
35
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html
|
36
|
+
#
|
37
|
+
def get_mapping(arguments = {})
|
38
|
+
arguments = arguments.clone
|
39
|
+
headers = arguments.delete(:headers) || {}
|
40
|
+
|
41
|
+
body = nil
|
42
|
+
|
43
|
+
_index = arguments.delete(:index)
|
44
|
+
|
45
|
+
method = ElasticsearchServerless::API::HTTP_GET
|
46
|
+
path = if _index
|
47
|
+
"#{Utils.listify(_index)}/_mapping"
|
48
|
+
else
|
49
|
+
"_mapping"
|
50
|
+
end
|
51
|
+
params = Utils.process_params(arguments)
|
52
|
+
|
53
|
+
ElasticsearchServerless::API::Response.new(
|
54
|
+
perform_request(method, path, params, body, headers)
|
55
|
+
)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
#
|
18
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module Indices
|
24
|
+
module Actions
|
25
|
+
# Returns settings for one or more indices.
|
26
|
+
#
|
27
|
+
# @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (+*+). To target all data streams and indices, omit this parameter or use +*+ or +_all+.
|
28
|
+
# @option arguments [String, Array<String>] :name Comma-separated list or wildcard expression of settings to retrieve.
|
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.
|
30
|
+
# @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.
|
31
|
+
# @option arguments [Boolean] :flat_settings If +true+, returns settings in flat format.
|
32
|
+
# @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index.
|
33
|
+
# @option arguments [Boolean] :include_defaults If +true+, return all default settings in the response.
|
34
|
+
# @option arguments [Boolean] :local If +true+, the request retrieves information from the local node only. If +false+, information is retrieved from the master node.
|
35
|
+
# @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.
|
36
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
37
|
+
#
|
38
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html
|
39
|
+
#
|
40
|
+
def get_settings(arguments = {})
|
41
|
+
arguments = arguments.clone
|
42
|
+
headers = arguments.delete(:headers) || {}
|
43
|
+
|
44
|
+
body = nil
|
45
|
+
|
46
|
+
_index = arguments.delete(:index)
|
47
|
+
|
48
|
+
_name = arguments.delete(:name)
|
49
|
+
|
50
|
+
method = ElasticsearchServerless::API::HTTP_GET
|
51
|
+
path = if _index && _name
|
52
|
+
"#{Utils.listify(_index)}/_settings/#{Utils.listify(_name)}"
|
53
|
+
elsif _index
|
54
|
+
"#{Utils.listify(_index)}/_settings"
|
55
|
+
elsif _name
|
56
|
+
"_settings/#{Utils.listify(_name)}"
|
57
|
+
else
|
58
|
+
"_settings"
|
59
|
+
end
|
60
|
+
params = Utils.process_params(arguments)
|
61
|
+
|
62
|
+
ElasticsearchServerless::API::Response.new(
|
63
|
+
perform_request(method, path, params, body, headers)
|
64
|
+
)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
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 Indices
|
24
|
+
module Actions
|
25
|
+
# Migrates an alias to a data stream
|
26
|
+
#
|
27
|
+
# @option arguments [String] :name Name of the index alias to convert to a data stream. (*Required*)
|
28
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
29
|
+
#
|
30
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
|
31
|
+
#
|
32
|
+
def migrate_to_data_stream(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_POST
|
43
|
+
path = "_data_stream/_migrate/#{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,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 Indices
|
24
|
+
module Actions
|
25
|
+
# Modifies a data stream
|
26
|
+
#
|
27
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
28
|
+
# @option arguments [Hash] :body request body
|
29
|
+
#
|
30
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
|
31
|
+
#
|
32
|
+
def modify_data_stream(arguments = {})
|
33
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
34
|
+
|
35
|
+
arguments = arguments.clone
|
36
|
+
headers = arguments.delete(:headers) || {}
|
37
|
+
|
38
|
+
body = arguments.delete(:body)
|
39
|
+
|
40
|
+
method = ElasticsearchServerless::API::HTTP_POST
|
41
|
+
path = "_data_stream/_modify"
|
42
|
+
params = {}
|
43
|
+
|
44
|
+
ElasticsearchServerless::API::Response.new(
|
45
|
+
perform_request(method, path, params, body, headers)
|
46
|
+
)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
#
|
18
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module Indices
|
24
|
+
module Actions
|
25
|
+
# Creates or updates an alias.
|
26
|
+
#
|
27
|
+
# @option arguments [String, Array] :index Comma-separated list of data streams or indices to add. Supports wildcards (+*+). Wildcard patterns that match both data streams and indices return an error. (*Required*)
|
28
|
+
# @option arguments [String] :name Alias to update. If the alias doesn’t exist, the request creates it. Index alias names support date math. (*Required*)
|
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 [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.
|
31
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
32
|
+
# @option arguments [Hash] :body request body
|
33
|
+
#
|
34
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
|
35
|
+
#
|
36
|
+
def put_alias(arguments = {})
|
37
|
+
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
38
|
+
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
39
|
+
|
40
|
+
arguments = arguments.clone
|
41
|
+
headers = arguments.delete(:headers) || {}
|
42
|
+
|
43
|
+
body = arguments.delete(:body)
|
44
|
+
|
45
|
+
_index = arguments.delete(:index)
|
46
|
+
|
47
|
+
_name = arguments.delete(:name)
|
48
|
+
|
49
|
+
method = ElasticsearchServerless::API::HTTP_PUT
|
50
|
+
path = if _index && _name
|
51
|
+
"#{Utils.listify(_index)}/_aliases/#{Utils.listify(_name)}"
|
52
|
+
end
|
53
|
+
params = Utils.process_params(arguments)
|
54
|
+
|
55
|
+
ElasticsearchServerless::API::Response.new(
|
56
|
+
perform_request(method, path, params, body, headers)
|
57
|
+
)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
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 Indices
|
24
|
+
module Actions
|
25
|
+
# Updates the data stream lifecycle of the selected data streams.
|
26
|
+
#
|
27
|
+
# @option arguments [String, Array<String>] :name Comma-separated list of data streams used to limit the request. Supports wildcards (+*+). To target all data streams use +*+ or +_all+. (*Required*)
|
28
|
+
# @option arguments [String, Array<String>] :expand_wildcards Type of data stream that wildcard patterns can match. Supports comma-separated values, such as +open,hidden+. Valid values are: +all+, +hidden+, +open+, +closed+, +none+. Server default: open.
|
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 [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.
|
31
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
32
|
+
# @option arguments [Hash] :body request body
|
33
|
+
#
|
34
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-put-lifecycle.html
|
35
|
+
#
|
36
|
+
def put_data_lifecycle(arguments = {})
|
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 = "_data_stream/#{Utils.listify(_name)}/_lifecycle"
|
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,56 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
#
|
18
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module Indices
|
24
|
+
module Actions
|
25
|
+
# Creates or updates an index template.
|
26
|
+
#
|
27
|
+
# @option arguments [String] :name Index or template name (*Required*)
|
28
|
+
# @option arguments [Boolean] :create If +true+, this request cannot replace or update existing index templates.
|
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/indices-templates.html
|
33
|
+
#
|
34
|
+
def put_index_template(arguments = {})
|
35
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
36
|
+
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
37
|
+
|
38
|
+
arguments = arguments.clone
|
39
|
+
headers = arguments.delete(:headers) || {}
|
40
|
+
|
41
|
+
body = arguments.delete(:body)
|
42
|
+
|
43
|
+
_name = arguments.delete(:name)
|
44
|
+
|
45
|
+
method = ElasticsearchServerless::API::HTTP_PUT
|
46
|
+
path = "_index_template/#{Utils.listify(_name)}"
|
47
|
+
params = Utils.process_params(arguments)
|
48
|
+
|
49
|
+
ElasticsearchServerless::API::Response.new(
|
50
|
+
perform_request(method, path, params, body, headers)
|
51
|
+
)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
#
|
18
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module Indices
|
24
|
+
module Actions
|
25
|
+
# Updates the index mappings.
|
26
|
+
#
|
27
|
+
# @option arguments [String, Array] :index A comma-separated list of index names the mapping should be added to (supports wildcards); use +_all+ or omit to add the mapping on all indices. (*Required*)
|
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. Server default: true.
|
29
|
+
# @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.
|
30
|
+
# @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index.
|
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 [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] :write_index_only If +true+, the mappings are applied only to the current write index for the target.
|
34
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
35
|
+
# @option arguments [Hash] :body request body
|
36
|
+
#
|
37
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html
|
38
|
+
#
|
39
|
+
def put_mapping(arguments = {})
|
40
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
41
|
+
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
42
|
+
|
43
|
+
arguments = arguments.clone
|
44
|
+
headers = arguments.delete(:headers) || {}
|
45
|
+
|
46
|
+
body = arguments.delete(:body)
|
47
|
+
|
48
|
+
_index = arguments.delete(:index)
|
49
|
+
|
50
|
+
method = ElasticsearchServerless::API::HTTP_PUT
|
51
|
+
path = "#{Utils.listify(_index)}/_mapping"
|
52
|
+
params = Utils.process_params(arguments)
|
53
|
+
|
54
|
+
ElasticsearchServerless::API::Response.new(
|
55
|
+
perform_request(method, path, params, body, headers)
|
56
|
+
)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|