Skip to content

Commit a084b9d

Browse files
Auto-generated API code
1 parent 98ec993 commit a084b9d

File tree

11 files changed

+252
-7
lines changed

11 files changed

+252
-7
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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 build hash f284cc16f4d4b4289bc679aa1529bb504190fe80
19+
# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec
20+
#
21+
module Elasticsearch
22+
module API
23+
module Esql
24+
module Actions
25+
# Delete an async query request given its ID.
26+
#
27+
# @option arguments [String] :id The async query ID
28+
# @option arguments [Hash] :headers Custom HTTP headers
29+
#
30+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.17/esql-async-query-delete-api.html
31+
#
32+
def async_query_delete(arguments = {})
33+
request_opts = { endpoint: arguments[:endpoint] || 'esql.async_query_delete' }
34+
35+
defined_params = [:id].each_with_object({}) do |variable, set_variables|
36+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
37+
end
38+
request_opts[:defined_params] = defined_params unless defined_params.empty?
39+
40+
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
41+
42+
arguments = arguments.clone
43+
headers = arguments.delete(:headers) || {}
44+
45+
body = nil
46+
47+
_id = arguments.delete(:id)
48+
49+
method = Elasticsearch::API::HTTP_DELETE
50+
path = "_query/async/#{Utils.__listify(_id)}"
51+
params = {}
52+
53+
Elasticsearch::API::Response.new(
54+
perform_request(method, path, params, body, headers, request_opts)
55+
)
56+
end
57+
end
58+
end
59+
end
60+
end
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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 Indices
24+
module Actions
25+
# Get data stream lifecycle statistics.
26+
#
27+
# @option arguments [Hash] :headers Custom HTTP headers
28+
#
29+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams-get-lifecycle-stats.html
30+
#
31+
def get_data_lifecycle_stats(arguments = {})
32+
request_opts = { endpoint: arguments[:endpoint] || 'indices.get_data_lifecycle_stats' }
33+
34+
arguments = arguments.clone
35+
headers = arguments.delete(:headers) || {}
36+
37+
body = nil
38+
39+
method = Elasticsearch::API::HTTP_GET
40+
path = '_lifecycle/stats'
41+
params = {}
42+
43+
Elasticsearch::API::Response.new(
44+
perform_request(method, path, params, body, headers, request_opts)
45+
)
46+
end
47+
end
48+
end
49+
end
50+
end
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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+
# Update inference
26+
#
27+
# @option arguments [String] :inference_id The inference Id
28+
# @option arguments [String] :task_type The task type
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/guide/en/elasticsearch/reference/8.17/update-inference-api.html
33+
#
34+
def update(arguments = {})
35+
request_opts = { endpoint: arguments[:endpoint] || 'inference.update' }
36+
37+
defined_params = %i[inference_id task_type].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 'inference_id' missing" unless arguments[:inference_id]
43+
44+
arguments = arguments.clone
45+
headers = arguments.delete(:headers) || {}
46+
47+
body = arguments.delete(:body)
48+
49+
_inference_id = arguments.delete(:inference_id)
50+
51+
_task_type = arguments.delete(:task_type)
52+
53+
method = Elasticsearch::API::HTTP_POST
54+
path = if _task_type && _inference_id
55+
"_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_inference_id)}/_update"
56+
else
57+
"_inference/#{Utils.__listify(_inference_id)}/_update"
58+
end
59+
params = {}
60+
61+
Elasticsearch::API::Response.new(
62+
perform_request(method, path, params, body, headers, request_opts)
63+
)
64+
end
65+
end
66+
end
67+
end
68+
end
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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 build hash f284cc16f4d4b4289bc679aa1529bb504190fe80
19+
# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec
20+
#
21+
module Elasticsearch
22+
module API
23+
module Security
24+
module Actions
25+
# Delegate PKI authentication.
26+
#
27+
# @option arguments [Hash] :headers Custom HTTP headers
28+
# @option arguments [Hash] :body The X509Certificate chain. (*Required*)
29+
#
30+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-delegate-pki-authentication.html
31+
#
32+
def delegate_pki(arguments = {})
33+
request_opts = { endpoint: arguments[:endpoint] || 'security.delegate_pki' }
34+
35+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
36+
37+
arguments = arguments.clone
38+
headers = arguments.delete(:headers) || {}
39+
40+
body = arguments.delete(:body)
41+
42+
method = Elasticsearch::API::HTTP_POST
43+
path = '_security/delegate_pki'
44+
params = {}
45+
46+
Elasticsearch::API::Response.new(
47+
perform_request(method, path, params, body, headers, request_opts)
48+
)
49+
end
50+
end
51+
end
52+
end
53+
end

elasticsearch-api/lib/elasticsearch/api/actions/snapshot_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 an existing snapshot lifecycle policy.
2626
#
2727
# @option arguments [String] :policy_id The id of the snapshot lifecycle policy to remove
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.17/slm-api-delete-policy.html
@@ -48,7 +50,7 @@ def delete_lifecycle(arguments = {})
4850

4951
method = Elasticsearch::API::HTTP_DELETE
5052
path = "_slm/policy/#{Utils.__listify(_policy_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/snapshot_lifecycle_management/execute_lifecycle.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ module Actions
2525
# Immediately creates a snapshot according to the lifecycle policy, without waiting for the scheduled time.
2626
#
2727
# @option arguments [String] :policy_id The id of the snapshot lifecycle policy to be executed
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.17/slm-api-execute-lifecycle.html
@@ -48,7 +50,7 @@ def execute_lifecycle(arguments = {})
4850

4951
method = Elasticsearch::API::HTTP_PUT
5052
path = "_slm/policy/#{Utils.__listify(_policy_id)}/_execute"
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/snapshot_lifecycle_management/execute_retention.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ module SnapshotLifecycleManagement
2424
module Actions
2525
# Deletes any snapshots that are expired according to the policy's retention rules.
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.17/slm-api-execute-retention.html
@@ -38,7 +40,7 @@ def execute_retention(arguments = {})
3840

3941
method = Elasticsearch::API::HTTP_POST
4042
path = '_slm/_execute_retention'
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/snapshot_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
# Retrieves one or more snapshot lifecycle policy definitions and information about the latest snapshot attempts.
2626
#
2727
# @option arguments [List] :policy_id Comma-separated list of snapshot lifecycle policies to retrieve
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.17/slm-api-get-policy.html
@@ -50,7 +52,7 @@ def get_lifecycle(arguments = {})
5052
else
5153
'_slm/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/snapshot_lifecycle_management/get_stats.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ module SnapshotLifecycleManagement
2424
module Actions
2525
# Returns global and policy-level statistics about actions taken by snapshot lifecycle management.
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.17/slm-api-get-stats.html
@@ -38,7 +40,7 @@ def get_stats(arguments = {})
3840

3941
method = Elasticsearch::API::HTTP_GET
4042
path = '_slm/stats'
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/snapshot_lifecycle_management/get_status.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ module SnapshotLifecycleManagement
2424
module Actions
2525
# Retrieves the status of snapshot lifecycle management (SLM).
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.17/slm-api-get-status.html
@@ -38,7 +40,7 @@ def get_status(arguments = {})
3840

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

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

0 commit comments

Comments
 (0)