Skip to content

Commit 803d6c4

Browse files
committed
Adds timeout, master_timeout parameters to several APIs:
* index_lifecycle_management.delete_lifecycle - both * index_lifecycle_management.explain_lifecycle - `master_timeout` only. * index_lifecycle_management.get_lifecycle - both * index_lifecycle_management.put_lifecycle - both * index_lifecycle_management.start - both * index_lifecycle_management.stop - both * ingest.delete_geoip_database - both * ingest.delete_ip_location_database - both * ingest.put_geoip_database - both * ingest.put_ip_location_database - both * snapshot_lifecycle_management.delete_lifecycle - both * snapshot_lifecycle_management.execute_lifecycle - both * snapshot_lifecycle_management.execute_retention - both * snapshot_lifecycle_management.get_lifecycle - both * snapshot_lifecycle_management.get_stats - both * snapshot_lifecycle_management.get_status - both * snapshot_lifecycle_management.put_lifecycle - both [Time] :master_timeout Explicit operation timeout for connection to master node. [Time] :timeout Explicit operation timeout. * open_point_in_time - adds allow_partial_search_results
1 parent 5d53876 commit 803d6c4

18 files changed

+50
-16
lines changed

elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ module Actions
2525
# Deletes the specified lifecycle policy definition. A currently used policy cannot be deleted.
2626
#
2727
# @option arguments [String] :policy The name of the index lifecycle policy
28+
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
29+
# @option arguments [Time] :timeout Explicit operation timeout
2830
# @option arguments [Hash] :headers Custom HTTP headers
2931
#
3032
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.16/ilm-delete-lifecycle.html
@@ -48,7 +50,7 @@ def delete_lifecycle(arguments = {})
4850

4951
method = Elasticsearch::API::HTTP_DELETE
5052
path = "_ilm/policy/#{Utils.__listify(_policy)}"
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/index_lifecycle_management/explain_lifecycle.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ module Actions
2727
# @option arguments [String] :index The name of the index to explain
2828
# @option arguments [Boolean] :only_managed filters the indices included in the response to ones managed by ILM
2929
# @option arguments [Boolean] :only_errors filters the indices included in the response to ones in an ILM error state, implies only_managed
30+
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
3031
# @option arguments [Hash] :headers Custom HTTP headers
3132
#
3233
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.16/ilm-explain-lifecycle.html

elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ module Actions
2525
# Returns the specified policy definition. Includes the policy version and last modified date.
2626
#
2727
# @option arguments [String] :policy The name of the index lifecycle policy
28+
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
29+
# @option arguments [Time] :timeout Explicit operation timeout
2830
# @option arguments [Hash] :headers Custom HTTP headers
2931
#
3032
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.16/ilm-get-lifecycle.html
@@ -50,7 +52,7 @@ def get_lifecycle(arguments = {})
5052
else
5153
'_ilm/policy'
5254
end
53-
params = {}
55+
params = Utils.process_params(arguments)
5456

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

elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ module Actions
2525
# Creates a lifecycle policy
2626
#
2727
# @option arguments [String] :policy The name of the index lifecycle policy
28+
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
29+
# @option arguments [Time] :timeout Explicit operation timeout
2830
# @option arguments [Hash] :headers Custom HTTP headers
2931
# @option arguments [Hash] :body The lifecycle policy definition to register
3032
#
@@ -49,7 +51,7 @@ def put_lifecycle(arguments = {})
4951

5052
method = Elasticsearch::API::HTTP_PUT
5153
path = "_ilm/policy/#{Utils.__listify(_policy)}"
52-
params = {}
54+
params = Utils.process_params(arguments)
5355

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

elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ module IndexLifecycleManagement
2424
module Actions
2525
# Start the index lifecycle management (ILM) plugin.
2626
#
27+
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
28+
# @option arguments [Time] :timeout Explicit operation timeout
2729
# @option arguments [Hash] :headers Custom HTTP headers
2830
#
2931
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.16/ilm-start.html
@@ -38,7 +40,7 @@ def start(arguments = {})
3840

3941
method = Elasticsearch::API::HTTP_POST
4042
path = '_ilm/start'
41-
params = {}
43+
params = Utils.process_params(arguments)
4244

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

elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ module IndexLifecycleManagement
2424
module Actions
2525
# Halts all lifecycle management operations and stops the index lifecycle management (ILM) plugin
2626
#
27+
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
28+
# @option arguments [Time] :timeout Explicit operation timeout
2729
# @option arguments [Hash] :headers Custom HTTP headers
2830
#
2931
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.16/ilm-stop.html
@@ -38,7 +40,7 @@ def stop(arguments = {})
3840

3941
method = Elasticsearch::API::HTTP_POST
4042
path = '_ilm/stop'
41-
params = {}
43+
params = Utils.process_params(arguments)
4244

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

elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ module Actions
2525
# Deletes a geoip database configuration
2626
#
2727
# @option arguments [List] :id A comma-separated list of geoip database configurations to delete
28+
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
29+
# @option arguments [Time] :timeout Explicit operation timeout
2830
# @option arguments [Hash] :headers Custom HTTP headers
2931
#
3032
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.16/delete-geoip-database-api.html
@@ -48,7 +50,7 @@ def delete_geoip_database(arguments = {})
4850

4951
method = Elasticsearch::API::HTTP_DELETE
5052
path = "_ingest/geoip/database/#{Utils.__listify(_id)}"
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/ingest/delete_ip_location_database.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ module Actions
2525
# Deletes an ip location database configuration
2626
#
2727
# @option arguments [List] :id A comma-separated list of ip location database configurations to delete
28+
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
29+
# @option arguments [Time] :timeout Explicit operation timeout
2830
# @option arguments [Hash] :headers Custom HTTP headers
2931
#
3032
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.16/delete-ip-location-database-api.html
@@ -48,7 +50,7 @@ def delete_ip_location_database(arguments = {})
4850

4951
method = Elasticsearch::API::HTTP_DELETE
5052
path = "_ingest/ip_location/database/#{Utils.__listify(_id)}"
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/ingest/put_geoip_database.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ module Actions
2525
# Puts the configuration for a geoip database to be downloaded
2626
#
2727
# @option arguments [String] :id The id of the database configuration
28+
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
29+
# @option arguments [Time] :timeout Explicit operation timeout
2830
# @option arguments [Hash] :headers Custom HTTP headers
2931
# @option arguments [Hash] :body The database configuration definition (*Required*)
3032
#
@@ -50,7 +52,7 @@ def put_geoip_database(arguments = {})
5052

5153
method = Elasticsearch::API::HTTP_PUT
5254
path = "_ingest/geoip/database/#{Utils.__listify(_id)}"
53-
params = {}
55+
params = Utils.process_params(arguments)
5456

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

elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_ip_location_database.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ module Actions
2525
# Puts the configuration for a ip location database to be downloaded
2626
#
2727
# @option arguments [String] :id The id of the database configuration
28+
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
29+
# @option arguments [Time] :timeout Explicit operation timeout
2830
# @option arguments [Hash] :headers Custom HTTP headers
2931
# @option arguments [Hash] :body The database configuration definition (*Required*)
3032
#
@@ -50,7 +52,7 @@ def put_ip_location_database(arguments = {})
5052

5153
method = Elasticsearch::API::HTTP_PUT
5254
path = "_ingest/ip_location/database/#{Utils.__listify(_id)}"
53-
params = {}
55+
params = Utils.process_params(arguments)
5456

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

0 commit comments

Comments
 (0)