Skip to content

Commit 5fd3e7c

Browse files
committed
[API] Adds timeout and master_timeout parameters to indices endpoints
1 parent d2a16f8 commit 5fd3e7c

File tree

6 files changed

+11
-3
lines changed

6 files changed

+11
-3
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ module Actions
2525
# Creates a data stream
2626
#
2727
# @option arguments [String] :name The name of the data stream
28+
# @option arguments [Time] :timeout Specify timeout for acknowledging the cluster state update
29+
# @option arguments [Time] :master_timeout Specify timeout for connection to master
2830
# @option arguments [Hash] :headers Custom HTTP headers
2931
#
3032
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html
@@ -48,7 +50,7 @@ def create_data_stream(arguments = {})
4850

4951
method = Elasticsearch::API::HTTP_PUT
5052
path = "_data_stream/#{Utils.__listify(_name)}"
51-
params = {}
53+
params = Utils.process_params(arguments)
5254

5355
Elasticsearch::API::Response.new(
5456
perform_request(method, path, params, body, headers, request_opts)

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ module Actions
2626
#
2727
# @option arguments [List] :name A comma-separated list of data streams to delete; use `*` to delete all data streams
2828
# @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all)
29+
# @option arguments [Time] :master_timeout Specify timeout for connection to master
2930
# @option arguments [Hash] :headers Custom HTTP headers
3031
#
3132
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ module Actions
3131
# @option arguments [List] :name A comma-separated list of data streams to get; use `*` to get all data streams
3232
# @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all)
3333
# @option arguments [Boolean] :include_defaults Return all relevant default configurations for the data stream (default: false)
34+
# @option arguments [Time] :master_timeout Specify timeout for connection to master
3435
# @option arguments [Hash] :headers Custom HTTP headers
3536
#
3637
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-get-lifecycle.html

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ module Actions
2727
# @option arguments [List] :name A comma-separated list of data streams to get; use `*` to get all data streams
2828
# @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all)
2929
# @option arguments [Boolean] :include_defaults Return all relevant default configurations for the data stream (default: false)
30+
# @option arguments [Time] :master_timeout Specify timeout for connection to master
3031
# @option arguments [Hash] :headers Custom HTTP headers
3132
#
3233
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ module Actions
2525
# Migrates an alias to a data stream
2626
#
2727
# @option arguments [String] :name The name of the alias to migrate
28+
# @option arguments [Time] :timeout Specify timeout for acknowledging the cluster state update
29+
# @option arguments [Time] :master_timeout Specify timeout for connection to master
2830
# @option arguments [Hash] :headers Custom HTTP headers
2931
#
3032
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html
@@ -48,7 +50,7 @@ def migrate_to_data_stream(arguments = {})
4850

4951
method = Elasticsearch::API::HTTP_POST
5052
path = "_data_stream/_migrate/#{Utils.__listify(_name)}"
51-
params = {}
53+
params = Utils.process_params(arguments)
5254

5355
Elasticsearch::API::Response.new(
5456
perform_request(method, path, params, body, headers, request_opts)

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ module Actions
2525
# Promotes a data stream from a replicated data stream managed by CCR to a regular data stream
2626
#
2727
# @option arguments [String] :name The name of the data stream
28+
# @option arguments [Time] :master_timeout Specify timeout for connection to master
2829
# @option arguments [Hash] :headers Custom HTTP headers
2930
#
3031
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html
@@ -48,7 +49,7 @@ def promote_data_stream(arguments = {})
4849

4950
method = Elasticsearch::API::HTTP_POST
5051
path = "_data_stream/_promote/#{Utils.__listify(_name)}"
51-
params = {}
52+
params = Utils.process_params(arguments)
5253

5354
Elasticsearch::API::Response.new(
5455
perform_request(method, path, params, body, headers, request_opts)

0 commit comments

Comments
 (0)