Skip to content

Commit e9d80d4

Browse files
Auto-generated API code
1 parent adc01e3 commit e9d80d4

File tree

4 files changed

+231
-0
lines changed

4 files changed

+231
-0
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/current/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/current/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/current/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/current/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

0 commit comments

Comments
 (0)