elasticsearch-serverless 0.0.9.20231031.pre → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/elasticsearch-serverless/api/esql/query.rb +57 -0
- data/lib/elasticsearch-serverless/api/indices/delete_data_lifecycle.rb +56 -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_data_lifecycle.rb +55 -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_data_lifecycle.rb +57 -0
- data/lib/elasticsearch-serverless/api/indices/put_index_template.rb +2 -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/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 +55 -0
- data/lib/elasticsearch-serverless/api/indices/simulate_template.rb +59 -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/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 +61 -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/rank_eval.rb +60 -0
- data/lib/elasticsearch-serverless/api/synonyms/delete_synonym.rb +0 -4
- data/lib/elasticsearch-serverless/api/synonyms/delete_synonym_rule.rb +0 -4
- data/lib/elasticsearch-serverless/api/synonyms/get_synonym.rb +0 -4
- data/lib/elasticsearch-serverless/api/synonyms/get_synonym_rule.rb +0 -4
- data/lib/elasticsearch-serverless/api/synonyms/get_synonyms_sets.rb +0 -4
- data/lib/elasticsearch-serverless/api/synonyms/put_synonym.rb +0 -4
- data/lib/elasticsearch-serverless/api/synonyms/put_synonym_rule.rb +0 -4
- data/lib/elasticsearch-serverless/api.rb +6 -5
- data/lib/elasticsearch-serverless/version.rb +3 -3
- data/lib/elasticsearch-serverless.rb +1 -1
- metadata +73 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '09c1daf34377a8e2d94926ebbb2e3e7b69d646683b65f05a4b2a3beda0f71648'
|
4
|
+
data.tar.gz: 1ecb7093b7846cbd4c61ad5486d5c2ffe31914c3452af49e12b1721b7cc372c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70ca28dcabaec5aa170c618d3122c26e1754af25741d7af5e25596f386c9a07c26639d72971150f0e9967b5c36f4f89de14616199bd047ca1736e2dd28af1cd5
|
7
|
+
data.tar.gz: f0b6a9542e3e83647e1378866d0053e3cf3fa2530ea292e49963337272ac5af0ac399af7d85db7a15d233eba7850dacce44170cef79fa958bec85f734f9cee87
|
@@ -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 Esql
|
24
|
+
module Actions
|
25
|
+
# Executes an ESQL request
|
26
|
+
# This functionality is Experimental and may be changed or removed
|
27
|
+
# completely in a future release. Elastic will take a best effort approach
|
28
|
+
# to fix any issues, but experimental features are not subject to the
|
29
|
+
# support SLA of official GA features.
|
30
|
+
#
|
31
|
+
# @option arguments [String] :format A short version of the Accept header, e.g. json, yaml.
|
32
|
+
# @option arguments [String] :delimiter The character to use between values within a CSV row. Only valid for the CSV format.
|
33
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
34
|
+
# @option arguments [Hash] :body request body
|
35
|
+
#
|
36
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-rest.html
|
37
|
+
#
|
38
|
+
def query(arguments = {})
|
39
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
40
|
+
|
41
|
+
arguments = arguments.clone
|
42
|
+
headers = arguments.delete(:headers) || {}
|
43
|
+
|
44
|
+
body = arguments.delete(:body)
|
45
|
+
|
46
|
+
method = ElasticsearchServerless::API::HTTP_POST
|
47
|
+
path = "_query"
|
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
|
+
# Deletes the data stream lifecycle of the selected data streams.
|
26
|
+
#
|
27
|
+
# @option arguments [String, Array<String>] :name A comma-separated list of data streams of which the data stream lifecycle will be deleted; use +*+ to get all data streams (*Required*)
|
28
|
+
# @option arguments [String, Array<String>] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open)
|
29
|
+
# @option arguments [Time] :master_timeout Specify timeout for connection to master
|
30
|
+
# @option arguments [Time] :timeout Explicit timestamp for the document
|
31
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
32
|
+
#
|
33
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-delete-lifecycle.html
|
34
|
+
#
|
35
|
+
def delete_data_lifecycle(arguments = {})
|
36
|
+
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
37
|
+
|
38
|
+
arguments = arguments.clone
|
39
|
+
headers = arguments.delete(:headers) || {}
|
40
|
+
|
41
|
+
body = nil
|
42
|
+
|
43
|
+
_name = arguments.delete(:name)
|
44
|
+
|
45
|
+
method = ElasticsearchServerless::API::HTTP_DELETE
|
46
|
+
path = "_data_stream/#{Utils.listify(_name)}/_lifecycle"
|
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,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
|
+
# Returns information about whether a particular index template exists.
|
26
|
+
#
|
27
|
+
# @option arguments [String] :name Comma-separated list of index template names used to limit the request. Wildcard (*) expressions are supported. (*Required*)
|
28
|
+
# @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.
|
29
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
30
|
+
#
|
31
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/index-templates.html
|
32
|
+
#
|
33
|
+
def exists_index_template(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_HEAD
|
44
|
+
path = "_index_template/#{Utils.listify(_name)}"
|
45
|
+
params = Utils.process_params(arguments)
|
46
|
+
|
47
|
+
ElasticsearchServerless::API::Response.new(
|
48
|
+
perform_request(method, path, params, body, headers)
|
49
|
+
)
|
50
|
+
end
|
51
|
+
|
52
|
+
alias_method :exists_index_template?, :exists_index_template
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -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
|
+
# Retrieves information about the index's current data stream lifecycle, such as any potential encountered error, time since creation etc.
|
26
|
+
#
|
27
|
+
# @option arguments [String, Array] :index The name of the index to explain (*Required*)
|
28
|
+
# @option arguments [Boolean] :include_defaults indicates if the API should return the default values the system uses for the index's lifecycle
|
29
|
+
# @option arguments [Time] :master_timeout Specify timeout for connection to master
|
30
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
31
|
+
#
|
32
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-explain-lifecycle.html
|
33
|
+
#
|
34
|
+
def explain_data_lifecycle(arguments = {})
|
35
|
+
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
36
|
+
|
37
|
+
arguments = arguments.clone
|
38
|
+
headers = arguments.delete(:headers) || {}
|
39
|
+
|
40
|
+
body = nil
|
41
|
+
|
42
|
+
_index = arguments.delete(:index)
|
43
|
+
|
44
|
+
method = ElasticsearchServerless::API::HTTP_GET
|
45
|
+
path = "#{Utils.listify(_index)}/_lifecycle/explain"
|
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,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,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-get-template.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,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
|
@@ -26,6 +26,8 @@ module ElasticsearchServerless
|
|
26
26
|
#
|
27
27
|
# @option arguments [String] :name Index or template name (*Required*)
|
28
28
|
# @option arguments [Boolean] :create If +true+, this request cannot replace or update existing index 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 [String] :cause User defined reason for creating/updating the index template
|
29
31
|
# @option arguments [Hash] :headers Custom HTTP headers
|
30
32
|
# @option arguments [Hash] :body request body
|
31
33
|
#
|