Skip to content

Commit a072cac

Browse files
Auto-generated API code
1 parent e4cf273 commit a072cac

7 files changed

Lines changed: 486 additions & 1 deletion

File tree

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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+
# This code was automatically generated from the Elasticsearch Specification
19+
# See https://github.com/elastic/elasticsearch-specification
20+
# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
21+
module Elasticsearch
22+
module API
23+
module Esql
24+
module Actions
25+
# Delete ES|QL data sources.
26+
# Deletes one or more data sources used in ES|QL data federation.
27+
# Fails with `409` if any dataset references one of the named data sources;
28+
# delete the dependent datasets first.
29+
# This functionality is experimental and is not ready for production usage. Experimental
30+
# features may change or be removed at any time. Elastic will work to fix any issues, but
31+
# experimental features are not subject to the support SLA of official GA features. Specific
32+
# Support terms apply.
33+
#
34+
# @option arguments [String, Array<String>] :name A comma-separated list of data source names to delete. (*Required*)
35+
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s.
36+
# @option arguments [Time] :timeout The time to wait for the request to be completed. Server default: 30s.
37+
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
38+
# when they occur.
39+
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
40+
# returned by Elasticsearch.
41+
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
42+
# For example `"exists_time": "1h"` for humans and
43+
# `"exists_time_in_millis": 3600000` for computers. When disabled the human
44+
# readable values will be omitted. This makes sense for responses being consumed
45+
# only by machines.
46+
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
47+
# this option for debugging only.
48+
# @option arguments [Hash] :headers Custom HTTP headers
49+
#
50+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-delete-data-source
51+
#
52+
def delete_data_source(arguments = {})
53+
request_opts = { endpoint: arguments[:endpoint] || 'esql.delete_data_source' }
54+
55+
defined_params = [:name].each_with_object({}) do |variable, set_variables|
56+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
57+
end
58+
request_opts[:defined_params] = defined_params unless defined_params.empty?
59+
60+
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
61+
62+
arguments = arguments.clone
63+
headers = arguments.delete(:headers) || {}
64+
65+
body = nil
66+
67+
_name = arguments.delete(:name)
68+
69+
method = Elasticsearch::API::HTTP_DELETE
70+
path = "_query/data_source/#{Utils.listify(_name)}"
71+
params = Utils.process_params(arguments)
72+
73+
Elasticsearch::API::Response.new(
74+
perform_request(method, path, params, body, headers, request_opts)
75+
)
76+
end
77+
end
78+
end
79+
end
80+
end
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
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+
# This code was automatically generated from the Elasticsearch Specification
19+
# See https://github.com/elastic/elasticsearch-specification
20+
# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
21+
module Elasticsearch
22+
module API
23+
module Esql
24+
module Actions
25+
# Delete ES|QL datasets.
26+
# Deletes one or more datasets used in ES|QL data federation.
27+
# If any specified dataset does not exist, the request fails and no datasets are deleted.
28+
# This functionality is experimental and is not ready for production usage. Experimental
29+
# features may change or be removed at any time. Elastic will work to fix any issues, but
30+
# experimental features are not subject to the support SLA of official GA features. Specific
31+
# Support terms apply.
32+
#
33+
# @option arguments [String, Array<String>] :name A comma-separated list of dataset names to delete. (*Required*)
34+
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s.
35+
# @option arguments [Time] :timeout The time to wait for the request to be completed. Server default: 30s.
36+
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
37+
# when they occur.
38+
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
39+
# returned by Elasticsearch.
40+
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
41+
# For example `"exists_time": "1h"` for humans and
42+
# `"exists_time_in_millis": 3600000` for computers. When disabled the human
43+
# readable values will be omitted. This makes sense for responses being consumed
44+
# only by machines.
45+
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
46+
# this option for debugging only.
47+
# @option arguments [Hash] :headers Custom HTTP headers
48+
#
49+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-delete-dataset
50+
#
51+
def delete_dataset(arguments = {})
52+
request_opts = { endpoint: arguments[:endpoint] || 'esql.delete_dataset' }
53+
54+
defined_params = [:name].each_with_object({}) do |variable, set_variables|
55+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
56+
end
57+
request_opts[:defined_params] = defined_params unless defined_params.empty?
58+
59+
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
60+
61+
arguments = arguments.clone
62+
headers = arguments.delete(:headers) || {}
63+
64+
body = nil
65+
66+
_name = arguments.delete(:name)
67+
68+
method = Elasticsearch::API::HTTP_DELETE
69+
path = "_query/dataset/#{Utils.listify(_name)}"
70+
params = Utils.process_params(arguments)
71+
72+
Elasticsearch::API::Response.new(
73+
perform_request(method, path, params, body, headers, request_opts)
74+
)
75+
end
76+
end
77+
end
78+
end
79+
end
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
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+
# This code was automatically generated from the Elasticsearch Specification
19+
# See https://github.com/elastic/elasticsearch-specification
20+
# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
21+
module Elasticsearch
22+
module API
23+
module Esql
24+
module Actions
25+
# Get ES|QL data sources.
26+
# Returns one or more data sources used in ES|QL data federation.
27+
# A concrete-name miss returns `404`; a wildcard pattern or list-all request with no match
28+
# returns `200` with an empty array.
29+
# This functionality is experimental and is not ready for production usage. Experimental
30+
# features may change or be removed at any time. Elastic will work to fix any issues, but
31+
# experimental features are not subject to the support SLA of official GA features. Specific
32+
# Support terms apply.
33+
#
34+
# @option arguments [String, Array<String>] :name A comma-separated list of data source names or wildcard patterns. Omit to return all data sources.
35+
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s.
36+
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
37+
# when they occur.
38+
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
39+
# returned by Elasticsearch.
40+
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
41+
# For example `"exists_time": "1h"` for humans and
42+
# `"exists_time_in_millis": 3600000` for computers. When disabled the human
43+
# readable values will be omitted. This makes sense for responses being consumed
44+
# only by machines.
45+
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
46+
# this option for debugging only.
47+
# @option arguments [Hash] :headers Custom HTTP headers
48+
#
49+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-get-data-source
50+
#
51+
def get_data_source(arguments = {})
52+
request_opts = { endpoint: arguments[:endpoint] || 'esql.get_data_source' }
53+
54+
defined_params = [:name].each_with_object({}) do |variable, set_variables|
55+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
56+
end
57+
request_opts[:defined_params] = defined_params unless defined_params.empty?
58+
59+
arguments = arguments.clone
60+
headers = arguments.delete(:headers) || {}
61+
62+
body = nil
63+
64+
_name = arguments.delete(:name)
65+
66+
method = Elasticsearch::API::HTTP_GET
67+
path = if _name
68+
"_query/data_source/#{Utils.listify(_name)}"
69+
else
70+
'_query/data_source'
71+
end
72+
params = Utils.process_params(arguments)
73+
74+
Elasticsearch::API::Response.new(
75+
perform_request(method, path, params, body, headers, request_opts)
76+
)
77+
end
78+
end
79+
end
80+
end
81+
end
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
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+
# This code was automatically generated from the Elasticsearch Specification
19+
# See https://github.com/elastic/elasticsearch-specification
20+
# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
21+
module Elasticsearch
22+
module API
23+
module Esql
24+
module Actions
25+
# Get ES|QL datasets.
26+
# Returns one or more datasets used in ES|QL data federation.
27+
# A concrete-name miss returns `404`; a wildcard pattern or list-all request with no match
28+
# returns `200` with an empty array.
29+
# This functionality is experimental and is not ready for production usage. Experimental
30+
# features may change or be removed at any time. Elastic will work to fix any issues, but
31+
# experimental features are not subject to the support SLA of official GA features. Specific
32+
# Support terms apply.
33+
#
34+
# @option arguments [String, Array<String>] :name A comma-separated list of dataset names or wildcard patterns. Omit to return all datasets.
35+
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s.
36+
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
37+
# when they occur.
38+
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
39+
# returned by Elasticsearch.
40+
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
41+
# For example `"exists_time": "1h"` for humans and
42+
# `"exists_time_in_millis": 3600000` for computers. When disabled the human
43+
# readable values will be omitted. This makes sense for responses being consumed
44+
# only by machines.
45+
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
46+
# this option for debugging only.
47+
# @option arguments [Hash] :headers Custom HTTP headers
48+
#
49+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-get-dataset
50+
#
51+
def get_dataset(arguments = {})
52+
request_opts = { endpoint: arguments[:endpoint] || 'esql.get_dataset' }
53+
54+
defined_params = [:name].each_with_object({}) do |variable, set_variables|
55+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
56+
end
57+
request_opts[:defined_params] = defined_params unless defined_params.empty?
58+
59+
arguments = arguments.clone
60+
headers = arguments.delete(:headers) || {}
61+
62+
body = nil
63+
64+
_name = arguments.delete(:name)
65+
66+
method = Elasticsearch::API::HTTP_GET
67+
path = if _name
68+
"_query/dataset/#{Utils.listify(_name)}"
69+
else
70+
'_query/dataset'
71+
end
72+
params = Utils.process_params(arguments)
73+
74+
Elasticsearch::API::Response.new(
75+
perform_request(method, path, params, body, headers, request_opts)
76+
)
77+
end
78+
end
79+
end
80+
end
81+
end

0 commit comments

Comments
 (0)