Skip to content

Commit 762dfa0

Browse files
committed
[API] Generate code for 7.x
1 parent 7147806 commit 762dfa0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+428
-47
lines changed

elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ module Actions
1515
# @option arguments [Boolean] :help Return help information
1616
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
1717
# @option arguments [Boolean] :v Verbose mode. Display column headers
18+
# @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both.
19+
# (options: open,closed,hidden,none,all)
1820

1921
#
2022
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/cat-alias.html
@@ -46,7 +48,8 @@ def aliases(arguments = {})
4648
:h,
4749
:help,
4850
:s,
49-
:v
51+
:v,
52+
:expand_wildcards
5053
].freeze)
5154
end
5255
end

elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ module Actions
2323
# @option arguments [Boolean] :pri Set to true to return stats only for primary shards
2424
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
2525
# @option arguments [String] :time The unit in which to display time values
26-
# (options: d (Days),h (Hours),m (Minutes),s (Seconds),ms (Milliseconds),micros (Microseconds),nanos (Nanoseconds))
26+
# (options: d,h,m,s,ms,micros,nanos)
2727

2828
# @option arguments [Boolean] :v Verbose mode. Display column headers
2929
# @option arguments [Boolean] :include_unloaded_segments If set to true segment stats will include stats for segments that are not currently loaded into memory
30+
# @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both.
31+
# (options: open,closed,hidden,none,all)
3032

3133
#
3234
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/cat-indices.html
@@ -64,7 +66,8 @@ def indices(arguments = {})
6466
:s,
6567
:time,
6668
:v,
67-
:include_unloaded_segments
69+
:include_unloaded_segments,
70+
:expand_wildcards
6871
].freeze)
6972
end
7073
end

elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module Actions
1919
# @option arguments [Boolean] :help Return help information
2020
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
2121
# @option arguments [String] :time The unit in which to display time values
22-
# (options: d (Days),h (Hours),m (Minutes),s (Seconds),ms (Milliseconds),micros (Microseconds),nanos (Nanoseconds))
22+
# (options: d,h,m,s,ms,micros,nanos)
2323

2424
# @option arguments [Boolean] :v Verbose mode. Display column headers
2525

elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module Actions
1515
# @option arguments [Boolean] :help Return help information
1616
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
1717
# @option arguments [String] :time The unit in which to display time values
18-
# (options: d (Days),h (Hours),m (Minutes),s (Seconds),ms (Milliseconds),micros (Microseconds),nanos (Nanoseconds))
18+
# (options: d,h,m,s,ms,micros,nanos)
1919

2020
# @option arguments [Boolean] :v Verbose mode. Display column headers
2121

elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module Actions
2020
# @option arguments [List] :index Comma-separated list or wildcard expression of index names to limit the returned information
2121
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
2222
# @option arguments [String] :time The unit in which to display time values
23-
# (options: d (Days),h (Hours),m (Minutes),s (Seconds),ms (Milliseconds),micros (Microseconds),nanos (Nanoseconds))
23+
# (options: d,h,m,s,ms,micros,nanos)
2424

2525
# @option arguments [Boolean] :v Verbose mode. Display column headers
2626

elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module Actions
1919
# @option arguments [Boolean] :help Return help information
2020
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
2121
# @option arguments [String] :time The unit in which to display time values
22-
# (options: d (Days),h (Hours),m (Minutes),s (Seconds),ms (Milliseconds),micros (Microseconds),nanos (Nanoseconds))
22+
# (options: d,h,m,s,ms,micros,nanos)
2323

2424
# @option arguments [Boolean] :v Verbose mode. Display column headers
2525

elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module Actions
1616
# @option arguments [Boolean] :help Return help information
1717
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
1818
# @option arguments [String] :time The unit in which to display time values
19-
# (options: d (Days),h (Hours),m (Minutes),s (Seconds),ms (Milliseconds),micros (Microseconds),nanos (Nanoseconds))
19+
# (options: d,h,m,s,ms,micros,nanos)
2020

2121
# @option arguments [Boolean] :v Verbose mode. Display column headers
2222

elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module Actions
1717
# @option arguments [Boolean] :help Return help information
1818
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
1919
# @option arguments [String] :time The unit in which to display time values
20-
# (options: d (Days),h (Hours),m (Minutes),s (Seconds),ms (Milliseconds),micros (Microseconds),nanos (Nanoseconds))
20+
# (options: d,h,m,s,ms,micros,nanos)
2121

2222
# @option arguments [Boolean] :v Verbose mode. Display column headers
2323

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Licensed to Elasticsearch B.V under one or more agreements.
2+
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3+
# See the LICENSE file in the project root for more information
4+
5+
module Elasticsearch
6+
module API
7+
module Cluster
8+
module Actions
9+
# Deletes a component template
10+
#
11+
# @option arguments [String] :name The name of the template
12+
# @option arguments [Time] :timeout Explicit operation timeout
13+
# @option arguments [Time] :master_timeout Specify timeout for connection to master
14+
15+
#
16+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/indices-component-templates.html
17+
#
18+
def delete_component_template(arguments = {})
19+
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
20+
21+
arguments = arguments.clone
22+
23+
_name = arguments.delete(:name)
24+
25+
method = Elasticsearch::API::HTTP_DELETE
26+
path = "_component_template/#{Utils.__listify(_name)}"
27+
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
28+
29+
body = nil
30+
perform_request(method, path, params, body).body
31+
end
32+
33+
# Register this action with its valid params when the module is loaded.
34+
#
35+
# @since 6.2.0
36+
ParamsRegistry.register(:delete_component_template, [
37+
:timeout,
38+
:master_timeout
39+
].freeze)
40+
end
41+
end
42+
end
43+
end
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Licensed to Elasticsearch B.V under one or more agreements.
2+
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3+
# See the LICENSE file in the project root for more information
4+
5+
module Elasticsearch
6+
module API
7+
module Cluster
8+
module Actions
9+
# Returns one or more component templates
10+
#
11+
# @option arguments [List] :name The comma separated names of the component templates
12+
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
13+
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
14+
15+
#
16+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/indices-component-templates.html
17+
#
18+
def get_component_template(arguments = {})
19+
arguments = arguments.clone
20+
21+
_name = arguments.delete(:name)
22+
23+
method = Elasticsearch::API::HTTP_GET
24+
path = if _name
25+
"_component_template/#{Utils.__listify(_name)}"
26+
else
27+
"_component_template"
28+
end
29+
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
30+
31+
body = nil
32+
perform_request(method, path, params, body).body
33+
end
34+
35+
# Register this action with its valid params when the module is loaded.
36+
#
37+
# @since 6.2.0
38+
ParamsRegistry.register(:get_component_template, [
39+
:master_timeout,
40+
:local
41+
].freeze)
42+
end
43+
end
44+
end
45+
end

0 commit comments

Comments
 (0)