From a072cace9b9a810d68f64402e368dc43a60cbb3c Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Mon, 17 Aug 2026 06:12:19 +0000 Subject: [PATCH] Auto-generated API code --- .../api/actions/esql/delete_data_source.rb | 80 ++++++++++++++++++ .../api/actions/esql/delete_dataset.rb | 79 ++++++++++++++++++ .../api/actions/esql/get_data_source.rb | 81 ++++++++++++++++++ .../api/actions/esql/get_dataset.rb | 81 ++++++++++++++++++ .../api/actions/esql/put_data_source.rb | 82 +++++++++++++++++++ .../api/actions/esql/put_dataset.rb | 82 +++++++++++++++++++ .../lib/elasticsearch/api/version.rb | 2 +- 7 files changed, 486 insertions(+), 1 deletion(-) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/esql/delete_data_source.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/esql/delete_dataset.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/esql/get_data_source.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/esql/get_dataset.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/esql/put_data_source.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/esql/put_dataset.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/delete_data_source.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/delete_data_source.rb new file mode 100644 index 000000000..8338525da --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/delete_data_source.rb @@ -0,0 +1,80 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# This code was automatically generated from the Elasticsearch Specification +# See https://github.com/elastic/elasticsearch-specification +# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash. +module Elasticsearch + module API + module Esql + module Actions + # Delete ES|QL data sources. + # Deletes one or more data sources used in ES|QL data federation. + # Fails with `409` if any dataset references one of the named data sources; + # delete the dependent datasets first. + # This functionality is experimental and is not ready for production usage. Experimental + # features may change or be removed at any time. Elastic will work to fix any issues, but + # experimental features are not subject to the support SLA of official GA features. Specific + # Support terms apply. + # + # @option arguments [String, Array] :name A comma-separated list of data source names to delete. (*Required*) + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. + # @option arguments [Time] :timeout The time to wait for the request to be completed. Server default: 30s. + # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors + # when they occur. + # @option arguments [String, Array] :filter_path Comma-separated list of filters in dot notation which reduce the response + # returned by Elasticsearch. + # @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans. + # For example `"exists_time": "1h"` for humans and + # `"exists_time_in_millis": 3600000` for computers. When disabled the human + # readable values will be omitted. This makes sense for responses being consumed + # only by machines. + # @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use + # this option for debugging only. + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-delete-data-source + # + def delete_data_source(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'esql.delete_data_source' } + + defined_params = [:name].each_with_object({}) do |variable, set_variables| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _name = arguments.delete(:name) + + method = Elasticsearch::API::HTTP_DELETE + path = "_query/data_source/#{Utils.listify(_name)}" + params = Utils.process_params(arguments) + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/delete_dataset.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/delete_dataset.rb new file mode 100644 index 000000000..aecd1cf1f --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/delete_dataset.rb @@ -0,0 +1,79 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# This code was automatically generated from the Elasticsearch Specification +# See https://github.com/elastic/elasticsearch-specification +# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash. +module Elasticsearch + module API + module Esql + module Actions + # Delete ES|QL datasets. + # Deletes one or more datasets used in ES|QL data federation. + # If any specified dataset does not exist, the request fails and no datasets are deleted. + # This functionality is experimental and is not ready for production usage. Experimental + # features may change or be removed at any time. Elastic will work to fix any issues, but + # experimental features are not subject to the support SLA of official GA features. Specific + # Support terms apply. + # + # @option arguments [String, Array] :name A comma-separated list of dataset names to delete. (*Required*) + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. + # @option arguments [Time] :timeout The time to wait for the request to be completed. Server default: 30s. + # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors + # when they occur. + # @option arguments [String, Array] :filter_path Comma-separated list of filters in dot notation which reduce the response + # returned by Elasticsearch. + # @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans. + # For example `"exists_time": "1h"` for humans and + # `"exists_time_in_millis": 3600000` for computers. When disabled the human + # readable values will be omitted. This makes sense for responses being consumed + # only by machines. + # @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use + # this option for debugging only. + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-delete-dataset + # + def delete_dataset(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'esql.delete_dataset' } + + defined_params = [:name].each_with_object({}) do |variable, set_variables| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _name = arguments.delete(:name) + + method = Elasticsearch::API::HTTP_DELETE + path = "_query/dataset/#{Utils.listify(_name)}" + params = Utils.process_params(arguments) + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/get_data_source.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/get_data_source.rb new file mode 100644 index 000000000..5fb63d2e1 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/get_data_source.rb @@ -0,0 +1,81 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# This code was automatically generated from the Elasticsearch Specification +# See https://github.com/elastic/elasticsearch-specification +# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash. +module Elasticsearch + module API + module Esql + module Actions + # Get ES|QL data sources. + # Returns one or more data sources used in ES|QL data federation. + # A concrete-name miss returns `404`; a wildcard pattern or list-all request with no match + # returns `200` with an empty array. + # This functionality is experimental and is not ready for production usage. Experimental + # features may change or be removed at any time. Elastic will work to fix any issues, but + # experimental features are not subject to the support SLA of official GA features. Specific + # Support terms apply. + # + # @option arguments [String, Array] :name A comma-separated list of data source names or wildcard patterns. Omit to return all data sources. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. + # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors + # when they occur. + # @option arguments [String, Array] :filter_path Comma-separated list of filters in dot notation which reduce the response + # returned by Elasticsearch. + # @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans. + # For example `"exists_time": "1h"` for humans and + # `"exists_time_in_millis": 3600000` for computers. When disabled the human + # readable values will be omitted. This makes sense for responses being consumed + # only by machines. + # @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use + # this option for debugging only. + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-get-data-source + # + def get_data_source(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'esql.get_data_source' } + + defined_params = [:name].each_with_object({}) do |variable, set_variables| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _name = arguments.delete(:name) + + method = Elasticsearch::API::HTTP_GET + path = if _name + "_query/data_source/#{Utils.listify(_name)}" + else + '_query/data_source' + end + params = Utils.process_params(arguments) + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/get_dataset.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/get_dataset.rb new file mode 100644 index 000000000..68e9ee6fe --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/get_dataset.rb @@ -0,0 +1,81 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# This code was automatically generated from the Elasticsearch Specification +# See https://github.com/elastic/elasticsearch-specification +# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash. +module Elasticsearch + module API + module Esql + module Actions + # Get ES|QL datasets. + # Returns one or more datasets used in ES|QL data federation. + # A concrete-name miss returns `404`; a wildcard pattern or list-all request with no match + # returns `200` with an empty array. + # This functionality is experimental and is not ready for production usage. Experimental + # features may change or be removed at any time. Elastic will work to fix any issues, but + # experimental features are not subject to the support SLA of official GA features. Specific + # Support terms apply. + # + # @option arguments [String, Array] :name A comma-separated list of dataset names or wildcard patterns. Omit to return all datasets. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. + # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors + # when they occur. + # @option arguments [String, Array] :filter_path Comma-separated list of filters in dot notation which reduce the response + # returned by Elasticsearch. + # @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans. + # For example `"exists_time": "1h"` for humans and + # `"exists_time_in_millis": 3600000` for computers. When disabled the human + # readable values will be omitted. This makes sense for responses being consumed + # only by machines. + # @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use + # this option for debugging only. + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-get-dataset + # + def get_dataset(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'esql.get_dataset' } + + defined_params = [:name].each_with_object({}) do |variable, set_variables| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _name = arguments.delete(:name) + + method = Elasticsearch::API::HTTP_GET + path = if _name + "_query/dataset/#{Utils.listify(_name)}" + else + '_query/dataset' + end + params = Utils.process_params(arguments) + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/put_data_source.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/put_data_source.rb new file mode 100644 index 000000000..0ad61efa8 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/put_data_source.rb @@ -0,0 +1,82 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# This code was automatically generated from the Elasticsearch Specification +# See https://github.com/elastic/elasticsearch-specification +# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash. +module Elasticsearch + module API + module Esql + module Actions + # Create or update an ES|QL data source. + # Creates or replaces a named, type-specific data source configuration for ES|QL data federation. + # Datasets reference data source configurations to access external data. Names must be lowercase + # and follow index or alias naming rules. + # This functionality is experimental and is not ready for production usage. Experimental + # features may change or be removed at any time. Elastic will work to fix any issues, but + # experimental features are not subject to the support SLA of official GA features. Specific + # Support terms apply. + # + # @option arguments [String] :name The data source name to create or update. (*Required*) + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. + # @option arguments [Time] :timeout The time to wait for the request to be completed. Server default: 30s. + # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors + # when they occur. + # @option arguments [String, Array] :filter_path Comma-separated list of filters in dot notation which reduce the response + # returned by Elasticsearch. + # @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans. + # For example `"exists_time": "1h"` for humans and + # `"exists_time_in_millis": 3600000` for computers. When disabled the human + # readable values will be omitted. This makes sense for responses being consumed + # only by machines. + # @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use + # this option for debugging only. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body request body + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-put-data-source + # + def put_data_source(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'esql.put_data_source' } + + defined_params = [:name].each_with_object({}) do |variable, set_variables| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _name = arguments.delete(:name) + + method = Elasticsearch::API::HTTP_PUT + path = "_query/data_source/#{Utils.listify(_name)}" + params = Utils.process_params(arguments) + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/put_dataset.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/put_dataset.rb new file mode 100644 index 000000000..a963ab013 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/put_dataset.rb @@ -0,0 +1,82 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# This code was automatically generated from the Elasticsearch Specification +# See https://github.com/elastic/elasticsearch-specification +# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash. +module Elasticsearch + module API + module Esql + module Actions + # Create or update an ES|QL dataset. + # Creates or replaces a dataset that references a data source in ES|QL data federation. + # Dataset names participate in the index namespace and must follow index or alias naming rules. + # Returns `404` if the referenced data source does not exist. + # This functionality is experimental and is not ready for production usage. Experimental + # features may change or be removed at any time. Elastic will work to fix any issues, but + # experimental features are not subject to the support SLA of official GA features. Specific + # Support terms apply. + # + # @option arguments [String] :name The dataset name to create or update. (*Required*) + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. + # @option arguments [Time] :timeout The time to wait for the request to be completed. Server default: 30s. + # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors + # when they occur. + # @option arguments [String, Array] :filter_path Comma-separated list of filters in dot notation which reduce the response + # returned by Elasticsearch. + # @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans. + # For example `"exists_time": "1h"` for humans and + # `"exists_time_in_millis": 3600000` for computers. When disabled the human + # readable values will be omitted. This makes sense for responses being consumed + # only by machines. + # @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use + # this option for debugging only. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body request body + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-put-dataset + # + def put_dataset(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'esql.put_dataset' } + + defined_params = [:name].each_with_object({}) do |variable, set_variables| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _name = arguments.delete(:name) + + method = Elasticsearch::API::HTTP_PUT + path = "_query/dataset/#{Utils.listify(_name)}" + params = Utils.process_params(arguments) + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/lib/elasticsearch/api/version.rb b/elasticsearch-api/lib/elasticsearch/api/version.rb index 79653dcbd..63dab728a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/version.rb +++ b/elasticsearch-api/lib/elasticsearch/api/version.rb @@ -18,6 +18,6 @@ module Elasticsearch module API VERSION = '9.5.0'.freeze - ES_SPECIFICATION_COMMIT = '7555fc9af2cc5f3cedab2f35548136eb4972f1fa'.freeze + ES_SPECIFICATION_COMMIT = '81b093375618343927b45187e524c698188ee497'.freeze end end