Skip to content

Commit a325742

Browse files
Auto-generated API code
1 parent 89d8543 commit a325742

File tree

13 files changed

+100
-9
lines changed

13 files changed

+100
-9
lines changed

elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_get.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ module Actions
2525
# Retrieves the results of a previously submitted async query request given its ID.
2626
#
2727
# @option arguments [String] :id The async query ID
28+
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
2829
# @option arguments [Time] :wait_for_completion_timeout Specify the time that the request should block waiting for the final response
2930
# @option arguments [Time] :keep_alive Specify the time interval in which the results (partial or final) for this search will be available
3031
# @option arguments [Boolean] :drop_null_columns Should entirely null columns be removed from the results? Their name and type will be returning in a new `all_columns` section.

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.18/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.18/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.18/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.18/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.18/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)
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
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 build hash f284cc16f4d4b4289bc679aa1529bb504190fe80
19+
# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec
20+
#
21+
module Elasticsearch
22+
module API
23+
module Inference
24+
module Actions
25+
# Configure a custom inference endpoint
26+
#
27+
# @option arguments [String] :task_type The task type
28+
# @option arguments [String] :custom_inference_id The inference Id
29+
# @option arguments [Hash] :headers Custom HTTP headers
30+
# @option arguments [Hash] :body The inference endpoint's task and service settings
31+
#
32+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-custom
33+
#
34+
def put_custom(arguments = {})
35+
request_opts = { endpoint: arguments[:endpoint] || 'inference.put_custom' }
36+
37+
defined_params = %i[task_type custom_inference_id].each_with_object({}) do |variable, set_variables|
38+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
39+
end
40+
request_opts[:defined_params] = defined_params unless defined_params.empty?
41+
42+
raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
43+
raise ArgumentError, "Required argument 'custom_inference_id' missing" unless arguments[:custom_inference_id]
44+
45+
arguments = arguments.clone
46+
headers = arguments.delete(:headers) || {}
47+
48+
body = arguments.delete(:body)
49+
50+
_task_type = arguments.delete(:task_type)
51+
52+
_custom_inference_id = arguments.delete(:custom_inference_id)
53+
54+
method = Elasticsearch::API::HTTP_PUT
55+
path = "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_custom_inference_id)}"
56+
params = {}
57+
58+
Elasticsearch::API::Response.new(
59+
perform_request(method, path, params, body, headers, request_opts)
60+
)
61+
end
62+
end
63+
end
64+
end
65+
end

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.18/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.18/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)

0 commit comments

Comments
 (0)