elasticsearch-serverless 0.0.9.20231031.pre → 0.1.0.20231031.pre
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/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_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 +57 -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 +3 -3
- data/lib/elasticsearch-serverless/version.rb +1 -1
- metadata +72 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c9b9517cbe9ed2b4dff59ac559f8e0b91e820479ad486ed6fc4397ae970033c
|
4
|
+
data.tar.gz: 0342a7ee417d26b506af13093f6e3194fb5d3433e8091579ade28b8389c0042c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 546f51170bd9756ef58ad11e98d8e6ba7c2ffc5f897c095779c3beff85ed084c712aebdf5ae7fb0373dcc09985fad6d1bc7443931912c2213a02ac58573f1aaa
|
7
|
+
data.tar.gz: 4aee469710a57647663b34301f48893185ab035ed1c260577e788d67a4405c2ab31bd322495ffaac9cd7f452d71c64b749bef04aa9caeb6efe8b7e66e8936a3f
|
@@ -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
|
@@ -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
|